-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Add tests for multiple collaborators and retry for errors that can occur #43179
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
Conversation
Community GuidelinesThis comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀 Voting for Prioritization
Pull Request Authors
|
Adjust tests to resolve issues. Add changelog.
Also shortens the expected message to `in Preparing state` as the agent and agent collaboration APIs are not consistent in the formatting of their error message bodies.
```console % make testacc PKG=bedrockagent TESTS="TestAccBedrockAgentAgent_|TestAccBedrockAgentAgentAlias_|TestAccBedrockAgentAgentCollaborator_" make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.24.4 test ./internal/service/bedrockagent/... -v -count 1 -parallel 20 -run='TestAccBedrockAgentAgent_|TestAccBedrockAgentAgentAlias_|TestAccBedrockAgentAgentCollaborator_' -timeout 360m -vet=off 2025/06/25 15:40:24 Creating Terraform AWS Provider (SDKv2-style)... 2025/06/25 15:40:24 Initializing Terraform AWS Provider (SDKv2-style)... --- PASS: TestAccBedrockAgentAgentAlias_disappears (45.18s) --- PASS: TestAccBedrockAgentAgent_singlePrompt (46.82s) --- PASS: TestAccBedrockAgentAgent_memoryConfiguration (47.35s) --- PASS: TestAccBedrockAgentAgent_basic (50.48s) --- PASS: TestAccBedrockAgentAgent_full (54.59s) --- PASS: TestAccBedrockAgentAgentCollaborator_disappears (56.98s) --- PASS: TestAccBedrockAgentAgentAlias_basic (57.96s) --- PASS: TestAccBedrockAgentAgent_agentCollaboration (59.26s) --- PASS: TestAccBedrockAgentAgentCollaborator_basic (62.39s) --- PASS: TestAccBedrockAgentAgent_singlePromptUpdate (62.55s) --- PASS: TestAccBedrockAgentAgentCollaborator_multiCollaborator (62.79s) --- PASS: TestAccBedrockAgentAgent_kms (70.65s) --- PASS: TestAccBedrockAgentAgentAlias_routingUpdate (72.63s) --- PASS: TestAccBedrockAgentAgentAlias_update (72.78s) --- PASS: TestAccBedrockAgentAgent_tags (75.81s) --- PASS: TestAccBedrockAgentAgent_update (79.08s) --- PASS: TestAccBedrockAgentAgentCollaborator_update (80.52s) --- PASS: TestAccBedrockAgentAgentAlias_tags (83.10s) --- PASS: TestAccBedrockAgentAgent_guardrail (94.58s) --- PASS: TestAccBedrockAgentAgent_addPrompt (98.92s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/bedrockagent 105.530s ```
…est config ```console % make testacc PKG=bedrockagent TESTS=TestAccBedrockAgentAgentCollaborator_multi make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.24.4 test ./internal/service/bedrockagent/... -v -count 1 -parallel 20 -run='TestAccBedrockAgentAgentCollaborator_multi' -timeout 360m -vet=off 2025/06/25 20:09:19 Creating Terraform AWS Provider (SDKv2-style)... 2025/06/25 20:09:19 Initializing Terraform AWS Provider (SDKv2-style)... --- PASS: TestAccBedrockAgentAgentCollaborator_multiCollaborator (57.29s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/bedrockagent 63.347s ```
```console % make testacc PKG=bedrockagent TESTS="TestAccBedrockAgentAgent_|TestAccBedrockAgentAgentAlias_|TestAccBedrockAgentAgentCollaborator_" make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.24.4 test ./internal/service/bedrockagent/... -v -count 1 -parallel 20 -run='TestAccBedrockAgentAgent_|TestAccBedrockAgentAgentAlias_|TestAccBedrockAgentAgentCollaborator_' -timeout 360m -vet=off 2025/06/26 09:27:19 Creating Terraform AWS Provider (SDKv2-style)... 2025/06/26 09:27:19 Initializing Terraform AWS Provider (SDKv2-style)... --- PASS: TestAccBedrockAgentAgent_singlePrompt (38.23s) --- PASS: TestAccBedrockAgentAgent_basic (38.92s) --- PASS: TestAccBedrockAgentAgent_full (41.35s) --- PASS: TestAccBedrockAgentAgentAlias_disappears (49.37s) --- PASS: TestAccBedrockAgentAgentAlias_basic (53.85s) --- PASS: TestAccBedrockAgentAgent_agentCollaboration (54.24s) --- PASS: TestAccBedrockAgentAgent_memoryConfiguration (59.00s) --- PASS: TestAccBedrockAgentAgentCollaborator_disappears (61.84s) --- PASS: TestAccBedrockAgentAgent_singlePromptUpdate (64.50s) --- PASS: TestAccBedrockAgentAgentCollaborator_basic (66.10s) --- PASS: TestAccBedrockAgentAgent_kms (69.04s) --- PASS: TestAccBedrockAgentAgentCollaborator_multiCollaborator (71.01s) --- PASS: TestAccBedrockAgentAgent_update (72.38s) --- PASS: TestAccBedrockAgentAgentAlias_routingUpdate (72.70s) --- PASS: TestAccBedrockAgentAgentAlias_update (77.03s) --- PASS: TestAccBedrockAgentAgent_tags (77.64s) --- PASS: TestAccBedrockAgentAgentAlias_tags (77.73s) --- PASS: TestAccBedrockAgentAgentCollaborator_update (80.60s) --- PASS: TestAccBedrockAgentAgent_guardrail (86.66s) --- PASS: TestAccBedrockAgentAgent_addPrompt (90.95s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/bedrockagent 96.855s ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
% make testacc PKG=bedrockagent TESTS="TestAccBedrockAgentAgent_|TestAccBedrockAgentAgentAlias_|TestAccBedrockAgentAgentCollaborator_"
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.24.4 test ./internal/service/bedrockagent/... -v -count 1 -parallel 20 -run='TestAccBedrockAgentAgent_|TestAccBedrockAgentAgentAlias_|TestAccBedrockAgentAgentCollaborator_' -timeout 360m -vet=off
2025/06/26 09:27:19 Creating Terraform AWS Provider (SDKv2-style)...
2025/06/26 09:27:19 Initializing Terraform AWS Provider (SDKv2-style)...
--- PASS: TestAccBedrockAgentAgent_singlePrompt (38.23s)
--- PASS: TestAccBedrockAgentAgent_basic (38.92s)
--- PASS: TestAccBedrockAgentAgent_full (41.35s)
--- PASS: TestAccBedrockAgentAgentAlias_disappears (49.37s)
--- PASS: TestAccBedrockAgentAgentAlias_basic (53.85s)
--- PASS: TestAccBedrockAgentAgent_agentCollaboration (54.24s)
--- PASS: TestAccBedrockAgentAgent_memoryConfiguration (59.00s)
--- PASS: TestAccBedrockAgentAgentCollaborator_disappears (61.84s)
--- PASS: TestAccBedrockAgentAgent_singlePromptUpdate (64.50s)
--- PASS: TestAccBedrockAgentAgentCollaborator_basic (66.10s)
--- PASS: TestAccBedrockAgentAgent_kms (69.04s)
--- PASS: TestAccBedrockAgentAgentCollaborator_multiCollaborator (71.01s)
--- PASS: TestAccBedrockAgentAgent_update (72.38s)
--- PASS: TestAccBedrockAgentAgentAlias_routingUpdate (72.70s)
--- PASS: TestAccBedrockAgentAgentAlias_update (77.03s)
--- PASS: TestAccBedrockAgentAgent_tags (77.64s)
--- PASS: TestAccBedrockAgentAgentAlias_tags (77.73s)
--- PASS: TestAccBedrockAgentAgentCollaborator_update (80.60s)
--- PASS: TestAccBedrockAgentAgent_guardrail (86.66s)
--- PASS: TestAccBedrockAgentAgent_addPrompt (90.95s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/bedrockagent 96.855s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
Thanks for your contribution, @drewtul! 👍 |
Warning This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. Please assume that the maintainers will not see them. Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed. |
This functionality has been released in v6.1.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the library.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
Description
Add an acceptance test that associates multiple collaborators to a supervisor.
Add retry handling for errors that can occur when multiple collaborators are being associated or disassociated from the supervisor.
Relations
Closes #42256
References
Output from Acceptance Testing