Skip to content

Various tools related tweaks#106

Merged
jlebon merged 4 commits intocoreos:mainfrom
jlebon:pr/tools-tweaks
Apr 10, 2026
Merged

Various tools related tweaks#106
jlebon merged 4 commits intocoreos:mainfrom
jlebon:pr/tools-tweaks

Conversation

@jlebon
Copy link
Copy Markdown
Member

@jlebon jlebon commented Apr 10, 2026

Bunch of tweaks I did as part of doing various algo tests and tweaks for #97.

jlebon added 4 commits April 10, 2026 16:15
`skopeo inspect` on container-storage images may or may not return
compressed sizes rather than uncompressed sizes depending on how the
image was imported.

Switch to using the layer sizes in `podman history` if available, which
is always going to be the uncompressed size. Ideally we'd always used a
compressed size here since that's actually the data amount on the wire
and that's what we're minimizing, but comparing compression possibly
done by different compressors is awkward. But most of all though we
should deifnitely not compare images with different size semantics.
I.e. chunk images which are already local. This is useful e.g. for
Fedora images manually downloaded from pungi composes (because Fedora
doesn't keep historical tags in its repos).
I found this useful when using the manifest output for doing various
analyses and testing tweaks to the algorithm in a more lightweight way.
Use the new -t/--tag switch added in dc805a6 to embed the target image
name directly in the OCI archive. This lets podman load tag the image
automatically, removing the need to parse the image ID from podman load
output and manually call podman tag.

Assisted-by: OpenCode (Claude Opus 4.6)
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for the containers-storage transport across the image processing toolset, enabling operations on local images. Key updates include the addition of a stability field to the manifest component in src/cmd_build.rs, and logic in analyze-layer-reuse.py to backfill uncompressed layer sizes using podman history for more accurate reporting. The chunk-image-series.py script was also refactored to handle local image tagging and listing via podman. Feedback was provided regarding the robustness of the layer size extraction logic in analyze-layer-reuse.py to prevent potential TypeError exceptions when encountering null values in JSON output.

Comment thread tools/analyze-layer-reuse.py
@jlebon jlebon enabled auto-merge (rebase) April 10, 2026 20:29
@jlebon jlebon merged commit 347e63a into coreos:main Apr 10, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant