Skip to content

refactor(vm): source runtime pins only from pins.env - #4373

Merged
elezar merged 1 commit into
NVIDIA:mainfrom
benoitf:refactor/dedupe-vm-runtime-pins/benoitf
Oct 13, 2026
Merged

elezar merged 1 commit into
NVIDIA:mainfrom
benoitf:refactor/dedupe-vm-runtime-pins/benoitf

Conversation

@benoitf

@benoitf benoitf commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Summary

The VM runtime scripts loaded pins.env optionally and kept their own copies of the LIBKRUN_REF and UMOCI_VERSION defaults, so bumping a pin meant updating the same value in several files. This PR makes pins.env the only place these values are defined. Bumping a pin now touches one file.

Related Issue

Follow-up to this review discussion on #4282, which asked why the pin was not specified only once in pins.env.

Changes

  • Source pins.env without 2>/dev/null || true in the 5 VM scripts, so they fail if the file is missing.
  • Remove the duplicated LIBKRUN_REF defaults from build-libkrun.sh and build-libkrun-macos.sh.
  • Remove the duplicated UMOCI_VERSION defaults from compress-vm-runtime.sh, download-kernel-runtime.sh, and package-vm-runtime.sh.
  • In build-libkrun.sh, remove the code paths that ran with no pinned ref, now that LIBKRUN_REF and LIBKRUNFW_REF are always set. An invalid LIBKRUN_REF now fails at checkout. Before, a trailing || true let the build continue on upstream HEAD.

Environment overrides such as LIBKRUN_REF=v1.19.4 tasks/scripts/vm/build-libkrun.sh still work. pins.env assigns each pin as VAR="${VAR:-<default>}", so a value set in the environment takes precedence.

Testing

  • Checks appropriate to the affected code and behavior pass (bash -n on all VM scripts; pins.env is now the only file under tasks/ and crates/ that defines these pins; source pins.env keeps an env-provided LIBKRUN_REF)
  • Unit tests added/updated (if applicable)
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

@copy-pr-bot

copy-pr-bot Bot commented Oct 9, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

The VM runtime scripts sourced pins.env optionally and duplicated the
LIBKRUN_REF and UMOCI_VERSION defaults, so every bump had to update the
same value in several files.

Require pins.env, drop the duplicated defaults, and fail on an invalid
LIBKRUN_REF instead of silently building upstream HEAD. Environment
overrides still take precedence through the defaults in pins.env.

Signed-off-by: Florent Benoit <fbenoit@redhat.com>
@benoitf
benoitf force-pushed the refactor/dedupe-vm-runtime-pins/benoitf branch from 5583ed4 to ac0d48e Compare October 9, 2026 13:10
@benoitf

benoitf commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

cc @elezar @TaylorMutch following discussion #4282 (comment)

@elezar elezar added the test:e2e Requires end-to-end coverage label Oct 12, 2026
@github-actions

Copy link
Copy Markdown

Label test:e2e applied, but pull-request/4373 does not exist yet. A maintainer needs to comment /ok to test ac0d48e6711f690be5fef707a5c8a85c938270cf to mirror this PR. Once the mirror exists, re-apply the label or re-run Branch E2E Checks from the Actions tab.

@elezar

elezar commented Oct 12, 2026

Copy link
Copy Markdown
Member

/ok-to-test ac0d48e

@elezar elezar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed at ac0d48e. No actionable issues found. Verified Bash syntax, pin defaults and environment overrides, checkout success/fallback/failure handling, and fail-fast behavior when pins.env is missing. Full runtime builds were not run; merge remains contingent on required CI passing.

@elezar
elezar added this pull request to the merge queue Oct 13, 2026
Merged via the queue into NVIDIA:main with commit cf6ec17 Oct 13, 2026
115 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants