Fix archive idempotency. (#765)

This commit is contained in:
Felix Fontein 2024-01-20 14:12:55 +01:00 committed by GitHub
parent 648e0652d5
commit ac41379119
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,2 @@
bugfixes:
- "docker_image - fix archiving idempotency with Docker API 1.44 or later (https://github.com/ansible-collections/community.docker/pull/765)."

View File

@ -126,6 +126,12 @@ def archived_image_manifest(archive_path):
exc
)
for prefix in (
'blobs/sha256/', # Moby 25.0.0, Docker API 1.44
):
if image_id.startswith(prefix):
image_id = image_id[len(prefix):]
try:
repo_tags = m0['RepoTags']
except KeyError as exc: