Skip to content

fix(s3): acls not working on aws sdk v2 #5904

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 2 commits into from
Jul 17, 2025
Merged

fix(s3): acls not working on aws sdk v2 #5904

merged 2 commits into from
Jul 17, 2025

Conversation

caarlos0
Copy link
Member

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
@caarlos0 caarlos0 self-assigned this Jul 15, 2025
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 15, 2025
Copy link

cloudflare-workers-and-pages bot commented Jul 15, 2025

Deploying goreleaser with  Cloudflare Pages  Cloudflare Pages

Latest commit: 078e96b
Status: ✅  Deploy successful!
Preview URL: https://c05c8803.goreleaser.pages.dev
Branch Preview URL: https://s3-fix.goreleaser.pages.dev

View logs

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Copy link

codecov bot commented Jul 17, 2025

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 82.65%. Comparing base (7903227) to head (078e96b).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
internal/pipe/blob/upload.go 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5904      +/-   ##
==========================================
- Coverage   82.68%   82.65%   -0.04%     
==========================================
  Files         165      165              
  Lines       16519    16519              
==========================================
- Hits        13659    13654       -5     
- Misses       2268     2273       +5     
  Partials      592      592              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@caarlos0 caarlos0 merged commit 37ecf0b into main Jul 17, 2025
15 of 17 checks passed
@caarlos0 caarlos0 deleted the s3-fix branch July 17, 2025 19:50
@caarlos0 caarlos0 requested a review from Copilot July 17, 2025 19:50
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request migrates S3 ACL functionality from AWS SDK v1 to AWS SDK v2 to fix issues where ACLs were not working properly. The migration removes the forced use of AWS SDK v1 and implements proper ACL validation using the v2 SDK's type system.

  • Replaces AWS SDK v1 imports with v2 equivalents for S3 operations
  • Removes the forced awssdk=v1 query parameter from S3 URLs
  • Implements ACL validation using AWS SDK v2's ObjectCannedACL enum types

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
internal/pipe/blob/upload.go Migrates S3 ACL handling from AWS SDK v1 to v2 with proper validation
internal/pipe/blob/blob_test.go Updates test expectations to remove awssdk=v1 parameter from URLs
go.mod Changes AWS SDK dependencies from direct to indirect for v1, direct for v2
Comments suppressed due to low confidence (1)

internal/pipe/blob/upload.go:123

  • [nitpick] The error message could be more helpful by listing the valid ACL values. Consider including the supported ACL options in the error message to guide users.
				return fmt.Errorf("invalid ACL %q", conf.ACL)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant