-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating watches in a project - odd behavior (when using TF modules) #110
Comments
NB, all the other object (projects repos and policies exist at this point module "project_watches" {
source = "../../modules/xray/watches/project"
for_each = var.project_repo_watches != {} ? var.project_repo_watches : {}
repo_watches = each.value
depends_on = [module.project, module.policies]
} |
Hello, any movement on this? |
hi @emiledd-nbs! I'm starting to work on this ticket tomorrow. |
I can confirm that the watch is not active, when it was created using modules. Thats weird, especially when I see that both POST and GET API calls have |
Looks like I see the problem now - do you have any repositories, created in that particular project at the time you create a watch? In my test, I'm using a fresh Artifactory instance, with no repositories assigned to the CICD project. If I remove the project attribute from the HCL, the watch is created just fine. Also, if I add one repository to the project, the watch is active. It's a bug in Xray, I'll submit the issue with the Xray team. Thanks! |
Yep we do have repos created at the time. The repos exist, we create the project and then assign the repos to the project and create the watch. We have tried a few ways, different TF applies so that the project is created, and repos assigned in one plan. Then the watch after and it doesnt seem to work Great thanks :) When the bug is raised can you share so we can track progress |
Please create a support ticket for this issue and mention Jira XRAY-17161, it's internal, but the support team will link your request to it and it will get more attention. |
Support ticket with jfrog directly? |
Yes. Tell them that the watch switches to disabled, if created in the project, and tell them you need this functionality to work with Terraform Provider Artifactory. Also, that I've created the ticket for the Xray team. This way the ticket priority should be higher. |
Ours stay active if we run the terraform twice with a ghost commit - it just doesnt apply the resources or stay active on the initial run |
Any movement here? I experience the same issues and have to say I find the whole "Jfrog customers are asked by Jfrog employees to contact another Jfrog department" thing a bit odd. Am I missing something? |
@emiledd-nbs I wasn't sure from reading previous messages here if you have HCL to create repos for this project at the same time as creating the watch? If so, you can use |
Closing as stale. |
Describe the bug
We are trying to create watches within a project that have all-repos as the resource. When we run the Terraform, the watch is created and the plan shows that it is adding all the resources and using a filter, however the watch itself has no configuration past the name and description; no resources and inactive (even though we pass through an active flag). If we then make a ghost commit to a comment in the watch creation, the resources are created and the watch is enabled.
We had this running using an input variable and thought that could be causing the issue, so we then hardcoded the module in and still got the same behaviour.
Requirements for and issue
Expected behavior
I expect a watch to be created first time with all configuration, and not have to run it a second time with ghost commits to add resources and enable it
Additional context
I have attached a file showing plan and UI
WORKING CODE.docx
The text was updated successfully, but these errors were encountered: