Add RoleARN to handle both upload and download S3 transfers
What does this MR do?
Previously UploadRoleARN was used to assume a role to upload files.
However, there are a number of reasons to do this on the download
as well:
- Faster transfers, as the AWS SDK v2 supports multipart downloads.
- Simplifies AWS workload identity support. Previously the
eks.amazonaws.com/role-arnannotation would be needed on both the runner manager and the runner config.
Why was this MR needed?
Users found that while UploadRoleARN increase CI cache uploads significantly, downloads took too long and timed out.
What's the best way to test this MR?
- Following the instructions for setting up an S3 cache with
UploadRoleARNin https://docs.gitlab.com/runner/configuration/advanced-configuration.html#enable-multipart-uploads-with-uploadrolearn, except create an AWS IAM role with permissions with boths3:PutObjectands3:GetObject. - Set
RoleARNinstead ofUploadRoleARN. - Run a CI job with a cache set.
What are the relevant issue numbers?
See #26921 (closed).
Edited by Stan Hu