Skip to content

Workaround for GL canonical names without a commit ID and changes for ADR#306

Merged
NotTheEvilOne merged 3 commits intomainfrom
fix/workaround-broken-cnames-302
Feb 6, 2026
Merged

Workaround for GL canonical names without a commit ID and changes for ADR#306
NotTheEvilOne merged 3 commits intomainfrom
fix/workaround-broken-cnames-302

Conversation

@NotTheEvilOne
Copy link
Contributor

@NotTheEvilOne NotTheEvilOne commented Feb 5, 2026

What this PR does / why we need it:
This PR adds a workaround as we currently have a misalignment between tools handling Garden Linux canonical names. Furthermore it adds some described expectations from ADR "S3 Artifact and Metadata Publishing Contract Between Builder and GLCI" currently implemented in tools utilizing S3 uploads that is under consideration.

Which issue(s) this PR fixes:
Fixes #302
Related gardenlinux/gardenlinux#4268

@codecov
Copy link

codecov bot commented Feb 5, 2026

Codecov Report

❌ Patch coverage is 88.67925% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.68%. Comparing base (7535722) to head (3431f2d).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/gardenlinux/features/cname.py 86.66% 4 Missing ⚠️
src/gardenlinux/s3/s3_artifacts.py 88.88% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #306      +/-   ##
==========================================
- Coverage   91.73%   91.68%   -0.05%     
==========================================
  Files          42       42              
  Lines        2105     2129      +24     
==========================================
+ Hits         1931     1952      +21     
- Misses        174      177       +3     

☔ View full report in Codecov by Sentry.
📢 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 fix/workaround-broken-cnames-302 branch 5 times, most recently from 0717508 to ae5d482 Compare February 6, 2026 07:37
@NotTheEvilOne NotTheEvilOne changed the title Add workaround to accept GL canonical names without a commit ID Workaround for GL canonical names without a commit ID and changes for ADR Feb 6, 2026
@NotTheEvilOne NotTheEvilOne force-pushed the fix/workaround-broken-cnames-302 branch 3 times, most recently from 949ab91 to 1f66a76 Compare February 6, 2026 07:52
Copy link
Contributor

@nkraetzschmar nkraetzschmar left a comment

Choose a reason for hiding this comment

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

Small bug: the gardenlinux_epoch field in the metadata is incorrectly formatted as a set. (wasn't changed in this PR, but with these fixes I'm now for the first time able to test this locally, so only spotted this now)

Besides that LGTM 🚀

"build_committish": commit_hash,
"build_committish": commit_id_or_hash,
"build_timestamp": datetime.fromtimestamp(release_timestamp).isoformat(),
"gardenlinux_epoch": {version_epoch},
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"gardenlinux_epoch": {version_epoch},
"gardenlinux_epoch": version_epoch,

@NotTheEvilOne NotTheEvilOne force-pushed the fix/workaround-broken-cnames-302 branch 2 times, most recently from e6dde4e to ea0581f Compare February 6, 2026 11:18
# -*- coding: utf-8 -*-

RELEASE_DATA = """
GARDENLINUX_CNAME="container-amd64-1234.1-abc123lo"
Copy link
Contributor

Choose a reason for hiding this comment

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

This does not match the current format of the release file, so for the tests to be meaningful this should probably be changed to container-amd64-1234.1.

This value is of course conditional on what decision we take on gardenlinux/gardenlinux#4267 but until then it might make sense to have the tests validate against an input matching the real release file.

Maybe we can just take an actual release file from the 1877.10 release here instead of a dummy one 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

While the cname is no longer relevant for the S3 artifact upload I changed it back. I would like to keep the dummy file for this PR as changing values here would require additional tests to be changed.

@NotTheEvilOne NotTheEvilOne force-pushed the fix/workaround-broken-cnames-302 branch from ea0581f to e207f10 Compare February 6, 2026 14:14
Fixes: #302
Signed-off-by: Tobias Wolf <wolf@b1-systems.de>
On-behalf-of: SAP <tobias.wolf@sap.com>
…names

Related: #4268
Signed-off-by: Tobias Wolf <wolf@b1-systems.de>
On-behalf-of: SAP <tobias.wolf@sap.com>
…r it

Signed-off-by: Tobias Wolf <wolf@b1-systems.de>
On-behalf-of: SAP <tobias.wolf@sap.com>
@NotTheEvilOne NotTheEvilOne force-pushed the fix/workaround-broken-cnames-302 branch from e207f10 to 3431f2d Compare February 6, 2026 14:20
Copy link
Contributor

@nkraetzschmar nkraetzschmar left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@NotTheEvilOne NotTheEvilOne merged commit b71d79d into main Feb 6, 2026
14 of 16 checks passed
@NotTheEvilOne NotTheEvilOne deleted the fix/workaround-broken-cnames-302 branch February 6, 2026 16:52
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.

CName.load_from_release_file() enforces pre-parsed cname consistency instead of treating the release file as authoritative

2 participants