Add diagnostics logging for S3 cache AssumeRole operations

What does this MR do?

Add structured logging to track AssumeRole operation duration and role ARN when fetching credentials for S3 cache uploads. This helps diagnose issues with IAM role authentication on AWS EKS.

Why was this MR needed?

See: https://gitlab.com/gitlab-com/request-for-help/-/work_items/4098

What's the best way to test this MR?

Configure a role ARN that can upload to an S3 bucket:

log_level = "debug"
  [runners.cache]
    Type = "s3"
    MaxUploadedArchiveSize = 0
    [runners.cache.s3]
    RoleARN = "arn:aws:iam::<your role ARN>"

Run a CI job with a cache. You should see something like:

Successfully assumed role for cache credentials     duration_s=0.049795541 role_arn=arn:aws:iam::<your arn>

What are the relevant issue numbers?

Edited by Stan Hu

Merge request reports

Loading