Skip to content

Add etags to acm_service_perimeter_resource #12736

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 8 commits into from
Jan 14, 2025

Conversation

coder-221
Copy link
Member

Important

This PR is dependent on #12735. I'd appreciate it if we can try to get both of these in the end of Tuesday cut off for next weeks release. Thanks!

The acm_service_perimeter_resource is an item in a list (like a project in a list of projects). Since there is no API for "add item to list", terraform actually makes a GET then PATCH to get the current list, merge them, then send the combined list back to the API.

This GET-PATCH pattern can override data when concurrent requests are sent. So, we're trying to add etags to block requests that can result in data loss. Previously, I added the new post_read custom code hook so we can retrieve the etag.

I've tested this locally and I can see the etags being sent in the PATCH requests.

Please let me know if you have any questions.

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

accesscontextmanager: added `etag` to `google_access_context_manager_service_perimeter_resource` to prevent overriding list of resources

@github-actions github-actions bot requested a review from shuyama1 January 13, 2025 08:32
Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@shuyama1, 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
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 ( 2 files changed, 51 insertions(+), 8 deletions(-))
google-beta provider: Diff ( 2 files changed, 51 insertions(+), 8 deletions(-))

1 similar comment
@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 ( 2 files changed, 51 insertions(+), 8 deletions(-))
google-beta provider: Diff ( 2 files changed, 51 insertions(+), 8 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

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

Click here to see the affected service packages
  • accesscontextmanager

🟢 All tests passed!

View the build log

@modular-magician
Copy link
Collaborator

Tests analytics

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

Click here to see the affected service packages
  • accesscontextmanager

🟢 All tests passed!

View the build log

Copy link
Member

@shuyama1 shuyama1 left a comment

Choose a reason for hiding this comment

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

LGTM! I'll wait to merge this until the dependent PR #12735 is merged

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