snap: install compatible prebuilt cargo-c - #1747
Conversation
|
The snap build has been failing for me locally and this fixes it. I'm not happy with the fix though, because dependabot won't update this pinning of the cargo-c version. |
|
I cherry-picked your commit, along with a8d9794 in #1723 to fix the failing CI builds.. We need to ensure this doesn't occur again, Copilot suggests the following solutions:
|
0f9c2b4 to
5bfc8e9
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1747 +/- ##
=======================================
Coverage 84.97% 84.97%
=======================================
Files 25 25
Lines 1943 1943
=======================================
Hits 1651 1651
Misses 292 292 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
I did that now. I'll wait for CI results of the "Build broker snap" step before marking as ready for review |
There was a problem hiding this comment.
Pull request overview
This PR fixes Snap build breakages caused by cargo-c’s increasing Rust MSRV by switching to a pinned, checksum-verified prebuilt cargo-cbuild binary, decoupling broker builds from cargo-c’s compile-time requirements. It also adds automation to keep the pinned cargo-c version and checksums up to date via a scheduled workflow PR.
Changes:
- Update the msentraid Snap build to install a prebuilt
cargo-cbuildinstead of compilingcargo-cfrom crates.io. - Add a shared
install-cargo-cscript that downloads the correct release asset per-architecture and validates SHA-256. - Add a scheduled GitHub workflow to open automated PRs when a new stable
cargo-crelease is available (updating version + checksums).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| snap/variants/msentraid/snapcraft.yaml | Switches Snap build step to use the shared prebuilt cargo-cbuild installer (and adds curl). |
| authd-oidc-brokers/tools/install-cargo-c | New installer script to fetch and checksum-verify cargo-cbuild release assets for x86_64/aarch64. |
| authd-oidc-brokers/internal/providers/msentraid/himmelblau/generate.sh | Uses the shared installer so generator builds don’t depend on compiling cargo-c. |
| .github/workflows/update-cargo-c.yaml | New scheduled workflow to bump pinned cargo-c version/checksums via automated PR. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
edd47b3 to
16684ca
Compare
seems to work fine |
16684ca to
96f5a55
Compare
nooreldeenmansour
left a comment
There was a problem hiding this comment.
LGTM, few small suggestions
33ebede to
2bc9bd3
Compare
c9a09d5 to
b3b5acd
Compare
Fresh broker Snap builds failed when cargo-c raised its Rust MSRV beyond the Rust version used by libhimmelblau. Install a verified prebuilt cargo-c release instead, so cargo-c's build-time toolchain does not constrain the project toolchain. Share the installer with the Himmelblau generator and record checksums for each supported architecture to keep the builds reproducible. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Open a weekly pull request for each new stable cargo-c release so the verified Snap installer stays current without tracking unreleased commits. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The go-sanity and go-tests jobs run on ephemeral GitHub-hosted runners, so each run re-downloads and reinstalls cargo-c from scratch even when the pinned version hasn't changed. Cache the installed cargo-cbuild binary, keyed on the install-cargo-c script's contents, to skip the redundant download on unchanged runs. The self-hosted TICS runner isn't affected: its filesystem persists across runs, so the installer's own skip-if-already-installed check already avoids re-downloading there without needing a cache action. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2077508 to
c3dacc2
Compare
Fresh broker Snap builds fail when cargo-c is compiled with Rust 1.94: new cargo-c releases require a newer compiler before libhimmelblau can build.
Install cargo-c's verified prebuilt release binary instead, decoupling its own build-time MSRV from the broker toolchain. The shared installer is used by both the Snap build and Himmelblau generator, and validates architecture- specific SHA-256 checksums.
Add a weekly workflow that opens a PR only for new stable cargo-c GitHub releases. It updates the pinned version and release-asset checksums so each upgrade is reviewed and validated by the normal PR checks.
Closes #1748
UDENG-11052