Skip to content

feat(ci): fill mainnet fixtures nightly, draft cached tests@ releases - #3100

Merged
spencer-tb merged 14 commits into
ethereum:forks/amsterdamfrom
spencer-tb:ci/nightly-fill
Jul 16, 2026
Merged

feat(ci): fill mainnet fixtures nightly, draft cached tests@ releases#3100
spencer-tb merged 14 commits into
ethereum:forks/amsterdamfrom
spencer-tb:ci/nightly-fill

Conversation

@spencer-tb

@spencer-tb spencer-tb commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

🗒️ Description

TLDR: Fill the fixtures for mainnet forks nightly through the release workflow, and draft a tests@ release on demand from any nightly artifact in minutes.

Run the fixture release workflow on a nightly cron (02:00 UTC). It fills the mainnet tests feature (all tests, slow included, all fixture formats) through the exact release pipeline but stops after combine: No tag and no release, just a rotating fixtures_<commit> workflow artifact with 5 day retention that is always available.

A unit-tested gate skips quiet nights with no new commits since the last nightly that actually filled. A failed or skipped nightly never advances that baseline, so no commit slips through unfilled, and a quiet stretch still refills after 4 days (or once the artifact has expired) so a live artifact always exists.

The nightly doubles as a tests@ release candidate on demand: Dispatching the workflow with cached=true (or commit=<sha> to pick a specific nightly) skips build and combine and drafts the release from the nightly's tarball in minutes, tagged at the commit the nightly built. A unit-tested resolver guards the shortcut: tests on the default branch only, the version must exceed the newest tests@ tag, the nightly must contain the previous release and be an ancestor of the current head. The step summary lists any commits the release will not contain.

Also extracts a shared just fill-release recipe, moves the evm-override validation into generate_build_matrix.py, removes a duplicate benchmark entry from evm.yaml, and exports PYTEST_XDIST_AUTO_NUM_WORKERS empty from the Justfile so pytest-xdist stops warning on non-numeric values such as auto.

Follow-ups

Deliberately not included: Dev-fork nightly fills (#3178) and failure notifications for red nightlies.

🔗 Related Issues or PRs

Complements the per-PR fill trim in #3096.

✅ Checklist

  • All: Ran fast static checks to avoid unnecessary CI fails, see also Code Standards and Verifying Changes:
    just static
  • All: PR title have the form <type>(<area>):, where <type> and <area> come from an approrpriate C-<type>, respectively A-<area>, label. The title should match the a target squash commit message.
  • All: Considered updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).

Cute Animal Picture

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

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.37%. Comparing base (64ed676) to head (0359068).
⚠️ Report is 55 commits behind head on forks/amsterdam.

Additional details and impacted files
@@                 Coverage Diff                 @@
##           forks/amsterdam    #3100      +/-   ##
===================================================
+ Coverage            93.23%   93.37%   +0.13%     
===================================================
  Files                  624      624              
  Lines                36924    36990      +66     
  Branches              3373     3386      +13     
===================================================
+ Hits                 34427    34539     +112     
+ Misses                1704     1677      -27     
+ Partials               793      774      -19     
Flag Coverage Δ
unittests 93.37% <ø> (+0.13%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

@spencer-tb
spencer-tb marked this pull request as ready for review July 3, 2026 16:26
@spencer-tb spencer-tb added C-feat Category: an improvement or new feature A-ci Area: Continuous Integration labels Jul 3, 2026
@spencer-tb
spencer-tb requested a review from danceratopz July 3, 2026 16:26

@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.

Could we add a cron trigger to the release workflow and avoid triggering the release stage/tagging if trigged by cron? Or are you trying to be considerate of runner usage? Being kind to the gigachungi is valid; just asking!

Otherwise, couple of comment below.

Comment thread .github/workflows/nightly-fill.yaml Outdated
Comment thread .github/workflows/nightly-fill.yaml Outdated
Comment thread .github/workflows/nightly-fill.yaml Outdated
@spencer-tb

Copy link
Copy Markdown
Contributor Author

Using rotating artifacts with FIFO of size 5. Ready for re-review :)

@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.

Thanks for fixing these up! It still didn't sit right with me to add a new workflow that almost duplicates the workflow that we already had. I understand that the priority is to ensure that tests fill correctly, but by re-using the existing workflow, we can test that much more of the release machinery is working in the nightly. Also, if/when we move the release flow to pytest-split, this will also be present in the nightly, etc. I PR'd this suggestion so that .github/workflows/release_fixtures.yaml is used for nightly builds, too.

As a follow-up we could consider how we can create tests@.. from the nightly. Then we can basically have mainnet releases ready/on-demand.

spencer-tb#28

Comment thread .github/workflows/nightly-fill.yaml Outdated
Comment thread .github/workflows/nightly-fill.yaml Outdated
danceratopz and others added 8 commits July 14, 2026 11:40
Move the fill flags shared by all fixture releases (`-n`, `--no-html`,
`--durations=100`, `--log-level=DEBUG`) out of the inline fill step in
`.github/actions/build-fixtures` into a new `just fill-release` recipe.
Callers append the feature's fill params, fork range and output via
pass-through args; for repeated flags, the last occurrence wins. The
xdist worker count is plumbed via `PYTEST_XDIST_AUTO_NUM_WORKERS`
(`xdist: auto` in `evm.yaml` for all EVM types, unchanged).

Reimplement `fill-nightly` as a thin wrapper around `fill-release` so
the nightly fill shares the release flags. Deliberate changes to the
nightly invocation: it gains `--no-html` and `--log-level=DEBUG`, and
it drops flags that defaults already provide: `--dist=loadgroup` and
the trailing `tests` path (both defaults in `pytest-fill.ini`), and
the explicit `-n` (now supplied by `fill-release`, same value).
Replace the standalone nightly-fill workflow with a schedule trigger on
`release_fixtures.yaml`: scheduled runs fill the new `nightly` feature
(`--until=Amsterdam --generate-all-formats`, slow tests included)
through the exact release pipeline (matrix generation, `build-fixtures`,
index merge and tarball) and skip only the `release` job, so no tag or
draft release is created. The nightly is thereby a daily rehearsal of
the release flow itself.

Scheduled runs skip when there are no new commits since the last
successful scheduled run (query filtered with `event=schedule` so
manual releases never advance the nightly baseline) and list the new
commits in the step summary. `fail-fast` is disabled on schedule so
every fork range reports. `run-name` distinguishes nightly runs from
manual releases in the run history.

Artifact retention replaces the FIFO rotation of the standalone
workflow: the combined `fixtures_nightly.tar.gz` is kept for 5 days
(roughly the last five nightly builds at a daily cadence) and split
intermediates for 1 day, via a new `split_retention_days` input on the
`build-fixtures` action. Manual releases keep the repo defaults.

Remove the `fill-nightly` recipe: the nightly fill now goes through
`fill-release` inside `build-fixtures`, gaining the fixture index and
release tarball packaging that the standalone workflow lacked.
The `benchmark` key appeared twice with identical values. The two
readers of this file disagree on which duplicate wins (the awk snippet
in `build-evm-base` matches the first, `yaml.safe_load` keeps the
last), so a future edit to only one copy would apply inconsistently.
Keep the first occurrence.
Move the `evm` override check from inline bash in the release
workflow's setup step into `validate_inputs`, where the rest of the
dispatch input validation already lives and is unit-tested. The check
becomes a YAML key lookup instead of a line-anchored grep.
Move the inline bash of the "Check for new commits" step into
`.github/scripts/check_new_commits.py`, following the pattern of the
other release helper scripts (`uv run`-able, unit-tested). The
last-success baseline semantics, the dispatch short-circuit, the
no-baseline bootstrap and the empty-commit-list handling now have unit
tests (via a fake `gh` on `PATH`); the workflow step shrinks to a
single command.
With the nightly skipping itself when there are no new commits, a quiet
stretch longer than the five-day artifact retention would leave no live
nightly tarball. Re-run the fill once the last successful scheduled run
is four days old: a release-shaped artifact then always exists within
the retention window, and the release pipeline keeps getting exercised
during quiet periods.
@spencer-tb spencer-tb changed the title feat(ci): nightly full fill of all tests and fixture formats feat(ci): fill mainnet fixtures nightly via the release workflow Jul 14, 2026
@danceratopz
danceratopz self-requested a review July 15, 2026 07:09
@danceratopz danceratopz self-assigned this Jul 15, 2026

@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.

I think we're super close! Thanks a lot for the bug fix regarding "successful" empty runs (as no new commits)!

I think your last commit that removes the nightly features and simply uses tests@ as the nightly build makes a bunch of sense, let's do that!

There's just one thing missing imo to make this a killer feature that I think is worth shipping with this PR: The ability to basically one-click create a release from the last successful nightly artifact. I added a "Promote nightly" workflow here:

Using tests reduces coverage slightly (over the previous version), but I think that getting that back will require a follow-up. We could run multiple nightlies of relevant branches. But this is fine for now, especially at the late stage of Amsterdam fork dev and the fact that we'll probably bump the tests release feature to Amsterdam pretty soon Follow-up issue:

I also had this idea to make the nightly flow triggerable for easier testing but this is less important, just close if it's too much noise.

@spencer-tb

Copy link
Copy Markdown
Contributor Author

@danceratopz I pushed to 31 as discussed!

danceratopz and others added 3 commits July 15, 2026 16:27
Co-authored-by: spencer-tb <spencer.tb@ethereum.org>
The cached-release resolver read only the first page of
git/matching-refs/tags/tests@ (30 refs). The listing is ordered by
ref name, not version (tests@v9... sorts after tests@v20...), so once
more than 30 tags exist the version-monotonicity and no-regression
checks could baseline on a stale tag. Fetch every page with
--paginate --slurp and flatten before taking the maximum.

The canned tag response in the unit tests now spans two pages so
every test exercises the flattening.
just bakes PYTEST_XDIST_AUTO_NUM_WORKERS into the -n value at parse
time, but pytest-xdist also reads the same env var as a numeric
worker-count override in -n auto mode, so transporting "auto"
through it made every fill and test run warn:

    UserWarning: PYTEST_XDIST_AUTO_NUM_WORKERS is not a number:
    {env_var!r}. Ignoring it.

The warning is truthful (xdist falls back to psutil CPU detection
either way), so export the env var empty to child processes: xdist
skips empty values silently, and numeric values never consult the
env var because they produce a plain -n N.

@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.

Thanks @spencer-tb!! Enjoyed working on this one with you!

Please excuse me sneaking in the last commit. It was totally unrelated, but it does silence an irrelevant error.

@spencer-tb

Copy link
Copy Markdown
Contributor Author

Looks good thx! Just updating the PR desc/title to reflect everything then will merge :)

@spencer-tb spencer-tb changed the title feat(ci): fill mainnet fixtures nightly via the release workflow feat(ci): fill mainnet fixtures nightly, draft cached tests@ releases Jul 16, 2026
@spencer-tb
spencer-tb merged commit a45205c into ethereum:forks/amsterdam Jul 16, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ci Area: Continuous Integration C-feat Category: an improvement or new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants