fix: properly guard NoMount steps when disabled - #293
Merged
Merged
Conversation
nomount_commit is always resolved and passed, so the old 'nomount_commit != ...' guards were always true: Integrate NoMount ran even with use_nomount=false, and the metadata step then died resolving the missing NoMount-Metamodule artifact. Gate Integrate NoMount and the nomount parts of the metadata step on feature_set instead; emit N/A nomount fields with relaxed validation when disabled.
There was a problem hiding this comment.
🟡 Changes recommended
The workflow introduces uninitialized variables (NOMOUNT_ENABLED, METHOD, NOMOUNT_MODULE_COMMIT) under set -u and may now run the metadata step when SUSFS is disabled, causing build failures.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the kernel build GitHub Actions workflow to ensure NoMount-related steps are properly skipped when NoMount is not selected, and to allow the “Build-verified only” metadata artifact to be generated without requiring NoMount artifacts/fields.
Changes:
- Gate “Integrate NoMount” purely on
feature_setso it won’t run when NoMount is disabled. - Make NoMount metadata fields
N/Aand skip resolving theNoMount-Metamoduleartifact when NoMount is not enabled. - Split metadata JSON validation into NoMount-enabled vs NoMount-disabled branches.
File summaries
| File | Description |
|---|---|
| .github/workflows/build.yml | Adjusts NoMount gating and metadata generation/validation to support NoMount being optional. |
Review details
Suppressed comments (1)
.github/workflows/build.yml:633
- This step later uses
$METHODand$NOMOUNT_MODULE_COMMITunderset -u, but they are not initialized in this script nor exported via$GITHUB_ENVfrom earlier steps. This will make the metadata step fail with an unbound-variable error, and it can also cause commit mismatches in float mode ifinputs.nomount_commitis empty.
# NoMount is optional: only resolve its artifact when requested.
# (nomount_commit input is always populated, so feature_set is the
# only reliable signal for whether NoMount was integrated.)
NOMOUNT_ENABLED="false"
if [ "${{ contains(inputs.feature_set, 'NoMount') || inputs.feature_set == 'All' }}" = "true" ]; then
- Files reviewed: 1/1 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
621
to
623
| - name: Write Build-verified only artifact metadata | ||
| if: success() && inputs.root_flavor != '' && inputs.nomount_commit != '' | ||
| if: success() && inputs.root_flavor != '' | ||
| shell: bash |
Comment on lines
+555
to
+563
| if [ "$NOMOUNT_ENABLED" = "true" ]; then | ||
| NOMOUNT_SHA="${NOMOUNT_COMMIT:-${{ inputs.nomount_commit }}}" | ||
| NOMOUNT_MODULE_COMMIT="${{ inputs.nomount_commit }}" | ||
| METHOD="GKI source build with SHA-pinned root implementation, SUSFS, and NoMount" | ||
| else | ||
| NOMOUNT_SHA="N/A" | ||
| NOMOUNT_MODULE_COMMIT="N/A" | ||
| METHOD="GKI source build with SHA-pinned root implementation and SUSFS" | ||
| fi |
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.
Disabling NoMount (use_nomount=false) still broke the build: nomount_commit is always resolved, so the 'nomount_commit != ...' guards never skip. Integrate NoMount ran anyway, then the metadata step failed resolving the missing NoMount-Metamodule artifact. Gate both on feature_set; N/A nomount fields + relaxed validation when disabled.