Skip to content

ci: cache code runner validation builds - #8290

Merged
danielkov merged 1 commit into
mainfrom
ci/cache-code-runner-validation
Oct 29, 2026
Merged

danielkov merged 1 commit into
mainfrom
ci/cache-code-runner-validation

Conversation

@danielkov

@danielkov danielkov commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Cache the pinned Monty installation, Docker build stages, and Go compilation artifacts in code runner validation CI. Preserve the existing Rust, restricted-container, and Go integration checks while avoiding repeated compilation on warm runs.

Motivation

The observed validation run spent 6m 37s building Monty on the host and another 8m 13s building and smoke-testing the image, before Go integration tests began. The existing Rust dependency cache does not retain the installed Monty binary, and the local Docker build has no cross-run layer cache.

Technical details

  • Key the Monty installation by its build script and Rust toolchain, without fallback keys. Keep its cache step after Rust setup so it saves before Rust cache cleanup.
  • Build and load the smoke-test image with Buildx and a dedicated GitHub Actions cache scope; skip only the mise image-build dependency when running the existing smoke test.
  • Cache Go modules and compiled packages, but use -count=1 so changes to external Rust/Monty executables cannot reuse a stale passing integration-test result.
  • Cold runs still compile both runtimes; savings depend on populated caches.

Summary by cubic

Caches pinned Monty, Docker build stages, and Go compilation artifacts in the code runner validation workflow so warm runs skip repeated builds.

  • Monty is cached by an exact key (build script and Rust toolchain); the cache saves right after Rust setup so the binary survives Rust cache cleanup.
  • The smoke-test image is built and loaded with Buildx using a GitHub Actions cache scope; the smoke test itself always runs and skips only its build dependency.
  • Go module and build caches use a restore key that falls back to the latest commit, but integration tests always run with -count=1 so stale external Rust/Monty executables can't pass.

Written for commit 9132732. Summary will update on new commits.

View guided diff Turn on auto-fix

@danielkov
danielkov requested a review from a team as a code owner October 29, 2026 21:48
@changeset-bot

changeset-bot Bot commented Oct 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9132732

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 1 file

View guided diff | Turn on auto-fix | Re-trigger cubic

@danielkov
danielkov enabled auto-merge October 29, 2026 21:54
@danielkov
danielkov added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit 7ff6694 Oct 29, 2026
51 of 52 checks passed
@danielkov
danielkov deleted the ci/cache-code-runner-validation branch October 29, 2026 22:57
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants