Skip to content

feat(component-build): accept a prebuilt artifact and let callers skip cache mounts - #404

Merged
JesperTerkelsen merged 2 commits into
mainfrom
feat/component-build-prebuilt-artifact
Nov 15, 2026
Merged

JesperTerkelsen merged 2 commits into
mainfrom
feat/component-build-prebuilt-artifact

Conversation

@JesperTerkelsen

@JesperTerkelsen JesperTerkelsen commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

🏭 Factory Context
Session: Open in Factory
Requested by: @JesperTerkelsen

Intent

Lets a repo compile on the runner, with a compile cache kept on the runner side, and hand the result to the image build, instead of compiling inside Docker. Callers that don't set the two new inputs build exactly as before.

Decisions: the artifact lands in the build context root, and the caller opts out of cache mounts itself
  • prebuilt-artifact downloads a named artifact from an earlier job of the same run into the checkout before docker build; the Dockerfile COPY --chmods it, since artifacts drop file modes.
  • dockerfile-cache-mounts: false skips the restore, inject and save of the Dockerfile's cache mounts. On infra-portal they cost ~70 s to load and, when saved, ~135 s to extract and upload, which beat the compile time they saved (run).
  • Only deploy-generic-v2.yml forwards the inputs, the entry point infra-portal uses; the other deploy workflows can follow when a caller needs them (not discussed).
Verified: actionlint passes
  • actionlint on both changed workflows passes. First real run is infra-portal's PR that uses it.

Gaps

Thermo-nuclear review: no findings

Review of 4ede609

No findings.

  • component-build.yml: one input gates all three cache-mount steps with the same condition they already had; the download step runs only when an artifact is named, so existing callers' steps are unchanged.
  • deploy-generic-v2.yml: forwards both inputs with the same defaults as component-build.yml.

@JesperTerkelsen
JesperTerkelsen marked this pull request as ready for review November 15, 2026 06:30
@JesperTerkelsen
JesperTerkelsen requested a review from a team as a code owner November 15, 2026 06:30
@JesperTerkelsen
JesperTerkelsen requested review from tobias0106 and removed request for a team November 15, 2026 06:30
@JesperTerkelsen
JesperTerkelsen merged commit 664736b into main Nov 15, 2026
1 check passed
@JesperTerkelsen
JesperTerkelsen deleted the feat/component-build-prebuilt-artifact branch November 15, 2026 07:06
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.

2 participants