Actually validate the ISO registry - #2534
Merged
Merged
Conversation
Contributor
Hello francoisferrand,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
validate_registry() never validated anything: `..` also walks sequences, and yq treats indexing one with a string key as a hard error rather than a miss. It ran inside a process substitution, so the failure was invisible, the loop body never ran, and every build reported "all images are present" — including builds shipping an ISO with a missing image. Restrict the search to mapping nodes, and read the list into a variable so a failing yq or an empty result aborts the build instead of passing silently. Issue: ZENKO-5358
francoisferrand
force-pushed
the
bugfix/ZENKO-5358-validate-registry
branch
from
September 16, 2026 05:46
30d8251 to
e1098f2
Compare
francoisferrand
requested review from
a team,
DarkIsDude and
SylvainSenechal
September 16, 2026 05:47
francoisferrand
changed the base branch from
development/2.14
to
development/2.16
September 16, 2026 05:47
DarkIsDude
approved these changes
Sep 16, 2026
SylvainSenechal
approved these changes
Sep 16, 2026
Contributor
Author
|
/approve |
Contributor
|
I have successfully merged the changeset of this pull request
The following branches have NOT changed:
This pull request did not target the following hotfix branch(es) so they
Please check the status of the associated issue ZENKO-5358. Goodbye francoisferrand. The following options are set: approve |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
validate_registrywas meant to abort the ISO build when an image referenced byzenkoversion.yamlis missing from the registry. It has never checked a single image...walks sequence nodes too (spec.capabilities.lifecycleRules,locationTypes), and yq treats indexing one with a string key as a hard error rather than a miss:yq evaluates the whole expression before emitting anything, so a single sequence anywhere in the file empties the entire output — position doesn't matter. It ran inside a process substitution, so
set -enever fired, the loop body never ran,missingstayed 0, and every build printed "Registry validation passed: all images are present."Restricting the traversal to mapping nodes yields the expected 34 references. The list is now read into a variable first, so a yq failure or an empty result aborts instead of silently validating nothing — the original shape hid the exit status twice over.
Also adds coverage under
tests/scripts/, since nothing exercised this function: all-present passes, each missing image aborts, and unreadable/empty input aborts. Those cases all pass against the previous code, which is the point.Verification
Against the real
zenkoversion.yaml, with one image absent from a tempIMAGES_ROOT:missing=0→ passes, missing image undetectedmissing=1→ abortsNew tests: 6 of 7 fail against the previous code, all 7 pass after. Full
pytest tests/scripts/green (18), also run under the CI-pinned yq 4.44.3 as well as the 4.53.6 on the runners.Cross-checked that turning the check on doesn't expose latent breakage: all 34 referenced images are among the 37 the build copies, so CI stays green.
Based on
development/2.14—validate_registrydoesn't exist on 2.11–2.13, so this is the earliest affected branch.Issue: ZENKO-5358