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

Revert google_dns_record_set to previous implementation #5191

Merged
merged 4 commits into from
Sep 16, 2021

Conversation

c2thorn
Copy link
Member

@c2thorn c2thorn commented Sep 13, 2021

Fixes hashicorp/terraform-provider-google#9257
Fixes hashicorp/terraform-provider-google#9112
Fixes hashicorp/terraform-provider-google#9416

This PR reverts the resource to the original handwritten version that uses the DNS client library from the MM-generated version that used the new API.

Deviations from the old handwritten version include:

  • More tests
  • ttl was made optional in the previous iteration, I am keeping it optional for backwards-compatibility
  • reset the resource ID after updating. The type field can be updated which is a part of the ID. This allows one of the newer tests to import correctly

Release Note Template for Downstream PRs (will be copied)

dns: fixed an issue in `google_dns_record_set` where creating the resource would result in an 409 error
dns: fixed an issue in `google_dns_record_set` where `rrdatas` could not be updated

@google-cla google-cla bot added the cla: yes label Sep 13, 2021
@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 ( 5 files changed, 427 insertions(+), 540 deletions(-))
Terraform Beta: Diff ( 5 files changed, 427 insertions(+), 540 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccComputeManagedSslCertificate_managedSslCertificateBasicExample|TestAccDNSRecordSet_rrdatasUpdate|TestAccDNSRecordSet_basic|TestAccDNSRecordSet_Update|TestAccDNSRecordSet_changeType|TestAccDNSRecordSet_nestedNS|TestAccDNSRecordSet_quotedTXT|TestAccDNSRecordSet_uppercaseMX You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=205564

@modular-magician
Copy link
Collaborator

Tests failed during RECORDING mode: TestAccDNSRecordSet_changeType Please fix these to complete your PR

@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 ( 5 files changed, 428 insertions(+), 539 deletions(-))
Terraform Beta: Diff ( 6 files changed, 429 insertions(+), 541 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDNSRecordSet_changeType You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=205585

@c2thorn c2thorn requested a review from rileykarson September 14, 2021 15:41
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.

Can we add a test that replicates hashicorp/terraform-provider-google#9257?

return fmt.Errorf("Error creating DNS RecordSet: %s", err)
}

d.SetId(fmt.Sprintf("%s/%s/%s", zone, name, rType))
Copy link
Member

Choose a reason for hiding this comment

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

Thinking out loud: The id change is safe because we don't use it in Read and neither did the old implementation (so users are safely able to downgrade if needed)

@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 ( 5 files changed, 374 insertions(+), 432 deletions(-))
Terraform Beta: Diff ( 6 files changed, 375 insertions(+), 433 deletions(-))

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDNSRecordSet_secondaryNS You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=206126

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