fix(cicd): reject incomplete boot outputs before upload - #4657
Open
chet wants to merge 1 commit into
Open
Conversation
Contributor
Summary by CodeRabbit
WalkthroughChangesThe change adds output contracts for supported build types and architectures. It validates required files before upload, rejects invalid outputs, updates upload behavior, and adds unit-test coverage. Boot output validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
Sequence Diagram(s)sequenceDiagram
participant BuildWorkflow
participant validate_boot_outputs.py
participant BuildOutputs
participant ArtifactUpload
BuildWorkflow->>validate_boot_outputs.py: Validate build type, architecture, and repository root
validate_boot_outputs.py->>BuildOutputs: Check required, optional, and disabled outputs
BuildOutputs-->>validate_boot_outputs.py: Return filesystem validation results
validate_boot_outputs.py-->>BuildWorkflow: Return success or failure status
BuildWorkflow->>ArtifactUpload: Upload selected artifacts after successful validation
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Contributor
Author
|
@coderabbitai full_review, thanks! |
Contributor
|
✅ Action performedFull review finished. |
The reusable boot workflow used a warning-only file list, so a missing or empty required output could survive until an ephemeral-image or carrier job downloaded the bundle. This gives each active build and architecture an explicit contract and validates it at the producer before upload. - **Expected green-run effect:** Approximately neutral, with a small file-validation cost before upload. - **What it really buys us:** An incomplete boot bundle fails where it was produced, before we spend time and storage uploading it or start a downstream job that cannot succeed. Required outputs must be nonempty regular files, optional diagnostics stay optional, and the clean CI builders fail if the unused admin CLI appears, catching a redundant full-workspace build before it becomes normal again. Tests added! This supports NVIDIA#4651 Signed-off-by: Chet Nichols III <chetn@nvidia.com>
nv-dmendoza
approved these changes
Aug 6, 2026
nv-dmendoza
left a comment
Collaborator
There was a problem hiding this comment.
LGTM but with 1 question on removal of an if
| # `compression-level: 0` avoids re-deflating squashfs, BFB, and EFI files | ||
| # that are already compressed. | ||
| - name: Upload artifacts | ||
| if: ${{ !cancelled() }} # Upload artifacts even if build fails (matches GitLab CI 'when: always') |
Collaborator
There was a problem hiding this comment.
are we sure we want to upload artifacts always even on cancelled runs?
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.
The reusable boot workflow used a warning-only file list, so a missing or empty required output could survive until an ephemeral-image or carrier job downloaded the bundle. This gives each active build and architecture an explicit contract and validates it at the producer before upload.
The four contracts cover x86 boot, ARM/BFB boot, x86 ephemeral, and ARM ephemeral production uploads. Required outputs must be nonempty regular files rather than symlinks, optional diagnostics stay optional, and the clean CI builders fail if the unused admin CLI appears. That last check catches a redundant full-workspace build that no downstream job needs.
Related issues
This supports #4651
Type of Change
Breaking Changes
Testing
python3 -B -m unittest scripts.test_validate_boot_outputs python3 -B -m unittest discover -s scripts -p 'test_validate_boot_outputs.py' python3 -B scripts/validate_boot_outputs.py --help cargo make format-nightly cargo make clippy cargo make carbide-lintsAdditional Notes
Production upload is now success-only and uses
if-no-files-found: error; the separate failure-only ephemeralbuild.logupload remains best-effort. Boot failures remain in Actions step logs, and partial production bundles are deliberately not retained. Artifact names, retention, compression, and downstream download paths are unchanged.The unused
artifacts_jsonoutput and its second hand-maintained path list were removed after a repository-wide and NVIDIA code search found no consumers. #4579 still owns checksums, architecture inspection, realized manifests, and consumer-side verification.