Skip to content

[CI] Fix wrong EOS tag validation in validate_ci_input_variables script

Description

The validate_ci_input_variables CI script does not succeed validating an EOS image tag

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

which is correctly 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. I am suspecting that this might be due to an error message printed in the output of the podman command being used which is misinterpreted as an error. I try to remove this warning by setting the log output to error (--log-level=error), that means changing the output from the current:

[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",

[...]

to:

[cirunner@ctadev12 ~]$ podman --log-level=error manifest inspect gitlab-registry.cern.ch/dss/eos/eos-ci:9a1939e5.el9
{
    "schemaVersion": 2,
    "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
[...]

The python command now exits with no error message printed in STDERR:

>>> image = "gitlab-registry.cern.ch/dss/eos/eos-ci:9a1939e5.el9"
>>> cmd = f"podman --log-level=error manifest inspect {image}"
>>>
>>>
>>> result = subprocess.run(cmd,
...                                   shell = True,
...                                   stdout = subprocess.PIPE,
...                                   stderr = subprocess.PIPE,
...                                   text = True,
...                                   check = True,
...                                   timeout = 120)
>>> print("Exit Code:", result.returncode)
Exit Code: 0
>>> print("STDERR:\n", result.stderr)
STDERR:

[...]

as opposed to previous:

>>> import subprocess
>>>
>>> image = "gitlab-registry.cern.ch/dss/eos/eos-ci:9a1939e5.el9"
>>> cmd = f"podman manifest inspect {image}"
>>>
>>> result = subprocess.run(
...     cmd,
...     shell=True,
...     check=True,
...     stdout=subprocess.PIPE,
...     stderr=subprocess.PIPE,
...     text=True
... )
>>>
>>>
>>> cmd = f"podman --log-level=error manifest inspect {image}"
>>>
>>>
>>> result = subprocess.run(cmd,
...                                   shell = True,
...                                   stdout = subprocess.PIPE,
...                                   stderr = subprocess.PIPE,
...                                   text = True,
...                                   check = True,
...                                   timeout = 120)

>>> print("Exit Code:", result.returncode)
Exit Code: 0
>>> print("STDERR:\n", result.stderr)
STDERR:
 time="2025-07-22T14:12:23+02:00" level=warning msg="The manifest type application/vnd.docker.distribution.manifest.v2+json is not a manifest list but a single image."

Checklist

  • Documentation reflects the changes made.
  • Merge Request title is clear, concise, and suitable as a changelog entry. See this link

References

Closes #1241 (closed)

Edited by Jaroslav Guenther

Merge request reports

Loading