Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various patches to build extensions container using podman build in production #4044

Merged
merged 5 commits into from
Mar 18, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
lib/container_manifest: check for image before manifest
There's an asymmetry between `podman image exists` and `podman manifest
exists`. The first will return 1 if the image is a manifest. The second
will return 125 if the image is _not_ a manifest.

I think this is probably a bug in podman, but for now we can work around
this by reverting the order in which we do the checking. That way, if
the image exists but isn't a manifest, we'll return `True` and not
actually call `podman manifest exists` on it.
jlebon committed Mar 18, 2025

Verified

This commit was signed with the committer’s verified signature.
jlebon Jonathan Lebon
commit f0da6d2e433be25665a7047907745ebca7b9c89c
4 changes: 2 additions & 2 deletions src/cosalib/container_manifest.py
Original file line number Diff line number Diff line change
@@ -26,8 +26,8 @@ def local_container_manifest_or_image_exists(repo, tag):
@param repo str registry repository
@param tag str tag
'''
cmds = [["podman", "manifest", "exists", f"{repo}:{tag}"],
["podman", "image", "exists", f"{repo}:{tag}"]]
cmds = [["podman", "image", "exists", f"{repo}:{tag}"],
["podman", "manifest", "exists", f"{repo}:{tag}"]]
for cmd in cmds:
cp = runcmd(cmd, check=False)
# The commands returns 0 (exists), 1 (doesn't exist), 125 (other error)
Loading