Skip to content

fix(test-tests): Add fork name to cached blob filename to prevent xdist flakes#2930

Open
kclowes wants to merge 1 commit into
ethereum:forks/amsterdamfrom
kclowes:fix/flaky-test-tests
Open

fix(test-tests): Add fork name to cached blob filename to prevent xdist flakes#2930
kclowes wants to merge 1 commit into
ethereum:forks/amsterdamfrom
kclowes:fix/flaky-test-tests

Conversation

@kclowes
Copy link
Copy Markdown
Contributor

@kclowes kclowes commented May 27, 2026

🗒️ Description

I ran into a race condition in test-tests-pypy this morning where the test calls Blob.from_fork for two parametrized cases running in parallel — CancunToPragueAtTime15k at ts=14999 (resolves to Cancun) and at ts=15000 (resolves to Prague). Both resolve to read from blob_0_cell_proofs_0.json under the old naming.

If the Cancun worker ran first and wrote the file with "fork": "Cancun" stored in the JSON, the Prague worker would find the file already exists, load it, and get back a blob with fork=Cancun. The test then asserts b.fork.name() ==
"Prague" and fails.

🔗 Related Issues or PRs

N/A.

✅ Checklist

  • All: Ran fast static checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    just static
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Considered updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.
  • [ ] Tests: For PRs implementing a missed test case, update the post-mortem document to add an entry the list.
  • [ ] Ported Tests: All converted JSON/YML tests from ethereum/tests or tests/static have been assigned @ported_from marker.

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@kclowes kclowes added C-bug Category: this is a bug, deviation, or other problem A-test-tests Area: tests for packages/testing labels May 27, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.43%. Comparing base (1787c74) to head (d00c68e).
⚠️ Report is 1 commits behind head on forks/amsterdam.

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #2930   +/-   ##
================================================
  Coverage            90.43%   90.43%           
================================================
  Files                  535      535           
  Lines                32430    32430           
  Branches              3012     3012           
================================================
  Hits                 29329    29329           
  Misses                2573     2573           
  Partials               528      528           
Flag Coverage Δ
unittests 90.43% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kclowes kclowes marked this pull request as ready for review May 28, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-test-tests Area: tests for packages/testing C-bug Category: this is a bug, deviation, or other problem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant