Skip to content

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

Merged
danceratopz merged 2 commits into
ethereum:forks/amsterdamfrom
kclowes:fix/flaky-test-tests
Jun 2, 2026
Merged

fix(test-tests): Add fork name to cached blob filename to prevent xdist flakes#2930
danceratopz merged 2 commits into
ethereum:forks/amsterdamfrom
kclowes:fix/flaky-test-tests

Conversation

@kclowes

@kclowes kclowes commented May 27, 2026

Copy link
Copy Markdown
Contributor

🗒️ 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

codecov Bot commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.50%. Comparing base (7df3b8b) to head (598eb87).

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #2930   +/-   ##
================================================
  Coverage            90.50%   90.50%           
================================================
  Files                  535      535           
  Lines                32407    32407           
  Branches              3011     3011           
================================================
  Hits                 29331    29331           
  Misses                2559     2559           
  Partials               517      517           
Flag Coverage Δ
unittests 90.50% <ø> (ø)

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

@danceratopz danceratopz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice! Thanks for the fix!

@danceratopz danceratopz merged commit d964fd5 into ethereum:forks/amsterdam Jun 2, 2026
24 checks passed
@kclowes kclowes deleted the fix/flaky-test-tests branch June 2, 2026 15:32
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.

2 participants