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

adding support for NoSuchTagSetError #28530

Merged
merged 3 commits into from
Feb 11, 2023

Conversation

myst3k
Copy link
Contributor

@myst3k myst3k commented Dec 22, 2022

Description

Adds support for S3-Compatible services which respond to Tag Requests with "NoSuchTagSetError" instead of "NoSuchTagSet". The current implementation only checks for "NoSuchTagSet" and fails if "NoSuchTagSetError" is received. This should allow both compliant and non-compliant implementations to return gracefully.

References

The ambiguity was originally described here:

// S3 API Reference (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html)

Output from Acceptance Testing

$ make testacc TESTS=TestAccS3Bucket_Tags_ignoreTags PKG=s3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20 -run='TestAccS3Bucket_Tags_ignoreTags'  -timeout 180m
=== RUN   TestAccS3Bucket_Tags_ignoreTags
=== PAUSE TestAccS3Bucket_Tags_ignoreTags
=== CONT  TestAccS3Bucket_Tags_ignoreTags
--- PASS: TestAccS3Bucket_Tags_ignoreTags (47.16s)
PASS
ok    github.com/hashicorp/terraform-provider-aws/internal/service/s3 49.701s

$ make testacc TESTS=TestAccS3Bucket_Tags_withSystemTags PKG=s3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20 -run='TestAccS3Bucket_Tags_withSystemTags'  -timeout 180m
=== RUN   TestAccS3Bucket_Tags_withSystemTags
=== PAUSE TestAccS3Bucket_Tags_withSystemTags
=== CONT  TestAccS3Bucket_Tags_withSystemTags
--- PASS: TestAccS3Bucket_Tags_withSystemTags (119.73s)
PASS
ok    github.com/hashicorp/terraform-provider-aws/internal/service/s3 122.462s

$ make testacc TESTS=TestAccS3BucketObject_ignoreTags PKG=s3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20 -run='TestAccS3BucketObject_ignoreTags'  -timeout 180m
=== RUN   TestAccS3BucketObject_ignoreTags
=== PAUSE TestAccS3BucketObject_ignoreTags
=== CONT  TestAccS3BucketObject_ignoreTags
--- PASS: TestAccS3BucketObject_ignoreTags (47.12s)
PASS
ok    github.com/hashicorp/terraform-provider-aws/internal/service/s3 49.724s

$ make testacc TESTS=TestAccS3Object_ignoreTags PKG=s3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20 -run='TestAccS3Object_ignoreTags'  -timeout 180m
=== RUN   TestAccS3Object_ignoreTags
=== PAUSE TestAccS3Object_ignoreTags
=== CONT  TestAccS3Object_ignoreTags
--- PASS: TestAccS3Object_ignoreTags (45.43s)
PASS
ok    github.com/hashicorp/terraform-provider-aws/internal/service/s3 48.021s

@github-actions
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 needs-triage Waiting for first response or review from a maintainer. size/XS Managed by automation to categorize the size of a PR. service/s3 Issues and PRs that pertain to the s3 service. labels Dec 22, 2022
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @myst3k 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Jan 4, 2023
Copy link
Contributor

@gdavison gdavison left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, @myst3k. Looks good 🚀

No acceptance tests needed.

@gdavison gdavison merged commit e3ade2d into hashicorp:main Feb 11, 2023
@github-actions github-actions bot added this to the v4.55.0 milestone Feb 11, 2023
@github-actions
Copy link

This functionality has been released in v4.55.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
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/s3 Issues and PRs that pertain to the s3 service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants