Commit 8f34701
authored
fix: include standard-contracts artifacts in release image (#23753)
## Problem
V5 / `next` net deployments crash on startup with:
```
Error [ERR_MODULE_NOT_FOUND]: Cannot find module
'/usr/src/yarn-project/standard-contracts/artifacts/AuthRegistry.json'
imported from /usr/src/yarn-project/standard-contracts/dest/auth-registry/index.js
```
## Root cause
`release-image/Dockerfile.dockerignore` is an allowlist (`*` ignores
everything, then `!`-includes specific paths). It explicitly re-includes
the `artifacts/` directory for `protocol-contracts`,
`noir-contracts.js`, `accounts`, `simulator`, etc., and copies every
`dest/` via `!/yarn-project/*/dest/` — but it has **no** entry for
`standard-contracts/artifacts/`.
When auth-registry (and later public-checks / multi-call-entrypoint) was
demoted into the new `standard-contracts` package (#23106), the
allowlist was never updated. So the image ships
`standard-contracts/dest/` but not its artifacts. At container startup
the eager import in `dest/auth-registry/index.js` (`import
'../../artifacts/AuthRegistry.json'`) resolves to a file that was
excluded from the build context → `ERR_MODULE_NOT_FOUND`.
This only affects the **Docker release image**. The npm tarball is
unaffected because it uses `package.json`'s `files` field (which
includes `artifacts`), a different mechanism — which is why `npm pack
@aztec/standard-contracts` contains `AuthRegistry.json` while the
deployed image does not.
## Fix
Add `standard-contracts/artifacts/` to the dockerignore allowlist,
matching the other contract-artifact packages. One line; same pattern as
the existing `protocol-contracts`/`noir-contracts.js` entries.
## Verification
- `npm pack @aztec/standard-contracts@latest` already contains
`artifacts/AuthRegistry.json`, `PublicChecks.json` (confirms
source/files are correct; the gap is image-only).
- After this change the dockerignore re-includes
`standard-contracts/artifacts/`, so the JSON artifacts are copied to
`/usr/src/yarn-project/standard-contracts/artifacts/` alongside `dest/`,
resolving the eager import.
---
*Created by
[claudebox](https://claudebox.work/v2/sessions/b19bc30b22f7bbf3) ·
group: `slackbot`*1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
0 commit comments