Repository navigation
release: name the mismatched fields in Ubuntu artifact manifest errors - #664
Open
Pedro Henrique Penna (ppenna) wants to merge 1 commit into
Open
Pedro Henrique Penna (ppenna) wants to merge 1 commit into
Pedro Henrique Penna (ppenna) wants to merge 1 commit into
Conversation
Before release packaging, each Ubuntu guest artifact in build/ must match its manifest, but the error named only the artifact. Telling a stale artifact from changed build inputs took a local reproduction, as for the Windows Package release failure that #599 fixed. Compare each manifest with the expected values, hashing each artifact once, and name the manifest and every mismatched field with the value that the manifest records, or missing, and the expected one. Digests appear in full, and the message keeps its prefix for log searches. Test a stale artifact, changed build inputs, two wrong fields, and a missing field, as #602 requires. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The narrow changes satisfy the diagnostic requirements with regression coverage and no identified blocking issues.
No open issues 🎉
What changed in this PR
Improves Ubuntu artifact manifest errors during release packaging, addressing #602 without changing validation criteria.
Changes:
- Reports every mismatched field, recorded and expected values, and the manifest filename.
- Preserves the error prefix and prints full digests.
- Adds regression coverage for stale artifacts, changed inputs, multiple mismatches, missing fields, and valid manifests.
| File | Description |
|---|---|
| scripts/test_nvx_tools.py | Verifies detailed mismatch messages and valid-manifest acceptance. |
| scripts/nvx_tools/release.py | Collects and formats Ubuntu manifest field mismatches. |
Review effort: Balanced
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.
Fixes #602.
Supersedes #604, which we could not accept because its Contributor License Agreement was not signed. This is a separate implementation of #602's requirements.
Summary
Before
scripts/nvx.py packagebuilds a release,_guest_release_inputschecks each Ubuntu guest artifact inbuild/against its manifest. Its error named only the artifact, so a stale artifact and changed build inputs looked the same.The check now compares each manifest with the expected
format,guest,artifact,artifact_sha256, andinput_sha256, hashing each artifact once. It names the manifest file and every mismatched field, with the value that the manifest records, ormissing, and the expected value. Values are printed as JSON, so digests appear in full.The message keeps its
Ubuntu artifact manifest does not match <artifact>prefix. The failure that Order Ubuntu converter inputs alike on every OS #599 fixed would now read:What the check accepts is unchanged. The Azure Linux, OpenVMM, kernel, and initramfs checks are out of scope, as release: name the mismatched fields in Ubuntu artifact manifest errors #602 states.
Test
test_guest_release_inputs_reject_stale_ubuntu_artifactsasserts that a stale artifact namesartifact_sha256with both digests, and notinput_sha256, for both artifacts.test_guest_release_inputs_reject_stale_ubuntu_source_inputsnow edits an Ubuntu build input and asserts that the message namesinput_sha256with both digests, and notartifact_sha256.test_guest_release_inputs_name_every_mismatched_ubuntu_manifest_fieldchecks that valid manifests pass, that two wrong fields are both named, and that a missing field is named as missing.dev, whose message names only the artifact.python -m unittest -k guest_release_inputs scripts/test_nvx_tools.py: 7 tests, OK.scripts/test_nvx_tools.py: 480 tests, OK (28 skipped).ruff check,ruff format --check, andpyrightfor Linux and Windows are clean.