Skip to content

Fixing issue with validate_ci_input_variables CI script

As one can see from this pipeline: https://gitlab.cern.ch/cta/CTA/-/pipelines/12496255

the validate_ci_input_variables script did not succeed validating correct EOS tag

ERROR: Image tag '9a1939e5.el9' not found in repository 'gitlab-registry.cern.ch/dss/eos/eos-ci'

despite the tag being in the repository:

guenther@macbookpro ~ % skopeo list-tags docker://gitlab-registry.cern.ch/dss/eos/eos-ci | grep 9a1939e5
        "9a1939e5.el9",

Following the script and trying to reproduce this error locally failed !

There might be a mismatch in behavior between the manual terminal and the Python run_cmd wrapper. It works when trying to run the command manually - see below. In Python with check=True, even a non-error warning printed to stderr can trigger a CalledProcessError, depending on how podman sets exit codes in scripts. We can remove the check and check error codes explicitly, or remove the warnings by adding the --log-level=error flag to the command. Lets try the latter first.

[cirunner@ctadev12 ~]$ podman manifest inspect gitlab-registry.cern.ch/dss/eos/eos-ci:9a1939e5.el9
WARN[0000] The manifest type application/vnd.docker.distribution.manifest.v2+json is not a manifest list but a single image.
{
    "schemaVersion": 2,
    "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
    "config": {
        "mediaType": "application/vnd.docker.container.image.v1+json",
        "size": 4786,
        "digest": "sha256:6f338da52558b988f6334175948f6cd2b068c202ab9ba95204603f33aab7b644"
    },
[...]

https://gitlab.cern.ch/cta/CTA/-/blob/main/continuousintegration/checks/validate_ci_input_variables.py#L94

Edited by Jaroslav Guenther