Skip to content

chore(op-e2e): migrate Makefile to justfile#19475

Merged
ajsutton merged 14 commits intodevelopfrom
aj/migrate-op-e2e-makefile-to-just
Mar 12, 2026
Merged

chore(op-e2e): migrate Makefile to justfile#19475
ajsutton merged 14 commits intodevelopfrom
aj/migrate-op-e2e-makefile-to-just

Conversation

@ajsutton
Copy link
Copy Markdown
Contributor

@ajsutton ajsutton commented Mar 10, 2026

Summary

  • Migrates op-e2e build targets from Make to Just, following the same pattern used by other packages
  • Replaces the Makefile with a deprecated shim that delegates to just with a deprecation warning
  • All targets preserved: test, test-ws, test-actions, test-http, test-cannon, test-fault-proofs, fuzz, clean, gen-binding, cannon-prestates, test-external

Key changes

  • JUNIT_FILE conditional logic uses just's env() and if expressions
  • test-external-% Make pattern becomes test-external NAME with a parameter
  • pre-test-cannon directory check uses a shebang script
  • gen-binding requires CONTRACT as a just parameter instead of Make variable
  • num_cores uses just's built-in num_cpus()
  • Updates README to use just instead of make

Stack

  1. optimism#19473 — linter migration + shared infrastructure
  2. optimism#19474 — cannon migration
  3. This PR — op-e2e migration
  4. optimism#19476 — op-program migration
  5. optimism#19477 — root Makefile migration
  6. optimism#19482 — CI config update
  7. optimism#19483 — cannon testdata migration

Test plan

  • just --list shows all expected targets
  • just --dry-run test-ws produces correct command
  • JUNIT_FILE=/tmp/t.xml JSON_LOG_FILE=/tmp/t.json just --dry-run test-ws produces gotestsum command with correct flags
  • CI passes

🤖 Generated with Claude Code

@ajsutton ajsutton requested a review from a team as a code owner March 10, 2026 22:57
@ajsutton ajsutton force-pushed the aj/migrate-op-e2e-makefile-to-just branch from 0ed0b17 to 2ab92b3 Compare March 10, 2026 23:41
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.9%. Comparing base (f67fd6c) to head (03b8fe8).
⚠️ Report is 10 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #19475      +/-   ##
===========================================
+ Coverage     75.3%    75.9%    +0.5%     
===========================================
  Files          194      477     +283     
  Lines        11285    59985   +48700     
===========================================
+ Hits          8502    45531   +37029     
- Misses        2639    14454   +11815     
+ Partials       144        0     -144     
Flag Coverage Δ
cannon-go-tests-64 ?
contracts-bedrock-tests ?
unit 75.9% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 671 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ajsutton ajsutton force-pushed the aj/migrate-op-e2e-makefile-to-just branch from 8f8803c to 707214d Compare March 11, 2026 03:48
@ajsutton ajsutton changed the base branch from develop to aj/cannon-makefile-to-just March 11, 2026 03:48
@ajsutton ajsutton force-pushed the aj/cannon-makefile-to-just branch from 8ad9445 to c590c38 Compare March 11, 2026 04:01
@ajsutton ajsutton force-pushed the aj/migrate-op-e2e-makefile-to-just branch 3 times, most recently from ee44bd6 to 38cf3bd Compare March 11, 2026 15:37
ajsutton and others added 9 commits March 12, 2026 16:10
Migrate cannon build targets from Make to Just. The Makefile now
delegates to just with a deprecation warning, preserving backwards
compatibility for existing make invocations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…context

- Add `lint` to DEPRECATED_TARGETS and justfile (CI compatibility stub)
- Copy justfiles/ into kona cannon-repro.dockerfile for deprecated.mk shim
- Install `just` binary in cannon Docker build for the Make shim

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Alpine 3.21 just package is v1.37.0 which doesn't support the
[default] attribute. Move cannon recipe to first position instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The cannon Makefile deprecated shim requires justfiles/deprecated.mk,
which is resolved relative to cannon/ inside the Docker container. The
op-program Dockerfile.repro.dockerignore was excluding justfiles/ from
the build context, causing the cannon make shim to fail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of going through the deprecated Make shim, invoke just cannon
directly in the Docker build.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The diff-%-cannon Make pattern target was converted to a parameterized
just recipe (just diff-cannon VM). Update the Dockerfile to call just
directly instead of through make, which would fail since the deprecated
shim doesn't support pattern targets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Preserves backwards compatibility for make diff-<vm>-cannon invocations
(used by Dockerfile.diff and potentially other scripts) by translating
the pattern to just diff-cannon <vm>.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- cannon/Dockerfile.diff: use `apk add just` instead of curl install script,
  drop unnecessary `make` dependency
- cannon-repro.dockerfile: switch cannon-build stage from ubuntu:22.04 to
  golang:1.23.8-alpine3.21, matching the monorepo's Go builder image, so
  just can be installed via `apk add` instead of curl install script

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ajsutton ajsutton force-pushed the aj/cannon-makefile-to-just branch from 1700a5c to 8aa5350 Compare March 12, 2026 16:10
@ajsutton ajsutton force-pushed the aj/migrate-op-e2e-makefile-to-just branch from 50c0f17 to b9a8200 Compare March 12, 2026 16:11
ajsutton and others added 3 commits March 12, 2026 18:10
The golang Docker image sets GOTOOLCHAIN=local which prevents automatic
toolchain downloading. Since go.mod requires go 1.24.0, the 1.23.8
image fails to build. Match Dockerfile.diff which already uses 1.24.10.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Migrate op-e2e build targets from Make to Just. The Makefile now
delegates to just with a deprecation warning, preserving backwards
compatibility for existing make invocations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ajsutton ajsutton force-pushed the aj/migrate-op-e2e-makefile-to-just branch from b9a8200 to 8a674d6 Compare March 12, 2026 18:24
…d shim

The deprecated.mk shim was changed to pass JUSTFLAGS as just CLI
variable overrides (`just VAR=val target`), but just rejects overrides
for variables not declared in the justfile. This broke CI jobs where
Make variable assignments propagate through sub-makes (e.g.
GO_TEST_FLAGS, GUEST_PROGRAM).

Revert to passing them as environment variables via `env`, which is
how the shim originally worked in the cannon migration PR.

Fixes: go-tests-short, sanitize-op-program CI failures

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@sebastianst sebastianst left a comment

Choose a reason for hiding this comment

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

lgtm. one minor issue with the gen-binding change to a positional param, it means that the shim doesn't work, so we may just want to remove it from the Makefile.

Claude: gen-binding breaks through the deprecated Make shim

The original: make gen-binding CONTRACT=OPContractsManager
The shim translates this to: env CONTRACT=OPContractsManager just gen-binding
But the justfile declares gen-binding CONTRACT: — a positional parameter, not an env var. This will fail with "missing argument" because just
doesn't populate positional params from env vars.

Either the justfile should use env('CONTRACT', '') with a guard, or gen-binding needs to be excluded from the deprecated shim and given its
own pattern that forwards the variable as a positional arg.

@ajsutton
Copy link
Copy Markdown
Contributor Author

Dang it, my Claude didn't find that. 😆

I think that may be why Claude is going back and forth with a change to the deprecation tooling for just changing whether it converts args to ENV vars or positional ones. gen-binding would probably be fine not working via the Makefile. For other cases we could just write the Makefile shim manually to convert it exactly how we need it to be. I'll get Claude to review for that problem across all the PRs.

The generic deprecated.mk shim converts make variables to env vars, but
gen-binding CONTRACT: is a positional parameter in just. Write a manual
shim that passes CONTRACT correctly as a positional arg.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Base automatically changed from aj/cannon-makefile-to-just to develop March 12, 2026 21:03
@ajsutton ajsutton added this pull request to the merge queue Mar 12, 2026
Merged via the queue into develop with commit 60a811c Mar 12, 2026
128 checks passed
@ajsutton ajsutton deleted the aj/migrate-op-e2e-makefile-to-just branch March 12, 2026 22:48
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