backup: Bump gocloud.dev to v0.47.0 for S3-compatible backup sink (19-3-stable backport)

What does this MR do?

Backport to 19-3-stable of !9466 (merged).

Bumps gocloud.dev from v0.46.0 to v0.47.0 to fix server-side repository backups against stricter S3-compatible object stores, adds a regression test, and aligns the tracing test helper's OpenTelemetry semconv version with the SDK the bump pulls in.

The Go 1.26 prerequisite (!9472 (merged)) has merged, so this branch is rebased on top of it.

Why

The server-side backup sink uploads via gocloud.dev/blob/s3blob. In v0.46.0 the s3blob writer set RequestChecksumCalculation on the S3 client but not on the transfermanager.Client it created. The transfer manager's own setting wins and defaults to WhenSupported, so request_checksum_calculation=when_required (which the backup sink injects by default for custom endpoints) never reached the upload-signing path. Uploads carried a flexible checksum, and on larger objects the aws-chunked streaming format (x-amz-content-sha256: STREAMING-UNSIGNED-PAYLOAD-TRAILER), which some S3-compatible stores (e.g. Dell ECS) reject with HTTP 400 XAmzContentSHA256Mismatch.

This was a regression in gocloud v0.46.0; v0.44.0 and v0.45.0 carried the setting onto the old s3/manager uploader. gocloud v0.47.0 threads it into the transfer manager's own options (https://github.com/google/go-cloud/pull/3766).

No Gitaly configuration change is required.

Contents

  • Bump gocloud.dev to v0.47.0.
  • Add TestS3SinkUploadSendsUnsignedPayload, which points the sink at a fake S3 HTTP server and asserts the PutObject carries no flexible checksum header. It fails on v0.46.0 and passes on v0.47.0.
  • internal/testhelper/tracing.go: move the semconv import from v1.41.0 to v1.43.0. The bump raises go.opentelemetry.io/otel/sdk from v1.44.0 to v1.46.0, whose resource.Default() reports semconv schema 1.43.0; merging that with a 1.41.0 resource makes resource.Merge fail with conflicting Schema URL, breaking every test that builds a stub tracer (e.g. client.TestDial_Tracing, gitcmd.TestTrace2TracingExporter). master and 19-4-stable already use semconv/v1.43.0.

Reported in https://gitlab.com/gitlab-com/request-for-help/-/work_items/5649

Edited by Stan Hu

Merge request reports

Loading
Loading