Timeout when using release-cli on private runners
Summary
The release-cli
command inside our gitlab-ci.yml
produces a timeout when run on a private runner.
Steps to reproduce
- Add a step in
gitlab-ci.yml
to create a release. Example:
release-job:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
needs:
- job: prepare-release-job
artifacts: true
rules:
- if: '$RELEASE == "True"'
- if: '$CI_COMMIT_BRANCH == "master"'
script:
- echo 'running release_job'
- release-cli create --name "$TAG" --description "$DESCRIPTION" --tag-name "$TAG" --ref "$CI_COMMIT_SHA"
- Run a pipeline that triggers this job on a private runner.
- The associated job fails.
Example Project
N/A
What is the current bug behavior?
The release-cli
command returns a timeout error. I did not find any parameters to increase the value of the timeout.
Our runner runs on a VM with 4vCPU and 4Go RAM with CentOS, uses a docker executor, and allows maximum two jobs to run in parallel. We do not think it is a network issue because other calls to the API of GitLab work all the time (in other jobs, we call for example the update MR API without any issue), and all our calls with the release-cli
command from various projects always fail.
What is the expected correct behavior?
The release-cli
command works and creates a new release.
Relevant logs and/or screenshots
Output log:
time="2020-XX-XXTXX:XX:XXZ" level=fatal msg="failed to create release: failed to do request: Post https://gitlab.com/api/v4/projects/XXXXXXX/releases: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)" cli=release-cli version=0.4.0
Output of checks
This bug happens on GitLab.com
Possible fixes
Increase the timeout ? Add a parameter to specify it ?
- Add a
client-timeout
flag and increase the default value to 30s
/cc @jaime