Skip to content

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

Merged
merged 13 commits into from
Jun 26, 2025

Conversation

drewtul
Copy link
Contributor

@drewtul drewtul commented Jun 25, 2025

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

%  make testacc TESTARGS='-run=TestAccBedrockAgentAgent_\|TestAccBedrockAgentAgentCollaborator_' PKG=bedrockagent ACCTEST_PARALLELISM=4
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 4  -run=TestAccBedrockAgentAgent_\|TestAccBedrockAgentAgentCollaborator_ -timeout 360m -vet=off
2025/06/25 11:05:11 Creating Terraform AWS Provider (SDKv2-style)...
2025/06/25 11:05:11 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccBedrockAgentAgentCollaborator_basic
=== PAUSE TestAccBedrockAgentAgentCollaborator_basic
=== RUN   TestAccBedrockAgentAgentCollaborator_update
=== PAUSE TestAccBedrockAgentAgentCollaborator_update
=== RUN   TestAccBedrockAgentAgentCollaborator_disappears
=== PAUSE TestAccBedrockAgentAgentCollaborator_disappears
=== RUN   TestAccBedrockAgentAgent_basic
=== PAUSE TestAccBedrockAgentAgent_basic
=== RUN   TestAccBedrockAgentAgent_full
=== PAUSE TestAccBedrockAgentAgent_full
=== RUN   TestAccBedrockAgentAgent_singlePrompt
=== PAUSE TestAccBedrockAgentAgent_singlePrompt
=== RUN   TestAccBedrockAgentAgent_singlePromptUpdate
=== PAUSE TestAccBedrockAgentAgent_singlePromptUpdate
=== RUN   TestAccBedrockAgentAgent_addPrompt
=== PAUSE TestAccBedrockAgentAgent_addPrompt
=== RUN   TestAccBedrockAgentAgent_guardrail
=== PAUSE TestAccBedrockAgentAgent_guardrail
=== RUN   TestAccBedrockAgentAgent_update
=== PAUSE TestAccBedrockAgentAgent_update
=== RUN   TestAccBedrockAgentAgent_tags
=== PAUSE TestAccBedrockAgentAgent_tags
=== RUN   TestAccBedrockAgentAgent_kms
=== PAUSE TestAccBedrockAgentAgent_kms
=== RUN   TestAccBedrockAgentAgent_agentCollaboration
=== PAUSE TestAccBedrockAgentAgent_agentCollaboration
=== RUN   TestAccBedrockAgentAgent_memoryConfiguration
=== PAUSE TestAccBedrockAgentAgent_memoryConfiguration
=== CONT  TestAccBedrockAgentAgentCollaborator_basic
=== CONT  TestAccBedrockAgentAgent_addPrompt
=== CONT  TestAccBedrockAgentAgent_full
=== CONT  TestAccBedrockAgentAgentCollaborator_disappears
--- PASS: TestAccBedrockAgentAgent_full (34.94s)
=== CONT  TestAccBedrockAgentAgent_basic
--- PASS: TestAccBedrockAgentAgentCollaborator_disappears (48.92s)
=== CONT  TestAccBedrockAgentAgent_kms
--- PASS: TestAccBedrockAgentAgentCollaborator_basic (57.19s)
=== CONT  TestAccBedrockAgentAgent_memoryConfiguration
--- PASS: TestAccBedrockAgentAgent_basic (32.65s)
=== CONT  TestAccBedrockAgentAgent_agentCollaboration
--- PASS: TestAccBedrockAgentAgent_memoryConfiguration (32.41s)
=== CONT  TestAccBedrockAgentAgentCollaborator_update
--- PASS: TestAccBedrockAgentAgent_addPrompt (94.49s)
=== CONT  TestAccBedrockAgentAgent_singlePromptUpdate
--- PASS: TestAccBedrockAgentAgent_kms (56.22s)
=== CONT  TestAccBedrockAgentAgent_update
--- PASS: TestAccBedrockAgentAgent_agentCollaboration (45.36s)
=== CONT  TestAccBedrockAgentAgent_tags
--- PASS: TestAccBedrockAgentAgent_singlePromptUpdate (51.09s)
=== CONT  TestAccBedrockAgentAgent_guardrail
--- PASS: TestAccBedrockAgentAgentCollaborator_update (75.85s)
=== CONT  TestAccBedrockAgentAgent_singlePrompt
--- PASS: TestAccBedrockAgentAgent_update (69.64s)
--- PASS: TestAccBedrockAgentAgent_tags (67.82s)
--- PASS: TestAccBedrockAgentAgent_singlePrompt (30.98s)
--- PASS: TestAccBedrockAgentAgent_guardrail (87.28s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/bedrockagent       237.506s

Copy link

Community Guidelines

This 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

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/bedrockagent Issues and PRs that pertain to the bedrockagent service. size/M Managed by automation to categorize the size of a PR. partner Contribution from a partner. labels Jun 25, 2025
Adjust tests to resolve issues.
Add changelog.
@drewtul drewtul marked this pull request as ready for review June 25, 2025 10:37
@drewtul drewtul requested a review from a team as a code owner June 25, 2025 10:37
@jar-b jar-b self-assigned this Jun 25, 2025
@jar-b jar-b removed the needs-triage Waiting for first response or review from a maintainer. label Jun 25, 2025
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jun 25, 2025
drewtul and others added 5 commits June 25, 2025 16:57
@github-actions github-actions bot added the size/L Managed by automation to categorize the size of a PR. label Jun 25, 2025
jar-b added 2 commits June 25, 2025 15:50
```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
```
@github-actions github-actions bot added the size/XL Managed by automation to categorize the size of a PR. label Jun 26, 2025
```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
```
Copy link
Member

@jar-b jar-b left a 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

Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

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

LGTM 🚀.

@jar-b
Copy link
Member

jar-b commented Jun 26, 2025

Thanks for your contribution, @drewtul! 👍

@jar-b jar-b merged commit a8948d9 into hashicorp:main Jun 26, 2025
39 checks passed
Copy link

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.

@github-actions github-actions bot added this to the v6.1.0 milestone Jun 26, 2025
@drewtul drewtul deleted the b-agent-collabators-retry branch June 26, 2025 17:11
Copy link

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!

@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
partner Contribution from a partner. service/bedrockagent Issues and PRs that pertain to the bedrockagent service. size/L Managed by automation to categorize the size of a PR. size/M Managed by automation to categorize the size of a PR. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Creatiion of Bedrock Agent - Multi agent collaborators fails when multiple collaborators are added
3 participants