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

Add mutex to google_tags_tag_binding #5878

Merged

Conversation

ScottSuarez
Copy link
Contributor

closes: hashicorp/terraform-provider-google#11381

Release Note Template for Downstream PRs (will be copied)

tags: fixed issue where tags could not be applied sequentially to the same parent in `google_tags_tag_binding`

@ScottSuarez ScottSuarez requested review from a team and melinath and removed request for a team March 31, 2022 18:26
@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, 14 insertions(+))
Terraform Beta: Diff ( 1 file changed, 14 insertions(+))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@rileykarson
Copy link
Member

Drive-by comment: Is this mutex on the right parent? The error message suggests we need it on the resource, not the tag value: Error: Error creating TagBinding: googleapi: Error 400: Resource '//cloudresourcemanager.googleapis.com/projects/XXXXXX' has another tag binding operation in progress. with google_tags_tag_binding.bindings["fooo"],

melinath
melinath previously approved these changes Apr 1, 2022
Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

lgtm assuming tests pass and this should share with tagvalue

@melinath melinath dismissed their stale review April 1, 2022 21:40

double-checking this first

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

Okay, tags are a little weird because the resources each have a parent key and it means a different thing for each one. For tagKey parent is the organization; for tagValue the parent is a tagKey; for tagBinding the parent is the resource the tag value is being applied to. So tagBinding and tagValue would never overlap in terms of their mutex.

Co-authored-by: Stephen Lewis (Burrows) <[email protected]>
@ScottSuarez
Copy link
Contributor Author

Drive-by comment: Is this mutex on the right parent? The error message suggests we need it on the resource, not the tag value: Error: Error creating TagBinding: googleapi: Error 400: Resource '//cloudresourcemanager.googleapis.com/projects/XXXXXX' has another tag binding operation in progress. with google_tags_tag_binding.bindings["fooo"],

Should be the correct resource. This is done on the resource through the parent link supplied. Stopping sequential bindings on eq parent links should solve the issue afaik

@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, 14 insertions(+))
Terraform Beta: Diff ( 1 file changed, 14 insertions(+))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@rileykarson
Copy link
Member

Should be the correct resource. This is done on the resource through the parent link supplied. Stopping sequential bindings on eq parent links should solve the issue afaik

Ah, I thought parent referred to the TagValue for some reason and not the linked resource. Should have double-checked. Thanks!

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

lgtm

@modular-magician
Copy link
Collaborator

Tests count:
Total tests: 1965
Passed tests 1726
Skipped tests: 237
Failed tests: 2

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccAccessContextManager|TestAccContainerCluster_withAuthenticatorGroupsConfig

@modular-magician
Copy link
Collaborator

modular-magician commented Apr 5, 2022

Tests failed during RECORDING mode:
TestAccAccessContextManager
TestAccContainerCluster_withAuthenticatorGroupsConfig [view]

Please fix these to complete your PR
You can view the build log here: https://storage.cloud.google.com/vcr-test-logs/beta/refs/heads/auto-pr-5878/artifacts/d2b05730-7e81-4cc9-885f-d4f86402a17a/build-log/recording_test.log and the debug log for each test here: https://console.cloud.google.com/storage/browser/vcr-test-logs/beta/refs/heads/auto-pr-5878/artifacts/d2b05730-7e81-4cc9-885f-d4f86402a17a/recording

@ScottSuarez
Copy link
Contributor Author

API team is working to add support for this, checking this code in while they work on it b/228352372

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

Successfully merging this pull request may close these issues.

google_tags_tag_value_iam_binding cannot be used with for_each
4 participants