-
Notifications
You must be signed in to change notification settings - Fork 116
Open
Labels
bugResearched, reproducible, committed to fixResearched, reproducible, committed to fixnewNew issues and PRs to triagedNew issues and PRs to triaged
Description
ISSUE TYPE
- Bug Report
SUMMARY
ansible-navigator images fails with KeyError: 'tag' when using Docker 29.x due to JSON output schema changes in docker images --format json.
Docker 29 returns capitalized JSON keys (e.g. "Tag"), while ansible-navigator 26.1.2 expects lowercase keys (e.g. "tag"), causing a crash during image inspection.
ANSIBLE-NAVIGATOR VERSION
"ansible-navigator 26.1.2"
CONFIGURATION
No custom ansible-navigator.yaml present.
Container engine: docker (default)
LOG FILE
CRITICAL 'ansible_navigator.actions._actions.run_interactive' Subcommand 'images' encountered a fatal error.
ERROR 'ansible_navigator.actions._actions.run_interactive' Logging an uncaught exception
Traceback (most recent call last):
File ".../ansible_navigator/actions/_actions.py", line 202, in run_interactive
return run_action(app=app, interaction=interaction)
File ".../ansible_navigator/actions/images.py", line 240, in run
self._collect_image_list()
File ".../ansible_navigator/actions/images.py", line 457, in _collect_image_list
images, error = inspect_all(container_engine=self._args.container_engine)
File ".../ansible_navigator/image_manager/inspector.py", line 115, in inspect_all
result = cmd_runner.run_single_process(commands=images_list_class.commands)
File ".../ansible_navigator/command_runner/command_runner.py", line 124, in run_single_process
command.post_process(command)
File ".../ansible_navigator/image_manager/inspector.py", line 97, in parse
valid_images = [image for image in local_images if image["tag"] != "<none>"]
File ".../ansible_navigator/image_manager/inspector.py", line 97, in <listcomp>
valid_images = [image for image in local_images if image["tag"] != "<none>"]
KeyError: 'tag'
STEPS TO REPRODUCE
- Install Docker 29.x
- Install ansible-navigator 26.1.2 via pip or pipx.
- Run
ansible-navigator images
EXPECTED RESULTS
ansible-navigator images should list local container images without crashing, regardless of Docker JSON field capitalization changes.
ACTUAL RESULTS
The command crashes with:
KeyError: 'tag'
ADDITIONAL INFORMATION
Docker version 29.0.4, build 3247a5a
docker images --format json | head -n 1
{"Containers":"1","CreatedAt":"2026-02-16 08:07:02 +0100 CET","CreatedSince":"31 hours ago","Digest":"<none>","ID":"1ef93f0d9e75","Repository":"ddev/ddev-webserver","SharedSize":"N/A","Size":"1.27GB","Tag":"v1.24.10-efficare-built","UniqueSize":"N/A"}
Suggested fix: normalize keys (case-insensitive lookup) or explicitly handle both "tag" and "Tag" when parsing Docker image output.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugResearched, reproducible, committed to fixResearched, reproducible, committed to fixnewNew issues and PRs to triagedNew issues and PRs to triaged
Type
Projects
Status
No status