Skip to content

Commit 3ac1a74

Browse files
benesjanclaude
authored andcommitted
feat: check noir release has nargo binaries before releasing (#22551)
## Summary - Adds a `check_noir_release_assets` function to root `bootstrap.sh` that queries the GitHub API to verify the noir release has nargo binary assets - Called from the `ci-release` case, right after semver validation and before the build starts -- so it fails fast and only runs during releases - Prevents releases like `v4.2.0-aztecnr-rc.2` where the noir tag existed but had no binaries, causing 404 errors when users ran `noirup` ## Test plan - [x] Verified `gh release view` query returns correct asset count against a known noir release (`v1.0.0-beta.3` → 5 assets) - [ ] CI passes Fixes https://linear.app/aztec-labs/issue/F-506/check-noir-binaries-exist-on-release --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a327ba7 commit 3ac1a74

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

noir/bootstrap.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,33 @@ function build {
9494
echo_header "noir build"
9595

9696
if semver check $REF_NAME; then
97+
# REF_NAME matches semver meaning we are doing a release
98+
9799
git -C noir-repo fetch --tags
98100
if ! git -C noir-repo describe --tags --exact-match HEAD &>/dev/null; then
99101
echo_stderr "We're building a release but the noir-repo HEAD is not an official release."
100102
exit 1
101103
fi
104+
105+
# Check that the noir release has nargo binaries available for download. Without this check, we could push an aztec
106+
# release that errors out with a 404/gzip error on install (the install scripts invoke noirup which would fail).
107+
local noir_tag=$(git -C noir-repo describe --tags --exact-match HEAD)
108+
echo "Checking noir release $noir_tag for nargo binary assets..."
109+
local asset_count
110+
asset_count=$(gh release view "$noir_tag" \
111+
--repo noir-lang/noir \
112+
--json assets \
113+
--jq '[.assets[] | select(.name | test("^nargo-"))] | length') || {
114+
echo_stderr "Error: Failed to query noir-lang/noir release '$noir_tag'. Does the release exist?"
115+
exit 1
116+
}
117+
if [ "$asset_count" -eq 0 ]; then
118+
echo_stderr "Error: Noir release '$noir_tag' exists but has no nargo binary assets."
119+
echo_stderr "Users will get 404 errors when trying to install nargo via noirup."
120+
echo_stderr "Ensure the noir release pipeline has finished uploading binaries before releasing aztec-packages."
121+
exit 1
122+
fi
123+
echo "Found $asset_count nargo binary asset(s) in noir release $noir_tag."
102124
fi
103125

104126
denoise "retry install_deps"

0 commit comments

Comments
 (0)