Skip to content

Add AWS_DEBUG env variable for debugging S3 in Workhorse

What does this MR do and why?

This helped troubleshoot S3 compatibility issues for !198371 (merged).

How to set up and validate locally

  1. In env.runit, set:
export AWS_DEBUG=1
  1. gdk tail gitlab-workhorse

  2. Upload an attachment in an issue.

gdk tail gitlab-workhorse should show something like:

2025-07-22_05:38:27.81448 gitlab-workhorse        : SDK 2025/07/21 22:38:27 DEBUG Request
2025-07-22_05:38:27.81451 gitlab-workhorse        : PUT /tmp/uploads/1753162707-99274-0001-3824-aebfd0e0db90ab1173e570a6ea9566db?x-id=PutObject HTTP/1.1
2025-07-22_05:38:27.81451 gitlab-workhorse        : Host: gitlab.example.org
2025-07-22_05:38:27.81451 gitlab-workhorse        : User-Agent: aws-sdk-go-v2/1.36.6 ua/2.1 os/macos lang/go#1.24.5 md/GOOS#darwin md/GOARCH#arm64 api/s3#1.72.3 ft/s3-transfer m/E,G
2025-07-22_05:38:27.81452 gitlab-workhorse        : Content-Length: 54356
2025-07-22_05:38:27.81452 gitlab-workhorse        : Accept-Encoding: identity
2025-07-22_05:38:27.81452 gitlab-workhorse        : Amz-Sdk-Invocation-Id: a03e3622-cc42-4ad7-ab80-5fe0986341c3
2025-07-22_05:38:27.81453 gitlab-workhorse        : Amz-Sdk-Request: attempt=1; max=3
2025-07-22_05:38:27.81453 gitlab-workhorse        : Authorization: AWS4-HMAC-SHA256 Credential=YRZNDSMFL20KH1UG08X7/20250722/us-sea-1/s3/aws4_request, SignedHeaders=accept-encoding;amz-sdk-invocation-id;amz-sdk-request;content-length;content-type;host;x-amz-content-sha256;x-amz-date, Signature=edc8531044248e03605050c8376e914a93239a2d920d65e0b67aca0794f6c114
2025-07-22_05:38:27.81453 gitlab-workhorse        : Content-Type: application/octet-stream
2025-07-22_05:38:27.81454 gitlab-workhorse        : X-Amz-Content-Sha256: UNSIGNED-PAYLOAD
2025-07-22_05:38:27.81454 gitlab-workhorse        : X-Amz-Date: 20250722T053827Z
2025-07-22_05:38:27.81454 gitlab-workhorse        :
2025-07-22_05:38:27.99572 gitlab-workhorse        : SDK 2025/07/21 22:38:27 DEBUG Response
2025-07-22_05:38:27.99576 gitlab-workhorse        : HTTP/1.1 200 OK
2025-07-22_05:38:27.99576 gitlab-workhorse        : Content-Length: 0
2025-07-22_05:38:27.99577 gitlab-workhorse        : Accept-Ranges: bytes
2025-07-22_05:38:27.99577 gitlab-workhorse        : Connection: keep-alive
2025-07-22_05:38:27.99577 gitlab-workhorse        : Date: Tue, 22 Jul 2025 05:38:27 GMT
2025-07-22_05:38:27.99578 gitlab-workhorse        : Etag: "bbbca63cc933a50c698762a92679b27a"
2025-07-22_05:38:27.99578 gitlab-workhorse        : X-Amz-Request-Id: tx00000143bd28cf6095a29-00687f23d3-f8133e8c-default

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Stan Hu

Merge request reports

Loading