Skip to content

Commit b64044f

Browse files
BradyJ27dacbd
andauthored
runner: Convert idle-timeout="never" to 0 with GitLab driver (#1408)
* runner: Convert idle-timeout="never" to 0 with GitLab driver GitLab runners do not support "never" as an argument for --wait-timeout, instead this should be 0, which by default is no timeout. Fixes #1407 * Fix linting error * Update src/drivers/gitlab.js --------- Co-authored-by: Daniel Barnes <dabarnes2b@gmail.com>
1 parent cbd84c4 commit b64044f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/drivers/gitlab.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ class Gitlab {
200200
const { protocol, host } = new URL(this.repo);
201201
const { token } = await this.registerRunner({ tags: labels, name });
202202

203+
let waitTimeout = idleTimeout;
204+
if (idleTimeout === 'never') {
205+
waitTimeout = '0';
206+
}
207+
203208
let dockerVolumesTpl = '';
204209
dockerVolumes.forEach((vol) => {
205210
dockerVolumesTpl += `--docker-volumes ${vol} `;
@@ -210,7 +215,7 @@ class Gitlab {
210215
--url "${protocol}//${host}" \
211216
--name "${name}" \
212217
--token "${token}" \
213-
--wait-timeout ${idleTimeout} \
218+
--wait-timeout ${waitTimeout} \
214219
--executor "${IN_DOCKER ? 'shell' : 'docker'}" \
215220
--docker-image "iterativeai/cml:${gpu ? 'latest-gpu' : 'latest'}" \
216221
${gpu ? '--docker-runtime nvidia' : ''} \

0 commit comments

Comments
 (0)