Skip to content

fix(cache): verify seed payloads and explicitly cache GCC bootstrap - #669

Merged
castrojo merged 3 commits into
fix/fsdk-containers-cache-alignmentfrom
fix/cache-payload-completeness
Nov 14, 2026
Merged

castrojo merged 3 commits into
fix/fsdk-containers-cache-alignmentfrom
fix/cache-payload-completeness

Conversation

@castrojo

Copy link
Copy Markdown
Contributor

Problem

A direct check of GCC stage2 key 1ec8073d reported available metadata, but bst artifact pull could not retrieve its payload from any configured remote. kernel-cache.sh returned success whenever every target was reported available, without letting BuildStream check the payloads.

Fix

  • Remove the metadata-only early return. Native bst build must pull or rebuild and push the target artifacts; errors propagate.
  • Explicitly seed freedesktop-sdk.bst:bootstrap/build/gcc-stage2.bst so an otherwise cached Brew target cannot leave this expensive build-only compiler unpopulated.
  • Preserve the existing key-free graph guard, certificate-only module import, mTLS credentials, remote initialization failure check and credential cleanup.
  • Keep seeding on every main push: changes already sets release=true for push/main. Do not expose cache-write credentials to merge-group or PR code.

Verification

  • Regression failed before the fix: the seed incorrectly exited 0 instead of propagating build exit 19 when metadata claimed availability.
  • After the fix: 46 focused seed/workflow tests passed; shell syntax and pinned ruff passed.
  • just validate and docs checks passed. Actual 369-element seed graph includes GCC stage2 and no boot-keys element or duplicated SDK.
  • Operational verification still required after landing: successful main seed steps and a real remote payload pull, not metadata alone.

Sequencing and tradeoff

Stacked on #664; do not merge into its feature branch or enqueue before #664 lands. This preserves the running #664 full build. Retarget to main after #664 merges, then land this correction before resuming dependencies.

Fresh seed runners now download usable cached payloads rather than trusting metadata-only reports. This costs cache-read bandwidth but prevents false success and repeated compiler rebuilds in consumer builds.

Remote availability can advertise an artifact whose CAS payload cannot be pulled. Let BuildStream perform native pull/build/push checks instead of reporting seed success from metadata alone. Make the observed missing GCC stage2 compiler an explicit seed target, rather than relying on a build dependency being needed.

Assisted-by: GPT-6.1 via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: castrojo <castrojo@users.noreply.github.com>
@jeefy jeefy added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 14, 2026
@jeefy

jeefy commented Nov 14, 2026

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: castrojo

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

A native two-CAS test confirms that building a cached target leaves build-only dependencies outside the destination cache. Explicit artifact push --deps all pulls and replicates those dependencies. Only report successful seeding after replication succeeds.

Assisted-by: GPT-6.1 via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: castrojo <castrojo@users.noreply.github.com>
@castrojo

Copy link
Copy Markdown
Contributor Author

Verified the replication concern against the pinned bst2 image using two real isolated buildbox-casd servers, not just stubs:

  1. Native bst build DOES automatically push artifacts it pulls for the runtime plan; the broad claim that it never does is incorrect.
  2. A cached target DOES leave its build-only dependencies missing from the destination. The native test asserted they were absent before the explicit push.
  3. bst artifact push --deps all fetched and replicated them. After stopping the upstream CAS, a fresh client successfully pulled all three artifacts and checked out the actual target and build-dependency payloads from the destination alone.

Added the explicit push to the guarded seed graph. The new replication-failure regression failed before the change (false exit 0 instead of 23), then passed. All 47 focused tests, shell syntax, ruff, docs checks and just validate pass. #664 remains untouched; no build restart.

@jeefy

jeefy commented Nov 14, 2026

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: castrojo

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

PID 1 resets a correct 2026 RTC to the SDK build epoch in 2011 once its 15-year window expires, causing GPG to reject matching image keys as future-dated. Produce /usr/lib/clock-epoch from the pinned SDK year/month and restore its mtime after initrd clamping and before repart. Keep signature verification and SDK cache keys unchanged.

Assisted-by: GPT-6.1 via GitHub Copilot
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: castrojo <castrojo@users.noreply.github.com>
@castrojo

Copy link
Copy Markdown
Contributor Author

Consolidated into #664 by fast-forwarding its branch to 47ce75e, including dfb3337 and fbca5f6. The clock fix and all seeding corrections now live directly on the PR whose required boot checks must pass. No separate cache PR or second queue build is needed.

@castrojo castrojo closed this Nov 14, 2026
@castrojo
castrojo merged commit 47ce75e into fix/fsdk-containers-cache-alignment Nov 14, 2026
@jeefy

jeefy commented Nov 14, 2026

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: castrojo

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. author/clanker A contributor's own hive authored this PR under their login

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants