test: rename RUN_EARTHLY test UDCs to RUN_EARTHBUILD#642
Conversation
Renames the internal test-harness User Defined Commands used across the integration test Earthfiles: RUN_EARTHLY -> RUN_EARTHBUILD RUN_EARTHLY_ARGS -> RUN_EARTHBUILD_ARGS DO_REMOTE_CACHE_EARTHLY -> DO_REMOTE_CACHE_EARTHBUILD These are purely internal test fixtures (function definitions and their `DO +...` invocations, including cross-file `tests+RUN_EARTHBUILD` and `../../+RUN_EARTHBUILD` references). No user-facing behavior, config, env vars, or released target/artifact names change. All 29 affected Earthfiles verified to parse via `earthly debug ast`. Reduces "earthly" line count by 529 (5408 -> 4879). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🎉 Are we earthbuild yet?Great progress! You've reduced "earthly" occurrences by 529 (9.78%) 📈 Overall Progress
📁 Changes by file type:
Keep up the great work migrating from Earthly to Earthbuild! 🚀 💡 Tips for finding more occurrencesRun locally to see detailed breakdown: ./.github/scripts/count-earthly.shNote that the goal is not to reach 0. |
There was a problem hiding this comment.
Code Review
This pull request renames the test helper functions and targets from RUN_EARTHLY to RUN_EARTHBUILD (and similarly for related arguments and helpers) across all test Earthfiles. The review feedback highlights a few critical argument mismatches in the test files: specifically, the use of -target instead of --target in tests/Earthfile, and the use of --should-fail instead of --should_fail in both tests/locally-in-command/Earthfile and tests/locally-in-function/Earthfile, which would prevent correct argument binding.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| DO +RUN_EARTHBUILD --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" -target=+reject-privileged-in-remote-repo-triggered-by-from-locally | ||
| DO +RUN_EARTHBUILD --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" -target=+reject-privileged-in-remote-repo-triggered-by-from-privileged | ||
| DO +RUN_EARTHBUILD --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" -target=+reject-privileged-in-remote-repo-triggered-by-copy-locally | ||
| DO +RUN_EARTHBUILD --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" -target=+reject-privileged-in-remote-repo-triggered-by-copy-privileged | ||
| DO +RUN_EARTHBUILD --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" -target=+reject-privileged-in-remote-repo-triggered-by-build-locally | ||
| DO +RUN_EARTHBUILD --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" -target=+reject-privileged-in-remote-repo-triggered-by-build-privileged | ||
| DO +RUN_EARTHBUILD --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" -target=+reject-dedup |
There was a problem hiding this comment.
The argument -target is used instead of --target. In Earthly, User Defined Command (UDC) arguments must be prefixed with double hyphens (--target). Using a single hyphen will prevent the argument from being bound correctly, causing the target to default to +all.
DO +RUN_EARTHBUILD --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" --target=+reject-privileged-in-remote-repo-triggered-by-from-locally
DO +RUN_EARTHBUILD --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" --target=+reject-privileged-in-remote-repo-triggered-by-from-privileged
DO +RUN_EARTHBUILD --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" --target=+reject-privileged-in-remote-repo-triggered-by-copy-locally
DO +RUN_EARTHBUILD --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" --target=+reject-privileged-in-remote-repo-triggered-by-copy-privileged
DO +RUN_EARTHBUILD --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" --target=+reject-privileged-in-remote-repo-triggered-by-build-locally
DO +RUN_EARTHBUILD --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" --target=+reject-privileged-in-remote-repo-triggered-by-build-privileged
DO +RUN_EARTHBUILD --earthfile=allow-privileged.earth --should_fail=true --extra_args="--allow-privileged" --target=+reject-dedup
| DO --pass-args +RUN_EARTHBUILD_ARGS --target=/the-test+test | ||
| RUN test "$(cat /the-test/data)" = "I am running in /the-test" | ||
| DO --pass-args +RUN_EARTHLY_ARGS --target=/the-test+test --should-fail=true | ||
| DO --pass-args +RUN_EARTHBUILD_ARGS --target=/the-test+test --should-fail=true |
There was a problem hiding this comment.
The argument --should-fail is passed with a hyphen, but the function RUN_EARTHBUILD_ARGS defines the parameter as should_fail with an underscore. This mismatch will prevent the argument from being bound correctly, causing it to default to false and potentially leading to incorrect test assertions.
DO --pass-args +RUN_EARTHBUILD_ARGS --target=/the-test+test --should_fail=true
| DO --pass-args +RUN_EARTHBUILD_ARGS --target=/the-test+test | ||
| RUN test "$(cat /the-test/data)" = "I am running in /the-test" | ||
| DO --pass-args +RUN_EARTHLY_ARGS --target=/the-test+test --should-fail=true | ||
| DO --pass-args +RUN_EARTHBUILD_ARGS --target=/the-test+test --should-fail=true |
There was a problem hiding this comment.
The argument --should-fail is passed with a hyphen, but the function RUN_EARTHBUILD_ARGS defines the parameter as should_fail with an underscore. This mismatch will prevent the argument from being bound correctly, causing it to default to false and potentially leading to incorrect test assertions.
DO --pass-args +RUN_EARTHBUILD_ARGS --target=/the-test+test --should_fail=true
What
Renames the internal test-harness User Defined Commands used across the integration test Earthfiles:
RUN_EARTHLYRUN_EARTHBUILDRUN_EARTHLY_ARGSRUN_EARTHBUILD_ARGSDO_REMOTE_CACHE_EARTHLYDO_REMOTE_CACHE_EARTHBUILDThis covers the
FUNCTION/COMMANDdefinitions and everyDO +...invocation, including cross-file references (tests+RUN_EARTHBUILD,../../+RUN_EARTHBUILD).Why
Part of the ongoing
earthly→earthbuildnaming cleanup. These UDCs are purely internal test fixtures — renaming them changes no user-facing behavior, config, env vars, or released target/artifact names.Verification
earthly debug ast.RUN_EARTHLY/DO_REMOTE_CACHE_EARTHLYreferences remain (the distinct CI inputRUN_EARTHLY_TEST_ARGSis intentionally left for a separate CI-vars PR).earthlyline count by 529 (5408 → 4879).🤖 Generated with Claude Code