Skip to content

Fix google_dns_record_set with same name throw an error #11622

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

Merged
merged 4 commits into from
Sep 9, 2024

Conversation

Samir-Cit
Copy link
Contributor

@Samir-Cit Samir-Cit commented Sep 3, 2024

This PR fixes the issue hashicorp/terraform-provider-google#10661 by removing the piece of code that prevents the error when creating a resource with a name that already exists.

Release Note Template for Downstream PRs (will be copied)

dns: added a mutex to `google_dns_record_set` to prevent conflicts when multiple resources attempt to operate on the same record set

@github-actions github-actions bot requested a review from slevenick September 3, 2024 17:09
Copy link

github-actions bot commented Sep 3, 2024

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.

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Sep 3, 2024
Copy link

github-actions bot commented Sep 6, 2024

@slevenick This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link
Contributor

@slevenick slevenick left a comment

Choose a reason for hiding this comment

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

After discussion with the team on this, I think the best course of action is to add a mutex to this resource to prevent the 409 conflict situations described in the linked bug.

We don't want to remove this code as it will make the resource unauthoritative, which some users may currently depend on. If we're convinced we want to make it unauthoritative we could consider that in a major version, but until then we should limit the change to adding a mutex

@github-actions github-actions bot requested a review from slevenick September 6, 2024 18:53
Copy link
Contributor Author

@Samir-Cit Samir-Cit left a comment

Choose a reason for hiding this comment

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

Suggestion applied to use mutex instead of removing the code.

@slevenick
Copy link
Contributor

/gcbrun I think I messed something up

@modular-magician modular-magician added service/cloud-dns and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Sep 6, 2024
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 1 file changed, 16 insertions(+))
google-beta provider: Diff ( 1 file changed, 16 insertions(+))

Errors

google provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

google-beta provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 0
Passed tests: 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • dns

$\textcolor{red}{\textsf{Errors occurred during REPLAYING mode. Please fix them to complete your PR.}}$

View the build log

Copy link
Contributor

@slevenick slevenick left a comment

Choose a reason for hiding this comment

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

Compilation errors

@github-actions github-actions bot requested a review from slevenick September 9, 2024 14:42
@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Sep 9, 2024
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 1 file changed, 18 insertions(+))
google-beta provider: Diff ( 1 file changed, 18 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 47
Passed tests: 46
Skipped tests: 1
Affected tests: 0

Click here to see the affected service packages
  • dns

$\textcolor{green}{\textsf{All tests passed!}}$

View the build log

Copy link
Contributor

@slevenick slevenick left a comment

Choose a reason for hiding this comment

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

Thanks!

niharika-98 pushed a commit to niharika-98/magic-modules that referenced this pull request Oct 7, 2024
@Samir-Cit Samir-Cit deleted the bug/dns-record-set branch November 1, 2024 16:11
Philip-Jonany pushed a commit to Philip-Jonany/magic-modules that referenced this pull request Nov 4, 2024
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.

3 participants