Skip to content

remove computed keys from json#5595

Closed
megan07 wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
hashicorp:megan_9976
Closed

remove computed keys from json#5595
megan07 wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
hashicorp:megan_9976

Conversation

@megan07

@megan07 megan07 commented Jan 5, 2022

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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(-))

@megan07 megan07 requested a review from rileykarson January 5, 2022 22:10
@modular-magician

Copy link
Copy Markdown
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
Copy Markdown
Collaborator

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

@rileykarson rileykarson left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator

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

@IchordeDionysos

Copy link
Copy Markdown
Contributor

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

@rileykarson

Copy link
Copy Markdown
Member

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

@c2thorn

c2thorn commented Sep 11, 2023

Copy link
Copy Markdown
Member

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

@c2thorn

c2thorn commented Sep 23, 2023

Copy link
Copy Markdown
Member

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

Development

Successfully merging this pull request may close these issues.

Test failure: Permadiff in google_monitoring_dashboard google_monitoring_dashboard: resource always need to be updated.

5 participants