-
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 permadiff issue in google_cloudfunctions2_function service_config.environment_variables #11333
fix permadiff issue in google_cloudfunctions2_function service_config.environment_variables #11333
Conversation
….environment_variables
Hello! I am a robot. Tests will require approval from a repository maintainer to run. @SarahFrench, 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. |
This is the difference from a case where the same change works See Fix a permadiff |
Tests analyticsTotal tests: 18 Click here to see the affected service packages
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.
I'm at the end of my day and I'm OOO Monday and Tuesday so a 'proper' review will be delayed, but I had some thoughts from a quick look at your PR and your discussion in the linked issue that might unblock you in the meantime:
First, do you want to make the changes that you described in this comment to the environmentVariablesDiffSuppress
function? If you did want to make that change you'd need to edit this file: cloudfunctions2_function.go.erb. Was there a reason for the different approach in this PR?
Second, it'd be great to have a minimal reproduction of the issue to see what conditions lead to the problem. Your discussion of the problem here was really useful and it sounds like reproduction of the issue could be achieved with a handful of resources (instead of the module shared in the linked issue). If that's the case it'd be useful to add or update an existing acceptance test to trigger this issue and then use it to confirm your PR solves the issue.
I'll resume review on Wednesday!
Hi @SarahFrench Thanks for the review. The approach for the fix in the discussion was based in a partial understanding of the root cause. Later, comparing the case for the Cloud Function v2 with other exemples of the same type of permadiff function of a Map attribute that does not have the issue like the workbench metadata map helped to identify the real root cause. The missing part was this instruction from the development guide regarding updating the yaml. This was the only difference form the other cases where the same permadiff function worked and the problem was fixed with only this change. Should the new test case be added here? magic-modules/mmv1/templates/terraform/examples/cloudfunctions2_full.tf.erb Lines 52 to 54 in d8061c7
like
|
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.
Should the new test case be added here?
magic-modules/mmv1/templates/terraform/examples/cloudfunctions2_full.tf.erblike
environment_variables = { SERVICE_CONFIG_TEST = "config_test" SERVICE_CONFIG_DIFF_TEST = google_storage_bucket.bucket.name }
Yes, that should work. I'm hoping that that change will cause the test(s) generated from that example file to fail when your changes in this PR aren't present 🤞
I've opened a draft PR here: https://github.com/GoogleCloudPlatform/magic-modules/pull/11345/files to try out the change of adding If it fails as expected, feel free to pull it into this PR and we can confirm the fix. |
…ctions2-function-runtime-env-var
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: 18 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 @SarahFrench could you PTAL? @trodge helped creating a draft PR to reproduce the error this PR is fixing |
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.
Approving based on the fact the test fails when the test is updated but the schema isn't (b65255d, #11345 (comment)), and the test passes here due to the schema changes
….environment_variables (GoogleCloudPlatform#11333)
….environment_variables (GoogleCloudPlatform#11333)
fix permadiff issue in google_cloudfunctions2_function service_config.environment_variables hashicorp/terraform-provider-google#18747
Release Note Template for Downstream PRs (will be copied)