Skip to content
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

remove computed keys from json #5595

Closed
wants to merge 2 commits into from

Conversation

megan07
Copy link
Contributor

@megan07 megan07 commented Jan 5, 2022

Fixes hashicorp/terraform-provider-google#9976
Fixes hashicorp/terraform-provider-google#7242 as well, I think

I chose this approach because that second issue seemed to show there were more fields than just the one showing up in the test that were computed, and I think this should cover them all, but it's also possible I'm overlooking a potential issue.

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

monitoring: fixed perma-diff in `google_monitoring_dashboard` by not comparing computed keys returned by API that aren't defined in the config.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 1 file changed, 29 insertions(+), 7 deletions(-))
Terraform Beta: Diff ( 1 file changed, 29 insertions(+), 7 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDatasourceGoogleServiceNetworkingPeeredDnsDomain_basic|TestAccApigeeEnvironmentIamBindingGenerated|TestAccApigeeEnvironmentIamMemberGenerated|TestAccApigeeEnvironmentIamPolicyGenerated|TestAccContainerCluster_withBootDiskKmsKey|TestAccContainerNodePool_withInvalidUpgradeSettings|TestAccServiceNetworkingPeeredDNSDomain_basic|TestAccTags You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=240047

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode: TestAccTags|TestAccServiceNetworkingPeeredDNSDomain_basic|TestAccContainerNodePool_withInvalidUpgradeSettings Please fix these to complete your PR

Copy link
Member

@rileykarson rileykarson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes the resource behaviour, given that fields not in config won't appear anymore so drift detection on them won't work. Do you feel this could be a breaking change? Should we document it in a warning on the resource?

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 2 files changed, 31 insertions(+), 7 deletions(-))
Terraform Beta: Diff ( 2 files changed, 31 insertions(+), 7 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDatasourceGoogleServiceNetworkingPeeredDnsDomain_basic|TestAccApigeeEnvironmentIamBindingGenerated|TestAccApigeeEnvironmentIamMemberGenerated|TestAccApigeeEnvironmentIamPolicyGenerated|TestAccContainerNodePool_withInvalidUpgradeSettings|TestAccOsConfigOsPolicyAssignment_FixedOsPolicyAssignment|TestAccOsConfigOsPolicyAssignment_PercentOsPolicyAssignment You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=240549

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode: TestAccDatasourceGoogleServiceNetworkingPeeredDnsDomain_basic|TestAccContainerNodePool_withInvalidUpgradeSettings Please fix these to complete your PR

@IchordeDionysos
Copy link
Contributor

@rileykarson @megan07 what is the status of this PR?
Will be merged for the upcoming 5.0.0 release?

@rileykarson
Copy link
Member

Ah, we'd lost track of this- @c2thorn can you take a look?

@c2thorn
Copy link
Member

c2thorn commented Sep 11, 2023

This is targeted for 5.0.0 release, but will need someone to take it over and rebase. I'll tentatively take it.

@c2thorn
Copy link
Member

c2thorn commented Sep 23, 2023

closing in favor of #9065

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants