Skip to content

feat(snap): switch to prebuilt binary model to avoid copying entire r…#1651

Open
zyga wants to merge 1 commit into
NVIDIA:mainfrom
zyga:feature/snap-perbuilt-binaries
Open

feat(snap): switch to prebuilt binary model to avoid copying entire r…#1651
zyga wants to merge 1 commit into
NVIDIA:mainfrom
zyga:feature/snap-perbuilt-binaries

Conversation

@zyga
Copy link
Copy Markdown
Contributor

@zyga zyga commented Jun 1, 2026

Summary

This PR changes the snapcraft build pipeline to reuse existing binaries built earlier in the pipeline.

Related Issue

Closes #1361

Changes

  • Link the snap build job with earlier artifact producing jobs
  • Download artifacts using action steps
  • Switch snapcraft.yaml source: to a sub-directory snap/prebuilt to avoid snapcraft having to copy the huge targets/ directory during local builds

Testing

  • mise run pre-commit passes
  • Unit tests added/updated
  • E2E tests added/updated (if applicable)

Checklist

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

…epo into LXD

Switch the snapcraft build from 'source: .' (which copies the full
20 GB repo including 18 GB of target/ and build artifacts into LXD)
to 'source: ./snap/prebuilt' (~130 MB of only the binaries and
metadata that snapcraft needs).

The snap-package workflow now downloads the same cli, gateway, and
supervisor binaries that other packaging jobs (deb, rpm, tarballs)
use. A new 'Prepare snap build directory' step assembles snap/prebuilt/
with the 3 binaries, gateway wrapper script, LICENSE, README.md, and
a precomputed version string — everything snapcraft needs without
any source tree access.

This addresses CI/CD Improvements (issue NVIDIA#1361) by reducing data
transferred into the LXD sandbox by ~150x and eliminating the need
for snapcraft to traverse the entire repository tree.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
@zyga zyga requested review from a team, derekwaynecarr, maxamillion and mrunalp as code owners June 1, 2026 13:32
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Jun 1, 2026

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.

Copy link
Copy Markdown
Collaborator

@SDAChess SDAChess left a comment

Choose a reason for hiding this comment

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

Did you manage to test run the CI changes? If so then they look good to me.

@zyga
Copy link
Copy Markdown
Contributor Author

zyga commented Jun 2, 2026

@SDAChess not quite, the pipeline is difficult to run on my self hosted or saas infra as it currently depends on container publishing. I ran a dry run mode of this by building the binaries and placing them in the right places and running snapcraft. I think we need to give it a try and see.

@NVIDIA NVIDIA deleted a comment from copy-pr-bot Bot Jun 2, 2026
@SDAChess
Copy link
Copy Markdown
Collaborator

SDAChess commented Jun 2, 2026

/ok-to-test ed9d470

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI/CD Improvements

2 participants