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

Remove leading ./ from S3 object key name -- AWS SDK for Go v1 compatibility #35223

Merged
merged 4 commits into from
Jan 11, 2024

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Jan 10, 2024

Description

Removes any leading ./ from S3 object key names to maintain AWS SDK for Go v1 compatibility.

Relations

Relates #33358.
Relates #35220.
Relates hashicorp/terraform#34279.

Output from Acceptance Testing

% make testacc TESTARGS='-run=TestAccS3ObjectDataSource_' PKG=s3 ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 2  -run=TestAccS3ObjectDataSource_ -timeout 360m
=== RUN   TestAccS3ObjectDataSource_basic
=== PAUSE TestAccS3ObjectDataSource_basic
=== RUN   TestAccS3ObjectDataSource_basicViaAccessPoint
=== PAUSE TestAccS3ObjectDataSource_basicViaAccessPoint
=== RUN   TestAccS3ObjectDataSource_readableBody
=== PAUSE TestAccS3ObjectDataSource_readableBody
=== RUN   TestAccS3ObjectDataSource_kmsEncrypted
=== PAUSE TestAccS3ObjectDataSource_kmsEncrypted
=== RUN   TestAccS3ObjectDataSource_bucketKeyEnabled
=== PAUSE TestAccS3ObjectDataSource_bucketKeyEnabled
=== RUN   TestAccS3ObjectDataSource_allParams
=== PAUSE TestAccS3ObjectDataSource_allParams
=== RUN   TestAccS3ObjectDataSource_objectLockLegalHoldOff
=== PAUSE TestAccS3ObjectDataSource_objectLockLegalHoldOff
=== RUN   TestAccS3ObjectDataSource_objectLockLegalHoldOn
=== PAUSE TestAccS3ObjectDataSource_objectLockLegalHoldOn
=== RUN   TestAccS3ObjectDataSource_leadingSlash
=== PAUSE TestAccS3ObjectDataSource_leadingSlash
=== RUN   TestAccS3ObjectDataSource_multipleSlashes
=== PAUSE TestAccS3ObjectDataSource_multipleSlashes
=== RUN   TestAccS3ObjectDataSource_singleSlashAsKey
=== PAUSE TestAccS3ObjectDataSource_singleSlashAsKey
=== RUN   TestAccS3ObjectDataSource_leadingDotSlash
=== PAUSE TestAccS3ObjectDataSource_leadingDotSlash
=== RUN   TestAccS3ObjectDataSource_leadingMultipleSlashes
=== PAUSE TestAccS3ObjectDataSource_leadingMultipleSlashes
=== RUN   TestAccS3ObjectDataSource_checksumMode
=== PAUSE TestAccS3ObjectDataSource_checksumMode
=== RUN   TestAccS3ObjectDataSource_metadata
=== PAUSE TestAccS3ObjectDataSource_metadata
=== RUN   TestAccS3ObjectDataSource_metadataUppercaseKey
=== PAUSE TestAccS3ObjectDataSource_metadataUppercaseKey
=== RUN   TestAccS3ObjectDataSource_directoryBucket
=== PAUSE TestAccS3ObjectDataSource_directoryBucket
=== CONT  TestAccS3ObjectDataSource_basic
=== CONT  TestAccS3ObjectDataSource_multipleSlashes
--- PASS: TestAccS3ObjectDataSource_basic (20.61s)
=== CONT  TestAccS3ObjectDataSource_checksumMode
--- PASS: TestAccS3ObjectDataSource_multipleSlashes (33.81s)
=== CONT  TestAccS3ObjectDataSource_directoryBucket
--- PASS: TestAccS3ObjectDataSource_checksumMode (20.36s)
=== CONT  TestAccS3ObjectDataSource_metadataUppercaseKey
--- PASS: TestAccS3ObjectDataSource_directoryBucket (22.10s)
=== CONT  TestAccS3ObjectDataSource_metadata
--- PASS: TestAccS3ObjectDataSource_metadataUppercaseKey (33.31s)
=== CONT  TestAccS3ObjectDataSource_leadingDotSlash
--- PASS: TestAccS3ObjectDataSource_metadata (20.68s)
=== CONT  TestAccS3ObjectDataSource_leadingMultipleSlashes
=== CONT  TestAccS3ObjectDataSource_singleSlashAsKey
--- PASS: TestAccS3ObjectDataSource_leadingDotSlash (32.12s)
--- PASS: TestAccS3ObjectDataSource_leadingMultipleSlashes (32.66s)
=== CONT  TestAccS3ObjectDataSource_allParams
--- PASS: TestAccS3ObjectDataSource_singleSlashAsKey (11.18s)
=== CONT  TestAccS3ObjectDataSource_leadingSlash
--- PASS: TestAccS3ObjectDataSource_allParams (25.11s)
=== CONT  TestAccS3ObjectDataSource_objectLockLegalHoldOn
--- PASS: TestAccS3ObjectDataSource_leadingSlash (33.39s)
=== CONT  TestAccS3ObjectDataSource_objectLockLegalHoldOff
--- PASS: TestAccS3ObjectDataSource_objectLockLegalHoldOn (25.34s)
=== CONT  TestAccS3ObjectDataSource_kmsEncrypted
--- PASS: TestAccS3ObjectDataSource_objectLockLegalHoldOff (24.41s)
=== CONT  TestAccS3ObjectDataSource_bucketKeyEnabled
--- PASS: TestAccS3ObjectDataSource_kmsEncrypted (21.59s)
=== CONT  TestAccS3ObjectDataSource_readableBody
--- PASS: TestAccS3ObjectDataSource_bucketKeyEnabled (21.17s)
=== CONT  TestAccS3ObjectDataSource_basicViaAccessPoint
--- PASS: TestAccS3ObjectDataSource_readableBody (20.90s)
--- PASS: TestAccS3ObjectDataSource_basicViaAccessPoint (19.96s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/s3	222.361s

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 size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/s3 Issues and PRs that pertain to the s3 service. labels Jan 10, 2024
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jan 10, 2024
@ewbankkit ewbankkit added the bug Addresses a defect in current functionality. label Jan 10, 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=TestAccS3ObjectDataSource_' PKG=s3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/s3/... -v -count 1 -parallel 20  -run=TestAccS3ObjectDataSource_ -timeout 360m

--- PASS: TestAccS3ObjectDataSource_singleSlashAsKey (14.87s)
--- PASS: TestAccS3ObjectDataSource_checksumMode (23.90s)
--- PASS: TestAccS3ObjectDataSource_basic (24.04s)
--- PASS: TestAccS3ObjectDataSource_directoryBucket (24.44s)
--- PASS: TestAccS3ObjectDataSource_readableBody (25.12s)
--- PASS: TestAccS3ObjectDataSource_metadata (25.27s)
--- PASS: TestAccS3ObjectDataSource_bucketKeyEnabled (25.27s)
--- PASS: TestAccS3ObjectDataSource_kmsEncrypted (25.28s)
--- PASS: TestAccS3ObjectDataSource_basicViaAccessPoint (26.05s)
--- PASS: TestAccS3ObjectDataSource_objectLockLegalHoldOff (28.06s)
--- PASS: TestAccS3ObjectDataSource_allParams (28.17s)
--- PASS: TestAccS3ObjectDataSource_objectLockLegalHoldOn (28.18s)
--- PASS: TestAccS3ObjectDataSource_metadataUppercaseKey (33.79s)
--- PASS: TestAccS3ObjectDataSource_leadingDotSlash (34.10s)
--- PASS: TestAccS3ObjectDataSource_multipleSlashes (34.14s)
--- PASS: TestAccS3ObjectDataSource_leadingMultipleSlashes (34.18s)
--- PASS: TestAccS3ObjectDataSource_leadingSlash (34.18s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/s3 37.771

@ewbankkit ewbankkit merged commit a7fdef9 into main Jan 11, 2024
65 checks passed
@ewbankkit ewbankkit deleted the t-s3-object-key-extra-clean branch January 11, 2024 12:57
@github-actions github-actions bot added this to the v5.32.0 milestone Jan 11, 2024
github-actions bot pushed a commit that referenced this pull request Jan 11, 2024
Copy link

This functionality has been released in v5.32.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 bug Addresses a defect in current functionality. label Jan 12, 2024
@justinretzolk justinretzolk added the bug Addresses a defect in current functionality. label Feb 10, 2024
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 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/s3 Issues and PRs that pertain to the s3 service. size/L 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.

3 participants