mirror of
https://github.com/ansible-collections/community.docker.git
synced 2025-12-16 11:58:43 +00:00
The parse_repository_tag() function was incorrectly parsing Docker image
references that contained both a tag and a digest (e.g., nginx:1.0@sha256:abc).
Previously, when splitting by '@' first, the tag would be included in the
repository name, resulting in incorrect parsing:
- Input: "nginx:1.0@sha256:abc123"
- Old output: ("nginx:1.0", "sha256:abc123")
- Expected: ("nginx", "1.0@sha256:abc123")
The fix now:
1. Checks for digest (@) separator first
2. Examines the part before the digest for a tag (:) separator
3. Combines tag and digest as "tag@digest" when both are present
Added test cases:
- test_index_image_tag_and_sha
- test_index_user_image_tag_and_sha
- test_private_reg_image_tag_and_sha
|
||
|---|---|---|
| .. | ||
| _api | ||
| _module_container | ||
| _common_api.py | ||
| _common_cli.py | ||
| _common.py | ||
| _compose_v2.py | ||
| _copy.py | ||
| _image_archive.py | ||
| _logfmt.py | ||
| _platform.py | ||
| _scramble.py | ||
| _socket_handler.py | ||
| _socket_helper.py | ||
| _swarm.py | ||
| _util.py | ||
| _version.py | ||