-
Notifications
You must be signed in to change notification settings - Fork 13
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
Ignore rule expiration date doesn't work #259
Comments
@luis-garza Thanks for the report. I'll add this to our plan to investigate. At first glance, this may be timezones related. Are you (where you apply TF configuration) in the same timezone as your Artifactory instance? |
Yes, both are in the same TZ. |
Hi, here's an update.
Not sure if the issue was fixed by the lib upgrade, or by some external change at server side... 🤔 |
@alexhung If the issue is resolved in v2.13.0, it was not intentional or planned. |
So, here's again the issue... 😢 This random failures smells that it could be related to the time when it's executed. This one was executed on Oct 29th at 11:40 from Spain (GMT+1) and was performed against European Artifactory SaaS instance. Terraform will perform the following actions:
# xray_ignore_rule.vulnerabilities["my-rule"] will be created
+ resource "xray_ignore_rule" "vulnerabilities" {
+ author = (known after apply)
+ created = (known after apply)
+ cves = [
+ "CVE-2018-20225",
]
+ expiration_date = "2024-11-25"
+ id = (known after apply)
+ is_expired = (known after apply)
+ notes = "my-rule"
+ project_key = "ni"
+ watches = [
+ "ni-vulnerabilities",
]
+ artifact {
+ name = "docker://python"
}
+ component {
+ name = "pypi://pip"
}
}
Plan: 1 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value:
xray_ignore_rule.vulnerabilities["my-rule"]: Creating...
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to xray_ignore_rule.vulnerabilities["my-rule"],
│ provider "provider[\"registry.terraform.io/jfrog/xray\"]" produced an
│ unexpected new value: .expiration_date: was cty.StringVal("2024-11-25"),
│ but now cty.StringVal("2024-11-24").
│
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
╵```
If I find another executions where it works, I'll post here all info... |
@luis-garza That was my initial guess as well (TZ related). I'll take a look at the code in the next few days. |
PR is open, nice! If you let us know how we can grab the artifact from the CI we can check it. |
@luis-garza We don't save the binary from our CI acceptance tests. You can pull the branch and build the binary yourself but that's probably too much setup? |
…date-tz-issue Fix time parsing for 'expiration_date' from API payload
@alexhung hey, I've just tested the fix published. |
Describe the bug
The Ignore rule expiration date field doesn't work as expected. The ignore rule is created but with one day less in the expiration date from the date defined. So, any further
plan
orapply
will end up with an inconsistency error:Below is the snippet:
Below is the behavior:
The text was updated successfully, but these errors were encountered: