aws/aws-sdk-go-v2/service/s3/manager is deprecated in favour of
aws/aws-sdk-go-v2/feature/s3/transfermanager
(aws/aws-sdk-go-v2#3306). golangci-lint
has been flagging this as five SA1019 hits on main for several CI
runs, so every PR inherits a failing Lint code check.
Where it hits
upload/upload.go:133 — manager.NewUploader(s3Client)
upload/upload.go:224 — uploader.Upload(ctx, …)
upload/upload.go:229 — func(u *manager.Uploader) option callback
list/list_test.go:90 — manager.NewUploader(s3Client) (test fixture)
list/list_test.go:94 — uploader.Upload(context.Background(), …) (test fixture)
Scope
- Swap imports to
feature/s3/transfermanager.
- Port uploader construction (constructor signature differs — the new
package is instance-style with transfermanager.New(s3Client, opts...)).
- Port the
Uploader options callback (progress-bar wiring in
upload.go:229 — confirm the equivalent hook on the new type).
- Update the test fixture in
list/list_test.go to match.
- Re-run
golangci-lint run --timeout 5m locally to confirm main
goes green before merge.
Out of scope
- Behavioural changes to upload chunking, concurrency, or retry
semantics beyond what the new package's defaults enforce. If the
migration requires tuning to match current behaviour, keep that
within this PR; larger rewrites belong in a follow-up.
Why now
Having a failing Lint code check on main makes it hard to use
lint as a merge gate on downstream work (see the #663 stack, starting
with #679). Unblocking this first keeps every stacked PR's CI signal
honest.
aws/aws-sdk-go-v2/service/s3/manageris deprecated in favour ofaws/aws-sdk-go-v2/feature/s3/transfermanager(aws/aws-sdk-go-v2#3306).
golangci-linthas been flagging this as five
SA1019hits onmainfor several CIruns, so every PR inherits a failing
Lint codecheck.Where it hits
upload/upload.go:133—manager.NewUploader(s3Client)upload/upload.go:224—uploader.Upload(ctx, …)upload/upload.go:229—func(u *manager.Uploader)option callbacklist/list_test.go:90—manager.NewUploader(s3Client)(test fixture)list/list_test.go:94—uploader.Upload(context.Background(), …)(test fixture)Scope
feature/s3/transfermanager.package is instance-style with
transfermanager.New(s3Client, opts...)).Uploaderoptions callback (progress-bar wiring inupload.go:229— confirm the equivalent hook on the new type).list/list_test.goto match.golangci-lint run --timeout 5mlocally to confirmmaingoes green before merge.
Out of scope
semantics beyond what the new package's defaults enforce. If the
migration requires tuning to match current behaviour, keep that
within this PR; larger rewrites belong in a follow-up.
Why now
Having a failing
Lint codecheck onmainmakes it hard to uselint as a merge gate on downstream work (see the #663 stack, starting
with #679). Unblocking this first keeps every stacked PR's CI signal
honest.