Timeout when using release-cli on private runners
<!--- Please read this! Before opening a new issue, make sure to search for keywords in the issues (including closed ones) - https://gitlab.com/gitlab-org/release-cli/issues and verify the issue you're about to submit isn't a duplicate. ---> ### Summary The `release-cli` command inside our `gitlab-ci.yml` produces a timeout when run on a private runner. <!-- Summarize the bug encountered concisely. --> ### Steps to reproduce * Add a step in `gitlab-ci.yml` to create a release. Example: ```yml 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. <!-- Describe how one can reproduce the issue - this is very important. Please use an ordered list. --> ### Example Project <!-- If possible, please create an example project here on GitLab.com that exhibits the problematic behavior, and link to it here in the bug report. If you are using an older version of GitLab, this will also determine whether the bug is fixed in a more recent version. --> N/A ### What is the current *bug* behavior? <!-- Describe what actually happens. --> 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? <!-- Describe what you should see instead. --> 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 ``` <!-- Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise. --> ### Output of checks <!-- If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com --> 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 <!-- If you can, link to the line of code that might be responsible for the problem. --> /cc @jaime
issue