Skip to content

build: Calculate checksums after the nix fixup phase - #235

Merged
adamwg merged 1 commit into
crossplane:mainfrom
adamwg:awg/checkedsums
Jul 31, 2026
Merged

build: Calculate checksums after the nix fixup phase#235
adamwg merged 1 commit into
crossplane:mainfrom
adamwg:awg/checkedsums

Conversation

@adamwg

@adamwg adamwg commented Jul 30, 2026

Copy link
Copy Markdown
Member

Description of your changes

crossplane/crossplane#7467 reported that checksums for the amd64 crank binaries in our releases are incorrect. It turns out this applies to both the CLI (now the crossplane binary from this repository) and the core crossplane controller binary (the crossplane binary in c/c).

The issue is that Nix strips binaries in its fixup build phase, which runs after our postInstall hook. The stripping applies only to binaries for the host architecture, which in our release actions is always amd64.

Calculate checksums in the postFixup phase so that we checksum the already stripped binary. Add a checksum verification step before uploading artifacts to catch any similar issues in the future.

I have:

crossplane/crossplane#7467 reported that checksums for the amd64 crank binaries
in our releases are incorrect. It turns out this applies to both the CLI (now
the crossplane binary from this repository) and the core crossplane controller
binary (the crossplane binary in c/c).

The issue is that Nix strips binaries in its `fixup` build phase, which runs
after our `postInstall` hook. The stripping applies only to binaries for the
host architecture, which in our release actions is always amd64.

Calculate checksums in the `postFixup` phase so that we checksum the already
stripped binary. Add a checksum verification step before uploading artifacts to
catch any similar issues in the future.

Signed-off-by: Adam Wolfe Gordon <awg@upbound.io>
@adamwg
adamwg requested a review from jcogilvie as a code owner July 30, 2026 22:24
@adamwg
adamwg requested review from a team and tampakrap as code owners July 30, 2026 22:24
@adamwg
adamwg requested review from bobh66 and removed request for a team July 30, 2026 22:24
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 99f25533-0788-46df-9e39-b0c8457a4f4b

📥 Commits

Reviewing files that changed from the base of the PR and between 6f65d73 and 2b14f3d.

⛔ Files ignored due to path filters (1)
  • nix/build.nix is excluded by none and included by none
📒 Files selected for processing (1)
  • .github/workflows/ci.yml

📝 Walkthrough

Walkthrough

The CI workflow adds validation for generated artifacts by comparing each file’s SHA-256 digest with its adjacent checksum file and failing the build when a mismatch is detected.

Changes

Artifact validation

Layer / File(s) Summary
Validate generated artifact checksums
.github/workflows/ci.yml
The build-artifacts job checks each non-.sha256 file under result/ against its stored checksum and exits with failure on mismatches.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: bobh66

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise, under 72 characters, and accurately describes the checksum timing change.
Description check ✅ Passed The description clearly explains the checksum fix and artifact verification step, matching the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Breaking Changes ✅ Passed No files under apis/** or cmd/** changed; the PR only touches workflow/Nix files, so the breaking-changes check doesn’t apply.
Feature Gate Requirement ✅ Passed Diff only updates Nix checksum timing and CI artifact verification; no apis/** or runtime feature changes were added.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@adamwg
adamwg merged commit a3f848e into crossplane:main Jul 31, 2026
10 checks passed
@adamwg
adamwg deleted the awg/checkedsums branch July 31, 2026 15:51
@github-actions

Copy link
Copy Markdown

Git push to origin failed for release-2.3 with exitcode 1

@github-actions

Copy link
Copy Markdown

Git push to origin failed for release-2.4 with exitcode 1

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants