Skip to content

fix: e2e compat should not fail for contracts added after legacy stables#22900

Merged
mverzilli merged 2 commits into
backport-to-v4-next-stagingfrom
martin/troubleshoot-e2e-compat
May 4, 2026
Merged

fix: e2e compat should not fail for contracts added after legacy stables#22900
mverzilli merged 2 commits into
backport-to-v4-next-stagingfrom
martin/troubleshoot-e2e-compat

Conversation

@mverzilli
Copy link
Copy Markdown
Contributor

For example, this failure is a false positive: https://github.com/AztecProtocol/aztec-packages/actions/runs/25204430819/job/73902953105

This happened because the contract used to e2e test nested utility calls didn't exist back in 4.2.0. It's not a failure: it's a test that should trivially pass.

We do however log such cases, in case they help us trace subtler issues in the future.

mverzilli added 2 commits May 1, 2026 15:48
…ling

Legacy version directories under .legacy-contracts/<version>/ are immutable, so an artifact missing from the
cache means the contract was added after the pinned release. Throwing at resolve time made the whole suite fail
(e.g. e2e_nested_utility_calls under CONTRACT_ARTIFACTS_VERSION=4.2.0, since NestedUtility was added later);
silently falling back to the workspace artifact would be worse — the compat run would always pass while testing
nothing.

The resolver now logs the miss and exits the process with code 0. The test never runs, but the per-test CI log
line ("[legacy-contracts][jest] artifact X not in legacy cache @<ver>; ... treating as passed") makes the skip
auditable. Subsequent runs of the same versioned test command hit the existing test-result cache and surface as
the standard SKIPPED display.

Uses fs.writeSync(2, ...) to flush the explanatory line synchronously before process.exit, since
process.stderr.write may buffer when stderr is piped (as it is in CI).
@mverzilli mverzilli requested review from benesjan and nchamo May 1, 2026 15:56
@mverzilli mverzilli added the ci-compat-e2e Checks that contracts compiled in older stable versions still work on current stack. label May 3, 2026
Copy link
Copy Markdown
Contributor

@benesjan benesjan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense!

Thanks for cleaning my mess 👍

@mverzilli mverzilli merged commit 0b5d087 into backport-to-v4-next-staging May 4, 2026
21 checks passed
@mverzilli mverzilli deleted the martin/troubleshoot-e2e-compat branch May 4, 2026 08:30
@benesjan
Copy link
Copy Markdown
Contributor

benesjan commented May 4, 2026

Forward ported in #22930

AztecBot added a commit that referenced this pull request May 5, 2026
BEGIN_COMMIT_OVERRIDE
docs: add map and state variable docs  (#22824)
fix: e2e compat should not fail for contracts added after legacy stables
(#22900)
chore: fix kv-store browser tests hangs (#22721)
feat: kv-store sqlite backend with page level encryption (#22759)
fix: install node 22 for aztec-cli acceptance test (#22917)
feat: backport kv-store sqlite encryption (#22759) to v4-next (#22927)
fix(docs): correct llms.txt links for versioned developer docs (#22819)
feat(docs): improve discoverability of Aztec.nr API reference docs
(#22861)
feat(docs): backport improve discoverability of Aztec.nr API reference
docs (#22861) to v4-next (#22931)
feat(aztec-nr): add call_self stubs for utility functions (#22885)
docs: add map and state variable docs (backport #22824) (#22880)
refactor: `getPackageVersion` fn cleanup (#22941)
fix(ci): skip acceptance test for canary -commit. tags (#22951)
fix: closing db, correct stub side effects (#22939)
END_COMMIT_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-compat-e2e Checks that contracts compiled in older stable versions still work on current stack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants