-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 firewall rule to support empty descritpion on update #10950
Conversation
Hello! I am a robot. Tests will require approval from a repository maintainer to run. @slevenick, 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. |
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.
Can you add a test that would specifically update this field to empty and check that it works?
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: 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 testsTestAccComputeInstanceNetworkIntefaceWithSecurityPolicy |
|
I have modify TestAccComputeFirewall_update to verify that description can be set to null/empty |
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: Click here to see the affected service packages
Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected testsTestAccComputeFirewall_update|TestAccComputeInstanceNetworkIntefaceWithSecurityPolicy |
|
Can you explain why setting the description to empty is desirable? I get that it's technically correct, but it may introduce unexpected behavior as most of our resources with descriptions don't behave like this Are you running into a specific issue around the description field? |
I noticed that for most resources within GCP, the description is an immutable field, but for firewall rules, it is not. Through the console or gcloud command, you can set this to empty. However, when using Terraform, it provides a different experience. In my organization, I observed that you could create a firewall rule without a description, but once a rule has a description, you couldn't set it back to empty. The goal for this merge was to align Terraform functionality with the expected experience provided through other interactions |
@slevenick 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.
This is causing a failure in TGC (which you don't need to know about) but I think the way to fix it is to add a description to this file: https://github.com/GoogleCloudPlatform/magic-modules/blob/main/mmv1/third_party/tgc/tests/data/firewall.json
Can you try that and we'll see if the tests pass? I'm not entirely sure how to fix it, so I'm kind of guessing here
I believe i have updated all firewall rules that would have failed based on missing descriptions |
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: 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 testsTestAccComputeInstanceNetworkIntefaceWithSecurityPolicy |
|
Fixed google_compute_firewall to support updating description field to empty or null value, currently when the value changes to null/empty updates are not pushed
Release Note Template for Downstream PRs (will be copied)