Skip to content

chore(ci): gitignore bb-chonk-inputs.tar.gz to fix rebuild-patterns race#23178

Open
charlielye wants to merge 1 commit into
nextfrom
cl/gitignore-bb-chonk-inputs
Open

chore(ci): gitignore bb-chonk-inputs.tar.gz to fix rebuild-patterns race#23178
charlielye wants to merge 1 commit into
nextfrom
cl/gitignore-bb-chonk-inputs

Conversation

@charlielye
Copy link
Copy Markdown
Contributor

Summary

`test_chonk_standalone_vks_havent_changed.sh` downloads the pinned IVC inputs tarball into its own working directory (relative path), which resolves to `barretenberg/cpp/scripts/bb-chonk-inputs.tar.gz`. Both `barretenberg/cpp/.rebuild_patterns` and `barretenberg/sol/.rebuild_patterns` include `^barretenberg/cpp/scripts/`, so during the small window the tarball is on disk any concurrent `cache_content_hash` call that uses those patterns aborts with:

```
ERROR: Noticed changes to rebuild patterns during CI run: barretenberg/cpp/scripts/bb-chonk-inputs.tar.gz
```

Why it's a real race

The script `trap`s cleanup on EXIT/SIGINT, so the file is normally short-lived — but on a hard kill (OOM, runner reboot) the leak is permanent for that runner. Gitignoring the file makes `git ls-files --others --exclude-standard` skip it regardless, fixing both the live race and the hard-kill edge case.

Recent occurrence

Took out the merge queue for #23040: example_uniswap / aave_bridge / bob_token_contract Noir compiles failed in the docs build during the retry; the missing artifacts surfaced ~11 minutes later as

```
ERROR: Compiled artifact not found: /root/aztec-packages/docs/target/example_uniswap-ExampleUniswap.json
```

Why not move the tarball to mktemp

That would also work, but a 1-line gitignore is minimal and defends against any future relative-path writers in `barretenberg/cpp/scripts/` that hit the same pattern.

Test plan

  • This fix can only be exercised by the race itself; no unit test possible. Verified by reading the code path in `ci3/cache_content_hash` and the script.

`test_chonk_standalone_vks_havent_changed.sh` downloads the pinned IVC
inputs tarball into its own working directory (relative path), which
resolves to `barretenberg/cpp/scripts/bb-chonk-inputs.tar.gz`. Both
`barretenberg/cpp/.rebuild_patterns` and `barretenberg/sol/.rebuild_patterns`
include `^barretenberg/cpp/scripts/`, so during the small window the
tarball is on disk any concurrent `cache_content_hash` call that uses
those patterns aborts with `ERROR: Noticed changes to rebuild patterns
during CI run: barretenberg/cpp/scripts/bb-chonk-inputs.tar.gz`.

The script `trap`s cleanup on EXIT/SIGINT, so the file is normally short-
lived — but on a hard kill (OOM, runner reboot) the leak is permanent
for that runner. Gitignoring it makes `git ls-files --others
--exclude-standard` skip it regardless, fixing both the live race and
the hard-kill edge case.

Recently surfaced in the merge queue for #23040 where it took out
example_uniswap/aave_bridge/bob_token_contract Noir compiles in the
docs build, which surfaced ~11 minutes later as a missing artifact.
@AztecBot
Copy link
Copy Markdown
Collaborator

Flakey Tests

🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry.

\033FLAKED\033 (8;;http://ci.aztec-labs.com/ef15e436165dd776�ef15e436165dd7768;;�): yarn-project/scripts/run_test.sh bb-prover/src/avm_proving_tests/avm_check_circuit_token.test.ts (5s) (code: 0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants