-
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 perma-diff in google_container_cluster
when cluster_dns_scope
is unspecified
#13150
base: main
Are you sure you want to change the base?
Fix perma-diff in google_container_cluster
when cluster_dns_scope
is unspecified
#13150
Conversation
Hello! I am a robot. Tests will require approval from a repository maintainer to run. @melinath, 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. |
google_container_cluster
when cluster_dns_scope
is unspecified
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: 226 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
|
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
Terraform defaults this field to DNS_SCOPE_UNSPECIFIED, but the API corrects this to an empty value. Following https://googlecloudplatform.github.io/magic-modules/develop/diffs/#default_if_empty to tackle this issue.
88a029b
to
d635cab
Compare
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: 226 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
|
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.
We usually don't include UNSPECIFIED values in enums because they're the equivalent of the empty string.
Changing default values or making validation stricter is a breaking change; however, given that users are experiencing a bug (this permadiff) I think it would fall under the fixing a bug exemption and be allowed in a minor release.
In particular, I would recommend:
- Remove the default (which would be the same as changing to
Default: ""
). - Remove
DNS_SCOPE_UNSPECIFIED
from the ValidateFunc for the field so that it is no longer an allowed value.
What would you think of that? Any objection?
@melinath Ah, so the idea here would be that, since setting this value is always causing permadiff right now, it's okay if we disallow it and force people change it to empty? Is that the rationale more or less? |
Terraform defaults this field to DNS_SCOPE_UNSPECIFIED, but the API
corrects this to an empty value.
Following https://googlecloudplatform.github.io/magic-modules/develop/diffs/#default_if_empty
to tackle this issue.
To make writing DNS tests faster, I refactored the helper function
testAccContainerCluster_autopilot_withDNSConfig
I added previously intotestAccContainerCluster_withAdvancedDNSConfig
.Fixes hashicorp/terraform-provider-google#20285
Release Note Template for Downstream PRs (will be copied)
See Write release notes for guidance.