-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
fix: if unable to calculate local md5 hash use old value of detect_md5hash #12032
base: main
Are you sure you want to change the base?
fix: if unable to calculate local md5 hash use old value of detect_md5hash #12032
Conversation
Hello! I am a robot. Tests will require approval from a repository maintainer to run. @roaks3, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
Tests analyticsTotal tests: 109 Click here to see the affected service packages
🟢 All tests passed! View the build log |
Tests analyticsTotal tests: 110 Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
Hi @gurusai-voleti, This change appears to be the risky fix as we are setting PS: Added test appears to be testing different behavior. I suggest, writing test steps and test configs by referring bug reproductions steps. |
with this fix in terraform plan wont show any difference and in terraform apply it will create files and wont do anything else unless there are really infra changes to deploy, this is working as expected without this change also with out file delete. |
But if there is a resource dependency then Ideally customer expects a difference. If the source file is being removed, Ideally there should be some difference, Right? |
yes if the file is created through a resource block it will show up in the plan, only thing it will not display in the plan is md5 hash difference with this fix, which is the real problem of the issue between plan and apply, I can modify my test case more |
Hi @roaks3, Is there any way to handle intermediate value change of attribute during terraform apply operation? I believe, The error is coming because of two different values of same attribute during one apply operation. @gurusai-voleti can you modify PR description as per this guidelines:https://googlecloudplatform.github.io/magic-modules/contribute/create-pr/#requirements. Currently there is no link between this PR and the issue that it is going to fix. |
Tests analyticsTotal tests: 110 Click here to see the affected service packages
🟢 All tests passed! View the build log |
Tests analyticsTotal tests: 110 Click here to see the affected service packages
🟢 All tests passed! View the build log |
@roaks3 This PR has been waiting for review for 3 weekdays. Please take a look! Use the label |
Yea, this is relatively complicated. The Per the link, you might have luck working with I would recommend narrowing in on the exact failure case, as it is odd that the source file can be removed and then apply works the first time, but then not on subsequent times. Hopefully there is a specific edge case that can be accounted for. As mentioned by @kautikdk , I'm a bit concerned about the proposed solution in the PR being too broad, and impacting behavior that is working as intended. |
Tests analyticsTotal tests: 110 Click here to see the affected service packages
🟢 All tests passed! View the build log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To follow up: I was able to confirm with the team the CustomizeDiff
was either unavailable, or rarely used, when this functionality was originally introduced, so that is likely a path we can take to fix this issue and possibly simplify the behavior.
Tests analyticsTotal tests: 115 Click here to see the affected service packages
🟢 All tests passed! View the build log |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 115 Click here to see the affected service packages
🟢 All tests passed! View the build log |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 115 Click here to see the affected service packages
🟢 All tests passed! View the build log |
@roaks3 yes without this breaking change the issue seems cannot be fixed, the diffsuppressfunc for detect_md5hash and has change("detect_md5hash") is the main issue and user is facing the issue with that related logic to support the new field along with detect_md5hash, it can be done but the user reported issue will not be fixed, we can mark detect_md5hash as deprecated and ask customers to use new field source_md5hash? |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 115 Click here to see the affected service packages
Action takenFound 28 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 115 Click here to see the affected service packages
🟢 All tests passed! View the build log |
@roaks3 This PR has been waiting for review for 3 weekdays. Please take a look! Use the label |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the user reported issue will not be fixed, we can mark detect_md5hash as deprecated and ask customers to use new field source_md5hash?
Yea, that's the direction I thought we were going to go in. Perhaps @kautikdk could weigh in? If we cannot do that, or it isn't a satisfactory solution, then we would need to wait until ~Sept to merge this.
Hi, Got off track on this issue. |
@kautikdk the issue is with detect_md5hash field, else do a breaking change by removing suppressfunc of field detect_md5hash and avoid detect_md5hash in update and read methods and add new field source_md5hash (as per current PR changes) @roaks3 anything you want to add? |
Yea that's correct. Based on the numerous attempts above, I don't believe we will have success trying to fix the existing |
@roaks3 This PR has been waiting for review for 3 weekdays. Please take a look! Use the label |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clearing review
So with the |
If this is true, will the fix work if the |
initially we wont expect the user to provide source_md5hash, if any change/update of object is required let the user provide the source_md5hash another computed field md5hash will always be there and no change for it |
yes if the user provides in source_md5hash in configuration of tf or any update is required for object |
Just a intuition, won't this put burden on users? For example, If a user specifies |
source_md5hash is an optional field, if the object changes at the path which is mentioned in the new field source_md5hash is required by the user only when the user wants to have track of md5hash of the object locally otherwise not needed as source, content already handled for changes |
if unable to calculate local md5 hash use old value of detect_md5hash
Fixes: hashicorp/terraform-provider-google#18618
Release Note Template for Downstream PRs (will be copied)