Skip to content

Fix and enhance OCI image and index handling - #402

Merged
NotTheEvilOne merged 6 commits into
mainfrom
feature/reproducable-sorted-oci-image-layers
Nov 26, 2026
Merged

NotTheEvilOne merged 6 commits into
mainfrom
feature/reproducable-sorted-oci-image-layers

Conversation

@NotTheEvilOne

@NotTheEvilOne NotTheEvilOne commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:
This PR touches multiple code lines working together to produce a reproducable sorting of OCI image layers and fix digest calculation.

Code after this change:

  • Sort OCI image layers alphabetically not random based on underlying file entry listing.
  • Generate additional OCI image annotations if a CName is set to a manifest: io.gardenlinux.image.os-id (OS release ID), org.opencontainers.image.vendor (SAP SE)
  • Correctly shortens the commit ID used for io.gardenlinux.image.artifact-base-name only
  • Adds support for platform like gl-oci add-image-to-index --platform linux/arm64

@NotTheEvilOne
NotTheEvilOne requested a review from a team November 22, 2026 14:58
@NotTheEvilOne NotTheEvilOne self-assigned this Nov 22, 2026
@codecov

codecov Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.49593% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.19%. Comparing base (40c7531) to head (a6eaeac).

Files with missing lines Patch % Lines
src/gardenlinux/oci/__main__.py 12.50% 7 Missing ⚠️
src/gardenlinux/oci/image_manifest.py 98.14% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #402      +/-   ##
==========================================
+ Coverage   91.11%   91.19%   +0.08%     
==========================================
  Files          51       51              
  Lines        3207     3260      +53     
==========================================
+ Hits         2922     2973      +51     
- Misses        285      287       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@NotTheEvilOne
NotTheEvilOne force-pushed the feature/reproducable-sorted-oci-image-layers branch from c6af3e4 to adaa2f3 Compare November 25, 2026 10:38
@NotTheEvilOne NotTheEvilOne changed the title Support of reproducable sorted OCI image layers Fix and enhance OCI image and index handling Nov 25, 2026
Comment thread src/gardenlinux/oci/index.py Resolved
Comment thread src/gardenlinux/oci/index.py Resolved
@NotTheEvilOne
NotTheEvilOne force-pushed the feature/reproducable-sorted-oci-image-layers branch 3 times, most recently from 34a2c6a to 3520592 Compare November 25, 2026 12:15
@NotTheEvilOne NotTheEvilOne added this to the 2026-11 milestone Nov 26, 2026
@NotTheEvilOne NotTheEvilOne added the bug-fix Fixes a bug label Nov 26, 2026
@NotTheEvilOne
NotTheEvilOne force-pushed the feature/reproducable-sorted-oci-image-layers branch from 3520592 to 0724560 Compare November 26, 2026 09:16
Signed-off-by: Tobias Wolf <wolf@b1-systems.de>
On-behalf-of: SAP <tobias.wolf@sap.com>
…igests

Signed-off-by: Tobias Wolf <wolf@b1-systems.de>
On-behalf-of: SAP <tobias.wolf@sap.com>
Signed-off-by: Tobias Wolf <wolf@b1-systems.de>
On-behalf-of: SAP <tobias.wolf@sap.com>
@NotTheEvilOne
NotTheEvilOne force-pushed the feature/reproducable-sorted-oci-image-layers branch from 0724560 to 25e84a9 Compare November 26, 2026 09:22
Comment thread src/gardenlinux/oci/__main__.py Resolved
Signed-off-by: Tobias Wolf <wolf@b1-systems.de>
On-behalf-of: SAP <tobias.wolf@sap.com>
nkraetzschmar
nkraetzschmar previously approved these changes Nov 26, 2026

@nkraetzschmar nkraetzschmar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 🚀

Signed-off-by: Tobias Wolf <NotTheEvilOne@users.noreply.github.com>
yeoldegrove
yeoldegrove previously approved these changes Nov 26, 2026
nkraetzschmar
nkraetzschmar previously approved these changes Nov 26, 2026
Signed-off-by: Tobias Wolf <wolf@b1-systems.de>
On-behalf-of: SAP <tobias.wolf@sap.com>
@NotTheEvilOne
NotTheEvilOne merged commit b625eeb into main Nov 26, 2026
18 checks passed
@NotTheEvilOne
NotTheEvilOne deleted the feature/reproducable-sorted-oci-image-layers branch November 26, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants