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

d/aws_workspaces_bundle: Fix multiple WorkSpaces Bundles matched; use additional constraints to reduce matches to a single WorkSpaces Bundle regression #39777

Merged
merged 3 commits into from
Oct 17, 2024

Conversation

ewbankkit
Copy link
Contributor

Description

Return the first matching bundle, not the only matching bundle, when searching by name.

Relations

Closes #39775.

Output from Acceptance Testing

% make testacc TESTARGS='-run=TestAccWorkSpacesDataSource_serial/^Bundle$$' PKG=workspaces
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/workspaces/... -v -count 1 -parallel 20  -run=TestAccWorkSpacesDataSource_serial/^Bundle$ -timeout 360m
2024/10/17 13:11:42 Initializing Terraform AWS Provider...
=== RUN   TestAccWorkSpacesDataSource_serial
=== PAUSE TestAccWorkSpacesDataSource_serial
=== CONT  TestAccWorkSpacesDataSource_serial
=== RUN   TestAccWorkSpacesDataSource_serial/Bundle
=== RUN   TestAccWorkSpacesDataSource_serial/Bundle/basic
=== RUN   TestAccWorkSpacesDataSource_serial/Bundle/bundleIDAndNameConflict
=== RUN   TestAccWorkSpacesDataSource_serial/Bundle/byOwnerName
=== RUN   TestAccWorkSpacesDataSource_serial/Bundle/byOwnerNameMultiple
=== RUN   TestAccWorkSpacesDataSource_serial/Bundle/privateOwner
    bundle_data_source_test.go:143: AWS_WORKSPACES_BUNDLE_NAME env var must be set for AWS WorkSpaces private bundle acceptance test. This is required until AWS provides bundle creation API.
--- PASS: TestAccWorkSpacesDataSource_serial (43.22s)
    --- PASS: TestAccWorkSpacesDataSource_serial/Bundle (43.22s)
        --- PASS: TestAccWorkSpacesDataSource_serial/Bundle/basic (8.36s)
        --- PASS: TestAccWorkSpacesDataSource_serial/Bundle/bundleIDAndNameConflict (0.78s)
        --- PASS: TestAccWorkSpacesDataSource_serial/Bundle/byOwnerName (16.86s)
        --- PASS: TestAccWorkSpacesDataSource_serial/Bundle/byOwnerNameMultiple (17.21s)
        --- SKIP: TestAccWorkSpacesDataSource_serial/Bundle/privateOwner (0.00s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/workspaces	48.600s

@ewbankkit ewbankkit requested a review from a team as a code owner October 17, 2024 17:43
Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • 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 tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/workspaces Issues and PRs that pertain to the workspaces service. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Oct 17, 2024
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 TESTARGS='-run=TestAccWorkSpacesDataSource_serial/^Bundle$$' PKG=workspaces
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/workspaces/... -v -count 1 -parallel 20  -run=TestAccWorkSpacesDataSource_serial/^Bundle$ -timeout 360m
2024/10/17 14:06:26 Initializing Terraform AWS Provider...
=== RUN   TestAccWorkSpacesDataSource_serial
=== PAUSE TestAccWorkSpacesDataSource_serial
=== CONT  TestAccWorkSpacesDataSource_serial
=== RUN   TestAccWorkSpacesDataSource_serial/Bundle
=== RUN   TestAccWorkSpacesDataSource_serial/Bundle/byOwnerNameMultiple
=== RUN   TestAccWorkSpacesDataSource_serial/Bundle/privateOwner
    bundle_data_source_test.go:143: AWS_WORKSPACES_BUNDLE_NAME env var must be set for AWS WorkSpaces private bundle acceptance test. This is required until AWS provides bundle creation API.
=== RUN   TestAccWorkSpacesDataSource_serial/Bundle/basic
=== RUN   TestAccWorkSpacesDataSource_serial/Bundle/bundleIDAndNameConflict
=== RUN   TestAccWorkSpacesDataSource_serial/Bundle/byOwnerName
--- PASS: TestAccWorkSpacesDataSource_serial (43.55s)
    --- PASS: TestAccWorkSpacesDataSource_serial/Bundle (43.55s)
        --- PASS: TestAccWorkSpacesDataSource_serial/Bundle/byOwnerNameMultiple (18.19s)
        --- SKIP: TestAccWorkSpacesDataSource_serial/Bundle/privateOwner (0.00s)
        --- PASS: TestAccWorkSpacesDataSource_serial/Bundle/basic (8.29s)
        --- PASS: TestAccWorkSpacesDataSource_serial/Bundle/bundleIDAndNameConflict (0.74s)
        --- PASS: TestAccWorkSpacesDataSource_serial/Bundle/byOwnerName (16.34s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/workspaces 48.582s

@ewbankkit ewbankkit merged commit f8d4fe8 into main Oct 17, 2024
35 checks passed
@ewbankkit ewbankkit deleted the b-aws_workspace_bundle-regression branch October 17, 2024 18:14
@github-actions github-actions bot added this to the v5.73.0 milestone Oct 17, 2024
terraform-aws-provider bot pushed a commit that referenced this pull request Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/workspaces Issues and PRs that pertain to the workspaces service. 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.

[Bug]: data "aws_workspaces_bundle" returns more than one result in 5.72.1
2 participants