Unable to use 'me-central-1' for S3 cache bucket
## Summary <!-- Briefly summarize the bug --> Customer ([ZD internal link](https://gitlab.zendesk.com/agent/tickets/422563)) is trying to use cache bucket in relatively recently added S3 region `me-central-1` but runner is defaulting to using `us-east-1` endpoint. Customer is using runner version 14.9.0, but version of `minio-go` used by latest runner version is 7.0.28 which does not contain this region in its [endpoint map list](https://github.com/minio/minio-go/blob/v7.0.28/s3-endpoints.go). Minio-go version [7.0.58](https://github.com/minio/minio-go/blob/v7.0.58/s3-endpoints.go) includes several newer regions, including `me-central-1` (also `eu-central-2`. and `eu-south-2`). Can minio-go version be updated to support these new regions? (I wasn't sure about flagging this as a bug, but I didn't find anything in the docs restricting cache bucket endpoints to specific regions). ## Steps to reproduce <!-- What do you need to do to reproduce the bug? Please include job definitions or git repository structure if relevant --> Configure a version 16.1.0 runner to use an S3 cache bucket in AWS region `me-central-1`: ``` [runners.cache] Type = "s3" Path = "myrunner/cache" Shared = false [runners.cache.s3] ServerAddress = "s3.me-central-1.amazonaws.com" AccessKey = "access_key" SecretKey = "secret_key" BucketName = "gitlab-runner-cache" Insecure = false ``` Then configure a job to use the cache: ``` cache: key: binaries-cache paths: - binaries/*.apk - .config ``` Note that in the job log that the runner defaults to `us-east-1` region when uploading the cache and error results: ``` Uploading cache.zip to https://gitlab-runner-cache.s3.dualstack.us-east-1.amazonaws.com/myrunner/cache/runner/3oSyLruYx/project/5/binaries-cache-protected FATAL: received: 301 Moved Permanently Failed to create cache ``` <!-- Please add the definition of the job from `.gitlab-ci.yml` that is failing inside of the code blocks (```) below. --> <details> <summary> .gitlab-ci.yml </summary> ```yml Add the job definition that is failing here ``` </details> ## Actual behavior <!-- What actually happens --> ## Expected behavior <!-- What you should see instead --> ## Relevant logs and/or screenshots <!-- Paste the job logs inside of the code blocks (```) below so it would be easier to read. --> <details> <summary> job log </summary> ```sh Add the job log ``` </details> ## Environment description <!-- Are you using shared Runners on GitLab.com? Or is it a custom installation? Which executors are used? Please also provide the versions of related tools like `docker info` if you are using the Docker executor. --> <!-- Please add the contents of `config.toml` inside of the code blocks (```) below, remember to remove any secret tokens! --> <details> <summary> config.toml contents </summary> ```toml Add your configuration here ``` </details> ### Used GitLab Runner version <!-- Please run and paste the output of `gitlab-runner --version`. If you are using a Runner where you don't have access to, please paste at least the first lines the from build log, like: ``` Running with gitlab-ci-multi-runner 1.4.2 (bcc1794) Using Docker executor with image golang:1.8 ... ``` --> ## Possible fixes <!-- (If you can, link to the line of code that might be responsible for the problem) --->
issue