Validate CI/CD job image reference format
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to solve
When using Kubernetes executor runners (and possibly other types), jobs that specify an image with a invalid reference format (e.g. node:10:16.0
instead of node:10.16.0
) end up with a runner_system_failure
build failure reason. This is misleading as the issue is generally not a systemic issue with the runners/host system, but a mistake in the project's .gitlab-ci.yml
.
Kubernetes event associated with this type of mistake:
60m Warning InspectFailed pod/runner-5u6znvzc-project-923-concurrent-3mlvtj Failed to apply default image tag "node:10:16.0": couldn't parse image reference "node:10:16.0": invalid reference format
Intended users
Further details
Sasha makes a simple typo when specifying an image in .gitlab-ci.yml
, but is able to understand the mistake right away based on clear, specific feedback from CI linting and/or job log, without needing to ask Devon for help.
Devon can use runner_system_failure
as an operational health indicator for runners they maintain, with less false positives due to non-systemic issues.
Proposal
Proposing to validate the format of the image reference explicitly (possibly part of linting .gitlab-ci.yml
, or at least sometime before actually attempting to run the job container), so that a more appropriate failure reason (image pull failure, invalid CI file) can be reported.