fix: released contract artifact aztec version#23470
Open
benesjan wants to merge 2 commits into
Open
Conversation
The v4.3.0 release shipped contract artifact JSONs with aztec_version: "dev" baked in, because release-image/Dockerfile copies pre-built artifacts from an earlier stage where REF_NAME isn't set (so stamp_aztec_version in noir-projects/noir-contracts/bootstrap.sh falls back to "dev"). Mirror the stdlib/package.json stamp pattern (75fd494) to re-stamp aztec_version in every artifact under accounts/, noir-contracts.js/, and noir-test-contracts.js/ at image-build time. Also bypass the compat e2e assertContractArtifactsVersion() check narrowly for expected === "4.3.0" && aztecVersion === "dev" so the compat job stops failing against the already-published broken 4.3.0 artifacts. Other versions still fail loudly if they ever report "dev". Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
benesjan
commented
May 21, 2026
|
|
||
| # Stamp aztec_version into any published noir contract artifacts in artifacts/*.json. The build-time stamp in | ||
| # noir-projects/noir-contracts/bootstrap.sh writes "dev"; $version here is the authoritative release version about to | ||
| # be written to package.json. We cannot stamp real version in bootstrap because there we don't have access to it. |
Contributor
Author
There was a problem hiding this comment.
This is to have a correct version in the contracts of released docker images.
benesjan
commented
May 21, 2026
|
|
||
| # Stamp aztec_version into the shipped contract artifacts. The build-time stamp in | ||
| # noir-projects/noir-contracts/bootstrap.sh writes "dev" unconditionally; $VERSION here is the authoritative release | ||
| # version for this image. |
Contributor
Author
There was a problem hiding this comment.
This is (hopefully) the fix of the version in npm.js.
benesjan
commented
May 21, 2026
| } | ||
| // TODO(F-557): Remove once v4.3.0 drops off the compat matrix. The v4.3.0 npm release shipped with | ||
| // aztec_version: "dev" baked into the artifact JSONs because of a bug. | ||
| if (expected === '4.3.0' && aztecVersion === DEV_VERSION) { |
Contributor
Author
There was a problem hiding this comment.
This is just to make it shut up in ci-compat-e2e for the 4.3.0 version of artifacts that got incorrectly stamped with "dev".
benesjan
commented
May 21, 2026
| @@ -93,19 +93,16 @@ function get_contract_path { | |||
| } | |||
| export -f get_contract_path | |||
|
|
|||
Contributor
Author
There was a problem hiding this comment.
The code below never correctly stamped version so I simplified it to just stamp "dev" and then later on in the release process it gets re-stamped to the real release version (hopefully).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The v4.3.0 release shipped contract artifact JSONs with
aztec_version: "dev"baked in which resulted in a failure in ci-compat-e2e as there we check the artifact version matches the expected tested version that is injected in as an env var.On npm.js we see "dev" in the artifact:
The issue seems to be caused by REF_NAME not being correctly populated when doing the release which then results in "dev" being stamped into the released artifacts instead of the real version.
The fix is to re-stamp the version into artifact later on in the release process where we have a reliable access to the actual version.