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

HCPIE-1846: Handle DEADLINE_EXCEEDED Retries for IAM Groups and Group Members #1140

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

itsjaspermilan
Copy link
Contributor

@itsjaspermilan itsjaspermilan commented Nov 15, 2024

🛠️ Description

Adds a retry wrapper around the Groups and Group Member clients. This wrapper uses exponential backoff to handle the retry.

🏗️ Acceptance tests

  • Are there any feature flags that are required to use this functionality? No
  • Have you added an acceptance test for the functionality being added? Existing acceptance tests cover the code changes
  • Have you run the acceptance tests on this branch? Identity acceptance tests run as a part of CI when there are changes in the Identity directories. Output is shown below.

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

==> Checking that code complies with gofmt requirements...
golangci-lint run --config ./golangci-config.yml 
TF_ACC=1 go test -short -coverprofile=coverage-e2e.out ./internal/provider/iam -v  -timeout 360m -parallel=10
=== RUN   TestAccGroupDataSource
--- PASS: TestAccGroupDataSource (5.34s)
=== RUN   TestAccServicePrincipalDataSource
--- PASS: TestAccServicePrincipalDataSource (2.67s)
=== RUN   TestAccUserPrincipalDataSource
--- PASS: TestAccUserPrincipalDataSource (3.60s)
=== RUN   TestAccGroupIamPolicyResource
--- PASS: TestAccGroupIamPolicyResource (5.77s)
=== RUN   TestAccGroupIamBindingResource
--- PASS: TestAccGroupIamBindingResource (9.79s)
=== RUN   TestAccGroupMembersResource
--- PASS: TestAccGroupMembersResource (9.63s)
=== RUN   TestAccGroupResource
--- PASS: TestAccGroupResource (9.54s)
=== RUN   TestAccServicePrincipalKeyResource
--- PASS: TestAccServicePrincipalKeyResource (14.22s)
=== RUN   TestAccServicePrincipalResource_Project
--- PASS: TestAccServicePrincipalResource_Project (5.20s)
=== RUN   TestAccServicePrincipalResource_ExplicitProject
--- PASS: TestAccServicePrincipalResource_ExplicitProject (2.89s)
=== RUN   TestAccServicePrincipalResource_Organization
--- PASS: TestAccServicePrincipalResource_Organization (3.47s)
=== RUN   TestAccWorkloadIdentityProviderResource
--- PASS: TestAccWorkloadIdentityProviderResource (6.65s)
PASS
coverage: 69.7% of statements
ok  	github.com/hashicorp/terraform-provider-hcp/internal/provider/iam	78.779s	coverage: 69.7% of statements

@itsjaspermilan itsjaspermilan marked this pull request as ready for review November 15, 2024 21:07
@itsjaspermilan itsjaspermilan requested review from a team as code owners November 15, 2024 21:07
@squaresurf squaresurf self-requested a review November 15, 2024 21:11
@squaresurf
Copy link
Member

I undid my approval as half of this PR is code I wrote.

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.

2 participants