Skip to content

fix: ship the CLI as earth in the published docker image - #801

Merged
kmannislands merged 7 commits into
mainfrom
gh-796-fix-bin-in-published-image
Aug 26, 2026
Merged

kmannislands merged 7 commits into
mainfrom
gh-796-fix-bin-in-published-image

Conversation

@kmannislands

@kmannislands kmannislands commented Aug 12, 2026 •

Copy link
Copy Markdown

Fixes #796. Stacked on #800 — base is gh-751-earth-env-migration-internal-vars, so review/merge that first.

The v0.8.18 release notes document the CLI rename earthly → earth and the release assets follow it, but the published image shipped only earthly. +earthly-docker hardcoded DEFAULT_INSTALLATION_NAME="earthly" while the release path passes "earth".

Confirming the starting state first

The issue had a comment retracting part of the original report; that retraction was itself wrong and I withdrew it. It grepped the shipped binaries for earth-buildkitd / .earth literals and found only the earthly forms in both, concluding there was no divergence. That test cannot detect this: the names are built at runtime by concatenation ("."+installName, installName+"-buildkitd", installName+"-cache"), so the derived form never exists as a literal. The earthly literals such a grep finds are the fallback defaults (cmp.Or(installName, "earthly")), compiled into both binaries regardless of the ldflag.

Running them settles it. Built both paths locally at v0.8.18:

# release path (--DEFAULT_INSTALLATION_NAME=earth)
$ ... alpine sh -c 'earth bootstrap --no-buildkit >/dev/null 2>&1; ls -d /root/.earth*'
/root/.earth

# the binary extracted from the published image
$ ... alpine sh -c 'earthly bootstrap --no-buildkit >/dev/null 2>&1; ls -d /root/.earth*'
/root/.earthly

# same image binary renamed to `earth` -- still .earthly, so it is the ldflag, not argv[0]
/root/.earthly

A locally built +earthly-docker at main is indistinguishable from published earthbuild/earthbuild:v0.8.18 on every point checked, so this reproduces the shipped artifact rather than a dev approximation.

Changes

DEFAULT_INSTALLATION_NAME is threaded, not hardcoded (Earthfile), and declared once as ARG --global in release/Earthfile so +signed-release and +perform-release-earthly-dockerhub read the same value and cannot drift apart again. Same shape as #728's DEFAULT_BUILDKITD_IMAGE fix.

The CLI installs as /usr/bin/earth, with /usr/bin/earthly kept as a symlink for one deprecation cycle, matching how EARTHLY_* env vars are being retired rather than removed. earthly-entrypoint.sh calls earth so containerised builds don't print the rename notice on every invocation.

PortOffset no longer offsets earth. It special-cased only "earthly" as "the official release", so switching the image to earth would have moved buildkit 8372→8846 and the local registry 8371→8845 while earthly-entrypoint.sh and buildkitd/buildkitd.tcp.template hardcode the unoffset values. Both official spellings now return 0; earthly stays exempt for the deprecation cycle so an installation predating the rename keeps reaching its existing daemon. Note the old comment was inverted — official releases are earth, so they were the ones carrying a non-zero offset.

The certs path is derived, not hardcoded. earthly-entrypoint.sh hardcoded /root/.earthly/certs/ for files the CLI writes to ~/.<installation name>/certs, so the rename alone would have left three dangling symlinks and a TLS handshake failure with no diagnostic. It now derives from a baked EARTH_INSTALLATION_NAME and fails loudly if the directory is missing.

Two defects in the rename notice (warnIfEarth → warnRenamedFromEarthly): it asserted earthly "is currently symlinked" whether or not it was — in the pre-fix image nothing was symlinked and no earth existed — and its rm hint was gated on path.Join(dir, cmdName) with cmdName == "earthly", i.e. it tested for the invoked binary itself rather than its replacement, so it could never fire correctly. It also used filepath.Abs(argv[0]), which resolves against the working directory when the CLI came off PATH; it now uses os.Executable() for the location and argv[0] only for the invoked name.

CI pins the installation name to earth (ci.yml, build-earthly.yml). Without this the PR is red on its own: renaming the in-image CLI also renames the daemon it manages, so the image test's docker.sock case looked for earth-buildkitd, found nothing, and tried to pull ghcr.io/earthbuild/earthbuild:buildkitd-image-test — a tag +earthly-docker never builds. The pin cascades to the six places CI addresses the daemon directly (reusable-test.yml, reusable-misc-tests-{1,2}.yml, tests/registry-certs/test.sh, the bug-report template). tests/bootstrap/test-bootstrap.sh now derives the name from $default_install_name instead of hardcoding it, so it tracks whatever CI passes. earth-retry.sh and the failure-diagnostics defaults keep the deprecated names alongside the new ones — both are best-effort cleanup and a job may still have either container.

Verification

Against a locally built image, before → after on identical build args:

Check before after
command -v earth nothing /usr/bin/earth
earthly real binary symlink → earth
earth --version earth: not found earth version v0.8.18 …
config dir /root/.earthly /root/.earth (matches release binaries)
earthly ls claims a symlink that doesn't exist renamed to earth + rm /usr/bin/earthly
self-inflicted EARTHLY_ warnings 6 0 (via #800)
Suite Result
scripts/tests/earth-image.sh (incl. privileged embedded-buildkit hello-world) pass
+lint 0 issues
+lint-scripts-misc pass
go test ./config/... ./internal/env/... pass

The image suite passing the privileged hello-world build is the check that matters for the certs and port changes — it stands up buildkitd inside the container over TLS on 8372.

New tests: config/config_test.go pins both official names to a zero offset and asserts dev names stay in range; scripts/tests/earth-image.sh gains assertions that earth is on PATH, that earth --version works, and that the deprecated name still resolves and says so.

Notes for review

  • The tests/ call sites are swept in test: drive the earth binary throughout the integration suite #803, not here. They keep working through the symlink either way; test: drive the earth binary throughout the integration suite #803 moves them onto earth so the suite exercises the binary users actually get.
  • /etc/.earthly/config.yml is deliberately unchanged — it is a documented mount point for callers supplying their own config, not a path the CLI derives, and it is passed explicitly via --config.
  • +earthly-docker's DEFAULT_INSTALLATION_NAME defaults to earth, not earthly-dev like the binary targets. That default exists to keep a dev binary off a developer's real config dir and containers, which is moot inside a container; the pre-fix value here was the undecorated earthly for the same reason.
  • AGENTS.md listed /usr/bin/earthly as a literal to leave alone "until the rename itself" — this is that change, so the guidance is updated rather than violated.
  • The earth-vs-earthly banner in --version follows argv[0] via common.GetBinaryName(), so it correctly reports whichever name was used.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Aug 12, 2026 •

Copy link
Copy Markdown

🎉 Are we earthbuild yet?

Great progress! You've reduced "earthly" occurrences by 29 (0.76%)

📈 Overall Progress

Branch Total Count
main 3817
This PR 3788
Difference -29 (0.76%)

📁 Changes by file type:

File Type Change
Go files (.go) ❌ +6
Documentation (.md) ❌ +3
Earthfiles ✅ -10

Keep up the great work migrating from Earthly to Earthbuild! 🚀

💡 Tips for finding more occurrences

Run locally to see detailed breakdown:

./.github/scripts/count-earthly.sh

Note that the goal is not to reach 0.
There is anticipated to be at least some occurrences of earthly in the source code due to backwards compatibility with config files and language constructs.

@kmannislands
kmannislands force-pushed the gh-796-fix-bin-in-published-image branch from 1496fc9 to 0ef1384 Compare August 12, 2026 15:55
@kmannislands kmannislands self-assigned this Aug 19, 2026
@kmannislands kmannislands added the ai-assisted Authored with AI assistance label Aug 19, 2026
@kmannislands
kmannislands force-pushed the gh-796-fix-bin-in-published-image branch from 8a35506 to 1ec9fa4 Compare August 19, 2026 13:56
@kmannislands
kmannislands force-pushed the gh-796-fix-bin-in-published-image branch from 1ec9fa4 to 0118e68 Compare August 25, 2026 19:55
kmannislands added a commit that referenced this pull request Aug 25, 2026
#796 makes the published image install the CLI as `earth` with an
`earthly` compatibility symlink. The integration suite still reached the
CLI through the deprecated name, so ~176 call sites were exercising the
symlink rather than the binary users actually get. This drives `earth`
throughout and keeps one deliberate case on `earthly`.

+deprecated-name-test is that case: it asserts the symlink reaches the
CLI and that the rename warning is emitted, so the compatibility path
stays covered deliberately rather than incidentally.

Three things a mechanical s/earthly/earth/ gets wrong, all handled here:

1. COMP_POINT is a byte offset into COMP_LINE. Most cases derive it via
   `wc -m`, but two are literal (10 and 9). autocomplete/complete.go
   returns early when compPoint > len(compLine), so a stale offset
   yields no completions and the test fails confusingly rather than
   obviously. Now 8 and 7.
2. The bash completion file is named `earthly` regardless of
   installation name (bootstrap_cmds.go), so the assertions in
   tests/autocompletion/install must keep the old name.
3. The eine tests copy the binary in rather than taking it from the
   image, so their COPY destination moves to `earth` alongside their
   invocations.

Also left on the deprecated spelling on purpose: earthly_config (a shell
variable exported by the entrypoint), earthly.output and
/tmp/*-earthly-script (filenames), github.com/earthly/earthly+base (a
remote target ref), +earthly-docker (a target name), and the
.earthly-test2 / .earthly-not-test directories belonging to cases that
set an installation name explicitly.

CI's installation-name pin and the earth-buildkitd rename live in #801,
so that PR is green on its own; this one is purely the suite rename.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@kmannislands
kmannislands marked this pull request as ready for review August 25, 2026 19:55
@kmannislands
kmannislands requested a review from a team as a code owner August 25, 2026 19:55
@kmannislands
kmannislands requested review from gilescope and removed request for a team August 25, 2026 19:55
@kmannislands
kmannislands force-pushed the gh-796-fix-bin-in-published-image branch from 0118e68 to 574085f Compare August 25, 2026 20:00
kmannislands added a commit that referenced this pull request Aug 25, 2026
#796 makes the published image install the CLI as `earth` with an
`earthly` compatibility symlink. The integration suite still reached the
CLI through the deprecated name, so ~176 call sites were exercising the
symlink rather than the binary users actually get. This drives `earth`
throughout and keeps one deliberate case on `earthly`.

+deprecated-name-test is that case: it asserts the symlink reaches the
CLI and that the rename warning is emitted, so the compatibility path
stays covered deliberately rather than incidentally.

Three things a mechanical s/earthly/earth/ gets wrong, all handled here:

1. COMP_POINT is a byte offset into COMP_LINE. Most cases derive it via
   `wc -m`, but two are literal (10 and 9). autocomplete/complete.go
   returns early when compPoint > len(compLine), so a stale offset
   yields no completions and the test fails confusingly rather than
   obviously. Now 8 and 7.
2. The bash completion file is named `earthly` regardless of
   installation name (bootstrap_cmds.go), so the assertions in
   tests/autocompletion/install must keep the old name.
3. The eine tests copy the binary in rather than taking it from the
   image, so their COPY destination moves to `earth` alongside their
   invocations.

Also left on the deprecated spelling on purpose: earthly_config (a shell
variable exported by the entrypoint), earthly.output and
/tmp/*-earthly-script (filenames), github.com/earthly/earthly+base (a
remote target ref), +earthly-docker (a target name), and the
.earthly-test2 / .earthly-not-test directories belonging to cases that
set an installation name explicitly.

CI's installation-name pin and the earth-buildkitd rename live in #801,
so that PR is green on its own; this one is purely the suite rename.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@kmannislands
kmannislands force-pushed the gh-796-fix-bin-in-published-image branch from 574085f to eb22b13 Compare August 25, 2026 21:15
kmannislands added a commit that referenced this pull request Aug 25, 2026
#796 makes the published image install the CLI as `earth` with an
`earthly` compatibility symlink. The integration suite still reached the
CLI through the deprecated name, so ~176 call sites were exercising the
symlink rather than the binary users actually get. This drives `earth`
throughout and keeps one deliberate case on `earthly`.

+deprecated-name-test is that case: it asserts the symlink reaches the
CLI and that the rename warning is emitted, so the compatibility path
stays covered deliberately rather than incidentally.

Three things a mechanical s/earthly/earth/ gets wrong, all handled here:

1. COMP_POINT is a byte offset into COMP_LINE. Most cases derive it via
   `wc -m`, but two are literal (10 and 9). autocomplete/complete.go
   returns early when compPoint > len(compLine), so a stale offset
   yields no completions and the test fails confusingly rather than
   obviously. Now 8 and 7.
2. The bash completion file is named `earthly` regardless of
   installation name (bootstrap_cmds.go), so the assertions in
   tests/autocompletion/install must keep the old name.
3. The eine tests copy the binary in rather than taking it from the
   image, so their COPY destination moves to `earth` alongside their
   invocations.

Also left on the deprecated spelling on purpose: earthly_config (a shell
variable exported by the entrypoint), earthly.output and
/tmp/*-earthly-script (filenames), github.com/earthly/earthly+base (a
remote target ref), +earthly-docker (a target name), and the
.earthly-test2 / .earthly-not-test directories belonging to cases that
set an installation name explicitly.

CI's installation-name pin and the earth-buildkitd rename live in #801,
so that PR is green on its own; this one is purely the suite rename.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Comment thread earthly-entrypoint.sh Outdated
Comment thread earth-entrypoint.sh

@janishorsts janishorsts left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

kmannislands added a commit that referenced this pull request Aug 26, 2026
Review feedback on #801: the entrypoint derived the certs directory from
the installation name but kept the config at a hardcoded
/etc/.earthly/config.yml, so the two disagreed as soon as the image
switched to `earth`.

The config now sits at /etc/.<installation name>/config.yml alongside the
other per-installation paths, and the variable is `earth_config` to
match. The pre-rename path is still honoured when a caller mounts a
config there and nothing is mounted at the derived path, so an existing
`-v ./config.yml:/etc/.earthly/config.yml` keeps working for one
deprecation cycle; `earthly_config` stays exported as an alias for the
test call sites that read it.

setup-registry.sh and tests/warn-if-not-logged-in write to the derived
path rather than relying on that fallback, and the Earthfile reads
buildkit_additional_config back from the same place.

Also renames earthly-entrypoint.sh to earth-entrypoint.sh, with
/usr/bin/earthly-entrypoint.sh kept as a symlink: the CI integration
guides name that path explicitly, so it gets the same deprecation cycle
as /usr/bin/earthly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@kmannislands
kmannislands force-pushed the gh-796-fix-bin-in-published-image branch from eb22b13 to e596081 Compare August 26, 2026 17:31
Base automatically changed from gh-751-earth-env-migration-internal-vars to main August 26, 2026 18:43
kmannislands and others added 2 commits August 26, 2026 11:43
The v0.8.18 release notes document the CLI binary rename earthly -> earth,
and the release assets follow it, but the published earthbuild/earthbuild
image shipped only earthly -- there was no earth anywhere on the filesystem,
so following the release notes into the image failed with "earth: not found".

+earthly-docker hardcoded DEFAULT_INSTALLATION_NAME="earthly" while the
release path passes "earth". That value is an ldflag which also drives the
config dir, the buildkitd container name, the cache volume name and the
buildkit port offset, so the image's CLI disagreed with the released binaries
on all of them -- visible to anyone extracting the CLI from the image, which
is how the issue was found.

DEFAULT_INSTALLATION_NAME is now threaded into +earthly-docker instead of
hardcoded, and declared once as a global in release/Earthfile so the release
binaries and the image cannot drift apart again. The CLI installs as
/usr/bin/earth with an earthly symlink kept for one deprecation cycle.

Two things fall out of the rename:

PortOffset special-cased only "earthly" as the official name, so switching the
image to "earth" would have moved buildkit to 8846 and the local registry to
8845 while earthly-entrypoint.sh and buildkitd.tcp.template hardcode
8372/8371. Both official spellings now offset to zero.

earthly-entrypoint.sh hardcoded /root/.earthly/certs for the certificates the
CLI generates under ~/.<installation name>/certs, which would have become
three dangling symlinks and a TLS failure with no diagnostic. The path now
derives from the installation name the image was built with, and the script
fails loudly if the directory is absent.

Also fixes two defects in the rename notice itself: it claimed earthly "is
currently symlinked" whether or not it was, and its rm suggestion was gated on
a path built from the deprecated name, so it tested for the invoked binary
rather than its replacement.

Fixes #796.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Drop changelog voice, ticket references and reviewer-facing justification from
the comments introduced with the image binary rename. State the invariant each
one is protecting instead: that the image and the release binaries must agree on
the installation name, that the official names must map to a zero port offset
because other files hardcode the resulting ports, and that /etc/.earthly is a
caller-supplied mount point rather than a CLI-derived path.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
kmannislands and others added 4 commits August 26, 2026 11:43
The config tests assert the default config location, which the installation
name determines. The image installs as earth, so the default is ~/.earth.

Cases that set an installation name explicitly keep their own directories.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The entrypoint needs the installation name to locate the certificates the CLI
generates under ~/.<name>/certs, and took it from EARTH_INSTALLATION_NAME baked
into the image. That is the CLI's own variable, and env.Lookup prefers it over
EARTHLY_INSTALLATION_NAME, so the baked value silently overrode a caller using
the deprecated spelling: the CLI kept writing to ~/.earth while the caller
expected their own directory.

Carry the build-time name in EARTH_IMAGE_INSTALLATION_NAME, which the CLI does
not read, and use it only as the fallback when resolving the name.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
#796 makes the published image install the CLI as `earth`, which also
renames the daemon it manages: `earthly-buildkitd` becomes
`earth-buildkitd`. CI built its binaries with
DEFAULT_INSTALLATION_NAME=earthly, so the image test's docker.sock case
looked for `earth-buildkitd`, found nothing, and tried to pull
`ghcr.io/earthbuild/earthbuild:buildkitd-image-test` -- a tag
`+earthly-docker` never builds.

Pin DEFAULT_INSTALLATION_NAME=earth in ci.yml and build-earthly.yml and
follow the name through everywhere CI addresses the daemon directly:
reusable-test.yml and reusable-misc-tests-{1,2}.yml, the registry-certs
test, and the bug-report template.

tests/bootstrap/test-bootstrap.sh derives the name from
$default_install_name instead of hardcoding it, so it tracks whatever CI
passes rather than needing a second edit next time.

earth-retry.sh and the failure-diagnostics defaults keep the deprecated
names alongside the new ones: both are best-effort cleanup and
diagnostics, and a job may still have either container.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Review feedback on #801: the entrypoint derived the certs directory from
the installation name but kept the config at a hardcoded
/etc/.earthly/config.yml, so the two disagreed as soon as the image
switched to `earth`.

The config now sits at /etc/.<installation name>/config.yml alongside the
other per-installation paths, and the variable is `earth_config` to
match. The pre-rename path is still honoured when a caller mounts a
config there and nothing is mounted at the derived path, so an existing
`-v ./config.yml:/etc/.earthly/config.yml` keeps working for one
deprecation cycle; `earthly_config` stays exported as an alias for the
test call sites that read it.

setup-registry.sh and tests/warn-if-not-logged-in write to the derived
path rather than relying on that fallback, and the Earthfile reads
buildkit_additional_config back from the same place.

Also renames earthly-entrypoint.sh to earth-entrypoint.sh, with
/usr/bin/earthly-entrypoint.sh kept as a symlink: the CI integration
guides name that path explicitly, so it gets the same deprecation cycle
as /usr/bin/earthly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@kmannislands
kmannislands force-pushed the gh-796-fix-bin-in-published-image branch from e596081 to 6ab5c89 Compare August 26, 2026 18:43
kmannislands added a commit that referenced this pull request Aug 26, 2026
`earthly` compatibility symlink. The integration suite still reached the
CLI through the deprecated name, so ~176 call sites were exercising the
symlink rather than the binary users actually get. This drives `earth`
throughout and keeps one deliberate case on `earthly`.

+deprecated-name-test is that case: it asserts the symlink reaches the
CLI and that the rename warning is emitted, so the compatibility path
stays covered deliberately rather than incidentally.

Three things a mechanical s/earthly/earth/ gets wrong, all handled here:

1. COMP_POINT is a byte offset into COMP_LINE. Most cases derive it via
   `wc -m`, but two are literal (10 and 9). autocomplete/complete.go
   returns early when compPoint > len(compLine), so a stale offset
   yields no completions and the test fails confusingly rather than
   obviously. Now 8 and 7.
2. The bash completion file is named `earthly` regardless of
   installation name (bootstrap_cmds.go), so the assertions in
   tests/autocompletion/install must keep the old name.
3. The eine tests copy the binary in rather than taking it from the
   image, so their COPY destination moves to `earth` alongside their
   invocations.

Also left on the deprecated spelling on purpose: earthly_config (a shell
variable exported by the entrypoint), earthly.output and
/tmp/*-earthly-script (filenames), github.com/earthly/earthly+base (a
remote target ref), +earthly-docker (a target name), and the
.earthly-test2 / .earthly-not-test directories belonging to cases that
set an installation name explicitly.

CI's installation-name pin and the earth-buildkitd rename live in #801,
so that PR is green on its own; this one is purely the suite rename.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
+lint-scripts-misc runs shellcheck at default severity, so the info-level
SC2016 fails the build. The single quotes are deliberate: the readlink
is evaluated by `sh -c` inside the container, not by the test script, so
the warning does not apply here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
kmannislands added a commit that referenced this pull request Aug 26, 2026
`earthly` compatibility symlink. The integration suite still reached the
CLI through the deprecated name, so ~176 call sites were exercising the
symlink rather than the binary users actually get. This drives `earth`
throughout and keeps one deliberate case on `earthly`.

+deprecated-name-test is that case: it asserts the symlink reaches the
CLI and that the rename warning is emitted, so the compatibility path
stays covered deliberately rather than incidentally.

Three things a mechanical s/earthly/earth/ gets wrong, all handled here:

1. COMP_POINT is a byte offset into COMP_LINE. Most cases derive it via
   `wc -m`, but two are literal (10 and 9). autocomplete/complete.go
   returns early when compPoint > len(compLine), so a stale offset
   yields no completions and the test fails confusingly rather than
   obviously. Now 8 and 7.
2. The bash completion file is named `earthly` regardless of
   installation name (bootstrap_cmds.go), so the assertions in
   tests/autocompletion/install must keep the old name.
3. The eine tests copy the binary in rather than taking it from the
   image, so their COPY destination moves to `earth` alongside their
   invocations.

Also left on the deprecated spelling on purpose: earthly_config (a shell
variable exported by the entrypoint), earthly.output and
/tmp/*-earthly-script (filenames), github.com/earthly/earthly+base (a
remote target ref), +earthly-docker (a target name), and the
.earthly-test2 / .earthly-not-test directories belonging to cases that
set an installation name explicitly.

CI's installation-name pin and the earth-buildkitd rename live in #801,
so that PR is green on its own; this one is purely the suite rename.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@kmannislands
kmannislands merged commit 5f43263 into main Aug 26, 2026
100 of 102 checks passed
@kmannislands
kmannislands deleted the gh-796-fix-bin-in-published-image branch August 26, 2026 20:34
kmannislands added a commit that referenced this pull request Aug 26, 2026
* test: drive the earth binary throughout the integration suite

`earthly` compatibility symlink. The integration suite still reached the
CLI through the deprecated name, so ~176 call sites were exercising the
symlink rather than the binary users actually get. This drives `earth`
throughout and keeps one deliberate case on `earthly`.

+deprecated-name-test is that case: it asserts the symlink reaches the
CLI and that the rename warning is emitted, so the compatibility path
stays covered deliberately rather than incidentally.

Three things a mechanical s/earthly/earth/ gets wrong, all handled here:

1. COMP_POINT is a byte offset into COMP_LINE. Most cases derive it via
   `wc -m`, but two are literal (10 and 9). autocomplete/complete.go
   returns early when compPoint > len(compLine), so a stale offset
   yields no completions and the test fails confusingly rather than
   obviously. Now 8 and 7.
2. The bash completion file is named `earthly` regardless of
   installation name (bootstrap_cmds.go), so the assertions in
   tests/autocompletion/install must keep the old name.
3. The eine tests copy the binary in rather than taking it from the
   image, so their COPY destination moves to `earth` alongside their
   invocations.

Also left on the deprecated spelling on purpose: earthly_config (a shell
variable exported by the entrypoint), earthly.output and
/tmp/*-earthly-script (filenames), github.com/earthly/earthly+base (a
remote target ref), +earthly-docker (a target name), and the
.earthly-test2 / .earthly-not-test directories belonging to cases that
set an installation name explicitly.

CI's installation-name pin and the earth-buildkitd rename live in #801,
so that PR is green on its own; this one is purely the suite rename.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* test: read the config path from earth_config

The suite read $earthly_config, which earth-entrypoint.sh now exports
only as a deprecated alias of $earth_config. Keeping the call sites on
the alias meant the integration tests were exercising the compatibility
shim rather than the spelling callers get, which is the opposite of what
this branch is for.

The alias itself stays: it is a contract for callers outside this repo,
and scripts/tests/earth-image.sh still asserts it resolves.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* test: remove the unrunnable AWS OIDC integration test

tests/oidc has not been exercised since #32 (Aug 2025), which commented
out the docker-test-oidc-command and podman-test-oidc-command jobs
pending an AWS account; those commented jobs were later dropped from the
workflows entirely, so nothing builds ./tests/oidc+test today.

It could not be reinstated as written in any case. It depends on three
things the fork removed: `earth account login`, which no longer exists as
a subcommand; EARTHLY_TOKEN, documented as removed in
docs/migrating-from-earthly.md along with Earthly Cloud auth; and the
cloud-backed secret `test-oidc-user/token` plus the
`PROJECT other-service+oidc-ci-test/my-project` reference in aws.earth,
neither of which resolves without a cloud provider.

Note this leaves the live --run-with-aws-oidc feature with only unit
coverage (util/oidcutil). The commented-out test-aws-oidc block in
tests/Earthfile still records the error-case assertions if someone
reinstates integration coverage; its pointer to this directory is
dropped.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
janishorsts pushed a commit that referenced this pull request Sep 9, 2026
* fix: ship the CLI as earth in the published docker image

The v0.8.18 release notes document the CLI binary rename earthly -> earth,
and the release assets follow it, but the published earthbuild/earthbuild
image shipped only earthly -- there was no earth anywhere on the filesystem,
so following the release notes into the image failed with "earth: not found".

+earthly-docker hardcoded DEFAULT_INSTALLATION_NAME="earthly" while the
release path passes "earth". That value is an ldflag which also drives the
config dir, the buildkitd container name, the cache volume name and the
buildkit port offset, so the image's CLI disagreed with the released binaries
on all of them -- visible to anyone extracting the CLI from the image, which
is how the issue was found.

DEFAULT_INSTALLATION_NAME is now threaded into +earthly-docker instead of
hardcoded, and declared once as a global in release/Earthfile so the release
binaries and the image cannot drift apart again. The CLI installs as
/usr/bin/earth with an earthly symlink kept for one deprecation cycle.

Two things fall out of the rename:

PortOffset special-cased only "earthly" as the official name, so switching the
image to "earth" would have moved buildkit to 8846 and the local registry to
8845 while earthly-entrypoint.sh and buildkitd.tcp.template hardcode
8372/8371. Both official spellings now offset to zero.

earthly-entrypoint.sh hardcoded /root/.earthly/certs for the certificates the
CLI generates under ~/.<installation name>/certs, which would have become
three dangling symlinks and a TLS failure with no diagnostic. The path now
derives from the installation name the image was built with, and the script
fails loudly if the directory is absent.

Also fixes two defects in the rename notice itself: it claimed earthly "is
currently symlinked" whether or not it was, and its rm suggestion was gated on
a path built from the deprecated name, so it tested for the invoked binary
rather than its replacement.

Fixes #796.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* style: tighten comments in the earth binary rename

Drop changelog voice, ticket references and reviewer-facing justification from
the comments introduced with the image binary rename. State the invariant each
one is protecting instead: that the image and the release binaries must agree on
the installation name, that the official names must map to a zero port offset
because other files hardcode the resulting ports, and that /etc/.earthly is a
caller-supplied mount point rather than a CLI-derived path.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* test: follow the image config dir to ~/.earth

The config tests assert the default config location, which the installation
name determines. The image installs as earth, so the default is ~/.earth.

Cases that set an installation name explicitly keep their own directories.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix: stop the image shadowing a caller's installation name

The entrypoint needs the installation name to locate the certificates the CLI
generates under ~/.<name>/certs, and took it from EARTH_INSTALLATION_NAME baked
into the image. That is the CLI's own variable, and env.Lookup prefers it over
EARTHLY_INSTALLATION_NAME, so the baked value silently overrode a caller using
the deprecated spelling: the CLI kept writing to ~/.earth while the caller
expected their own directory.

Carry the build-time name in EARTH_IMAGE_INSTALLATION_NAME, which the CLI does
not read, and use it only as the fallback when resolving the name.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* ci: address the buildkit daemon under the pinned earth name

#796 makes the published image install the CLI as `earth`, which also
renames the daemon it manages: `earthly-buildkitd` becomes
`earth-buildkitd`. CI built its binaries with
DEFAULT_INSTALLATION_NAME=earthly, so the image test's docker.sock case
looked for `earth-buildkitd`, found nothing, and tried to pull
`ghcr.io/earthbuild/earthbuild:buildkitd-image-test` -- a tag
`+earthly-docker` never builds.

Pin DEFAULT_INSTALLATION_NAME=earth in ci.yml and build-earthly.yml and
follow the name through everywhere CI addresses the daemon directly:
reusable-test.yml and reusable-misc-tests-{1,2}.yml, the registry-certs
test, and the bug-report template.

tests/bootstrap/test-bootstrap.sh derives the name from
$default_install_name instead of hardcoding it, so it tracks whatever CI
passes rather than needing a second edit next time.

earth-retry.sh and the failure-diagnostics defaults keep the deprecated
names alongside the new ones: both are best-effort cleanup and
diagnostics, and a job may still have either container.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix: follow the installation name for the in-image config path

Review feedback on #801: the entrypoint derived the certs directory from
the installation name but kept the config at a hardcoded
/etc/.earthly/config.yml, so the two disagreed as soon as the image
switched to `earth`.

The config now sits at /etc/.<installation name>/config.yml alongside the
other per-installation paths, and the variable is `earth_config` to
match. The pre-rename path is still honoured when a caller mounts a
config there and nothing is mounted at the derived path, so an existing
`-v ./config.yml:/etc/.earthly/config.yml` keeps working for one
deprecation cycle; `earthly_config` stays exported as an alias for the
test call sites that read it.

setup-registry.sh and tests/warn-if-not-logged-in write to the derived
path rather than relying on that fallback, and the Earthfile reads
buildkit_additional_config back from the same place.

Also renames earthly-entrypoint.sh to earth-entrypoint.sh, with
/usr/bin/earthly-entrypoint.sh kept as a symlink: the CI integration
guides name that path explicitly, so it gets the same deprecation cycle
as /usr/bin/earthly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix: silence SC2016 on the entrypoint symlink assertion

+lint-scripts-misc runs shellcheck at default severity, so the info-level
SC2016 fails the build. The single quotes are deliberate: the readlink
is evaluated by `sh -c` inside the container, not by the test script, so
the warning does not apply here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
janishorsts pushed a commit that referenced this pull request Sep 9, 2026
* test: drive the earth binary throughout the integration suite

`earthly` compatibility symlink. The integration suite still reached the
CLI through the deprecated name, so ~176 call sites were exercising the
symlink rather than the binary users actually get. This drives `earth`
throughout and keeps one deliberate case on `earthly`.

+deprecated-name-test is that case: it asserts the symlink reaches the
CLI and that the rename warning is emitted, so the compatibility path
stays covered deliberately rather than incidentally.

Three things a mechanical s/earthly/earth/ gets wrong, all handled here:

1. COMP_POINT is a byte offset into COMP_LINE. Most cases derive it via
   `wc -m`, but two are literal (10 and 9). autocomplete/complete.go
   returns early when compPoint > len(compLine), so a stale offset
   yields no completions and the test fails confusingly rather than
   obviously. Now 8 and 7.
2. The bash completion file is named `earthly` regardless of
   installation name (bootstrap_cmds.go), so the assertions in
   tests/autocompletion/install must keep the old name.
3. The eine tests copy the binary in rather than taking it from the
   image, so their COPY destination moves to `earth` alongside their
   invocations.

Also left on the deprecated spelling on purpose: earthly_config (a shell
variable exported by the entrypoint), earthly.output and
/tmp/*-earthly-script (filenames), github.com/earthly/earthly+base (a
remote target ref), +earthly-docker (a target name), and the
.earthly-test2 / .earthly-not-test directories belonging to cases that
set an installation name explicitly.

CI's installation-name pin and the earth-buildkitd rename live in #801,
so that PR is green on its own; this one is purely the suite rename.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* test: read the config path from earth_config

The suite read $earthly_config, which earth-entrypoint.sh now exports
only as a deprecated alias of $earth_config. Keeping the call sites on
the alias meant the integration tests were exercising the compatibility
shim rather than the spelling callers get, which is the opposite of what
this branch is for.

The alias itself stays: it is a contract for callers outside this repo,
and scripts/tests/earth-image.sh still asserts it resolves.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* test: remove the unrunnable AWS OIDC integration test

tests/oidc has not been exercised since #32 (Aug 2025), which commented
out the docker-test-oidc-command and podman-test-oidc-command jobs
pending an AWS account; those commented jobs were later dropped from the
workflows entirely, so nothing builds ./tests/oidc+test today.

It could not be reinstated as written in any case. It depends on three
things the fork removed: `earth account login`, which no longer exists as
a subcommand; EARTHLY_TOKEN, documented as removed in
docs/migrating-from-earthly.md along with Earthly Cloud auth; and the
cloud-backed secret `test-oidc-user/token` plus the
`PROJECT other-service+oidc-ci-test/my-project` reference in aws.earth,
neither of which resolves without a cloud provider.

Note this leaves the live --run-with-aws-oidc feature with only unit
coverage (util/oidcutil). The commented-out test-aws-oidc block in
tests/Earthfile still records the error-case assertions if someone
reinstates integration coverage; its pointer to this directory is
dropped.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
kmannislands added a commit that referenced this pull request Sep 11, 2026
* docs: rename Earthly to EarthBuild across markdown

Apply the project rename in markdown docs per AGENTS.md conventions:
`Earthly` (project name) becomes `EarthBuild`, and the `earthly` CLI
becomes `earth`.

Preserve literal identifiers: EARTHLY_* env vars, the earthly.dev
domain and subdomains, github.com/earthly repos, earthly/* image and
repo names, +earthly-* targets, /usr/bin/earthly paths, .earthlyignore,
and the __earthly__ completion function.

Leave references to the upstream project untouched: AGENTS.md, the
README fork banner, and docs/migrating-from-earthly.md all describe the
migration from the original Earthly and keep that name. CHANGELOG.md is
left as-is to preserve historical release notes. Also fix the in-page
TOC anchors whose renamed headings would otherwise break.

* Update .github/actions/failure-diagnostics/README.md

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* docs: complete earthly to earth rename in identifiers and paths

Address PR review feedback: rename earthly-prefixed literals that have
earth equivalents in v0.8.18+ (installation name drives the config dir,
buildkit container, and cache volume names).

- Rename EARTHLY_CONFIG/EARTHLY_BUILD_ARGS env vars to EARTH_ prefix
- Rename earthly-cache volume and earthly-buildkitd container references
- Rename ~/.earthly paths to ~/.earth
- Rename .earthlyignore to .earthignore (the code's preferred file)
- Fix docs.earthly.dev to docs.earthbuild.dev in docs-internals
- Revert accidental 'Migrating from earth' back to 'Migrating from earthly'
- Rename doc files/dirs: earthly-command, earthly-config, earthlyignore
  and update all inbound links, anchors, and gitbook redirects
- Update failure-diagnostics action to inspect ~/.earth

* docs: rename remaining ~/.earthly and earthly-buildkitd references

Sweep user-facing docs for installation-name-derived identifiers that
resolve to earth on official releases:
- ~/.earthly/config.yml -> ~/.earth/config.yml
- earthly-buildkitd -> earth-buildkitd (commands and example output)
- earthly-cache -> earth-cache in uninstall steps

Left intact: /etc/.earthly paths (hardcoded in the image entrypoint),
CONTRIBUTING.md (from-source dev workflow), and CHANGELOG.md (history).

* docs: use EARTH_ env var prefix for CLI settings

CLI flag env vars are read via the EarthEnvVars helper, which prefers
the EARTH_ prefix (EARTHLY_ is deprecated). Update all 'Also available
as an env var setting' references and the .env example in the command
reference, plus EARTH_BUILDKIT_HOST/EARTH_TARGET_PADDING/EARTH_FULL_TARGET.

Left intact: image/buildkitd env vars hardcoded as EARTHLY_ in the
entrypoint scripts (EARTHLY_ADDITIONAL_BUILDKIT_CONFIG, EARTHLY_EXEC_CMD,
EARTHLY_TMP_DIR, EARTHLY_RESET_TMP_DIR).

* docs: use EARTH_ORG env var in config reference

* docs: rename earthly-buildkitd to earth-buildkitd in Go example

* Update examples/tutorial/js/part6/README.md

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* Update examples/tutorial/js/README.md

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* Update examples/tutorial/python/part1/README.md

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* Update examples/tutorial/python/part2/README.md

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* Update examples/tutorial/python/part3/README.md

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* Update examples/tutorial/python/part4/README.md

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* Update examples/tutorial/README.md

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* Update release/apt-repo/README.md

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* Update release/yum-repo/README.md

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* Update .gitbook.yaml

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* Update CONTRIBUTING.md

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* Update CONTRIBUTING.md

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* Update CONTRIBUTING.md

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* Update CONTRIBUTING.md

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* Update CONTRIBUTING.md

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* Update CONTRIBUTING.md

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* Update CONTRIBUTING.md

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* Update CONTRIBUTING.md

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* Update CONTRIBUTING.md

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* Update CONTRIBUTING.md

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* Update release/apt-repo/README.md

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* fix: complete EARTHLY_ -> EARTH_ migration for internal vars (#800)

* fix: complete EARTHLY_ -> EARTH_ migration for internal vars

The EARTHLY_ -> EARTH_ rename was done for the CLI surface but not for the
variables EarthBuild sets on itself. Because the deprecation scan cannot tell
a user-set variable from one the product set, the published image emitted six
unactionable warnings per invocation, and EARTHLY_WITH_DOCKER warned you to
migrate to a name that was silently ignored.

Make EarthBuild only ever write EARTH_ names, so the scan becomes correct by
construction and no allowlist is needed:

- Rename the image ENVs, the earthly-entrypoint.sh exports, and the Go writers
  into the buildkitd container. Readers accept the EARTHLY_ spelling via a new
  earth_env shim (buildkitd/earth-env.sh), warning but still working.
- Read WITH_DOCKER through env.Lookup so EARTH_WITH_DOCKER is honoured and the
  earth-in-earth cgroup bind-mount is no longer lost by following the warning.
- Pass WITH DOCKER settings to dockerd-wrapper.sh as flags rather than
  EARTHLY_* environment variables. That removes them from the namespace
  entirely, so they can never trip the scan again. An older CLI paired with a
  newer buildkitd image still works, with a warning.
- Drop EARTHLY_IMAGE and EARTHLY_GIT_CONFIG, which had no reader and no writer
  respectively.

dockerd-wrapper.sh is bind-mounted into RUN commands as a single file, so it
carries its own copy of earth_env rather than sourcing the shared one.

Also sweeps the docs, which #753 deliberately left on the EARTHLY_ spelling
because these variables had no working EARTH_ equivalent until now.

Fixes #751

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* style: tighten comments in the internal env var rename

Drop bare ticket links used as justification, and reword a test comment that
framed itself around the migration rather than the behaviour it covers.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Update buildkitd/buildkitd.go

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* fix: ship the CLI as earth in the published docker image (#801)

* fix: ship the CLI as earth in the published docker image

The v0.8.18 release notes document the CLI binary rename earthly -> earth,
and the release assets follow it, but the published earthbuild/earthbuild
image shipped only earthly -- there was no earth anywhere on the filesystem,
so following the release notes into the image failed with "earth: not found".

+earthly-docker hardcoded DEFAULT_INSTALLATION_NAME="earthly" while the
release path passes "earth". That value is an ldflag which also drives the
config dir, the buildkitd container name, the cache volume name and the
buildkit port offset, so the image's CLI disagreed with the released binaries
on all of them -- visible to anyone extracting the CLI from the image, which
is how the issue was found.

DEFAULT_INSTALLATION_NAME is now threaded into +earthly-docker instead of
hardcoded, and declared once as a global in release/Earthfile so the release
binaries and the image cannot drift apart again. The CLI installs as
/usr/bin/earth with an earthly symlink kept for one deprecation cycle.

Two things fall out of the rename:

PortOffset special-cased only "earthly" as the official name, so switching the
image to "earth" would have moved buildkit to 8846 and the local registry to
8845 while earthly-entrypoint.sh and buildkitd.tcp.template hardcode
8372/8371. Both official spellings now offset to zero.

earthly-entrypoint.sh hardcoded /root/.earthly/certs for the certificates the
CLI generates under ~/.<installation name>/certs, which would have become
three dangling symlinks and a TLS failure with no diagnostic. The path now
derives from the installation name the image was built with, and the script
fails loudly if the directory is absent.

Also fixes two defects in the rename notice itself: it claimed earthly "is
currently symlinked" whether or not it was, and its rm suggestion was gated on
a path built from the deprecated name, so it tested for the invoked binary
rather than its replacement.

Fixes #796.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* style: tighten comments in the earth binary rename

Drop changelog voice, ticket references and reviewer-facing justification from
the comments introduced with the image binary rename. State the invariant each
one is protecting instead: that the image and the release binaries must agree on
the installation name, that the official names must map to a zero port offset
because other files hardcode the resulting ports, and that /etc/.earthly is a
caller-supplied mount point rather than a CLI-derived path.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* test: follow the image config dir to ~/.earth

The config tests assert the default config location, which the installation
name determines. The image installs as earth, so the default is ~/.earth.

Cases that set an installation name explicitly keep their own directories.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix: stop the image shadowing a caller's installation name

The entrypoint needs the installation name to locate the certificates the CLI
generates under ~/.<name>/certs, and took it from EARTH_INSTALLATION_NAME baked
into the image. That is the CLI's own variable, and env.Lookup prefers it over
EARTHLY_INSTALLATION_NAME, so the baked value silently overrode a caller using
the deprecated spelling: the CLI kept writing to ~/.earth while the caller
expected their own directory.

Carry the build-time name in EARTH_IMAGE_INSTALLATION_NAME, which the CLI does
not read, and use it only as the fallback when resolving the name.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* ci: address the buildkit daemon under the pinned earth name

#796 makes the published image install the CLI as `earth`, which also
renames the daemon it manages: `earthly-buildkitd` becomes
`earth-buildkitd`. CI built its binaries with
DEFAULT_INSTALLATION_NAME=earthly, so the image test's docker.sock case
looked for `earth-buildkitd`, found nothing, and tried to pull
`ghcr.io/earthbuild/earthbuild:buildkitd-image-test` -- a tag
`+earthly-docker` never builds.

Pin DEFAULT_INSTALLATION_NAME=earth in ci.yml and build-earthly.yml and
follow the name through everywhere CI addresses the daemon directly:
reusable-test.yml and reusable-misc-tests-{1,2}.yml, the registry-certs
test, and the bug-report template.

tests/bootstrap/test-bootstrap.sh derives the name from
$default_install_name instead of hardcoding it, so it tracks whatever CI
passes rather than needing a second edit next time.

earth-retry.sh and the failure-diagnostics defaults keep the deprecated
names alongside the new ones: both are best-effort cleanup and
diagnostics, and a job may still have either container.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix: follow the installation name for the in-image config path

Review feedback on #801: the entrypoint derived the certs directory from
the installation name but kept the config at a hardcoded
/etc/.earthly/config.yml, so the two disagreed as soon as the image
switched to `earth`.

The config now sits at /etc/.<installation name>/config.yml alongside the
other per-installation paths, and the variable is `earth_config` to
match. The pre-rename path is still honoured when a caller mounts a
config there and nothing is mounted at the derived path, so an existing
`-v ./config.yml:/etc/.earthly/config.yml` keeps working for one
deprecation cycle; `earthly_config` stays exported as an alias for the
test call sites that read it.

setup-registry.sh and tests/warn-if-not-logged-in write to the derived
path rather than relying on that fallback, and the Earthfile reads
buildkit_additional_config back from the same place.

Also renames earthly-entrypoint.sh to earth-entrypoint.sh, with
/usr/bin/earthly-entrypoint.sh kept as a symlink: the CI integration
guides name that path explicitly, so it gets the same deprecation cycle
as /usr/bin/earthly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix: silence SC2016 on the entrypoint symlink assertion

+lint-scripts-misc runs shellcheck at default severity, so the info-level
SC2016 fails the build. The single quotes are deliberate: the readlink
is evaluated by `sh -c` inside the container, not by the test script, so
the warning does not apply here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>

* test: drive the earth binary throughout the integration suite (#803)

* test: drive the earth binary throughout the integration suite

`earthly` compatibility symlink. The integration suite still reached the
CLI through the deprecated name, so ~176 call sites were exercising the
symlink rather than the binary users actually get. This drives `earth`
throughout and keeps one deliberate case on `earthly`.

+deprecated-name-test is that case: it asserts the symlink reaches the
CLI and that the rename warning is emitted, so the compatibility path
stays covered deliberately rather than incidentally.

Three things a mechanical s/earthly/earth/ gets wrong, all handled here:

1. COMP_POINT is a byte offset into COMP_LINE. Most cases derive it via
   `wc -m`, but two are literal (10 and 9). autocomplete/complete.go
   returns early when compPoint > len(compLine), so a stale offset
   yields no completions and the test fails confusingly rather than
   obviously. Now 8 and 7.
2. The bash completion file is named `earthly` regardless of
   installation name (bootstrap_cmds.go), so the assertions in
   tests/autocompletion/install must keep the old name.
3. The eine tests copy the binary in rather than taking it from the
   image, so their COPY destination moves to `earth` alongside their
   invocations.

Also left on the deprecated spelling on purpose: earthly_config (a shell
variable exported by the entrypoint), earthly.output and
/tmp/*-earthly-script (filenames), github.com/earthly/earthly+base (a
remote target ref), +earthly-docker (a target name), and the
.earthly-test2 / .earthly-not-test directories belonging to cases that
set an installation name explicitly.

CI's installation-name pin and the earth-buildkitd rename live in #801,
so that PR is green on its own; this one is purely the suite rename.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* test: read the config path from earth_config

The suite read $earthly_config, which earth-entrypoint.sh now exports
only as a deprecated alias of $earth_config. Keeping the call sites on
the alias meant the integration tests were exercising the compatibility
shim rather than the spelling callers get, which is the opposite of what
this branch is for.

The alias itself stays: it is a contract for callers outside this repo,
and scripts/tests/earth-image.sh still asserts it resolves.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* test: remove the unrunnable AWS OIDC integration test

tests/oidc has not been exercised since #32 (Aug 2025), which commented
out the docker-test-oidc-command and podman-test-oidc-command jobs
pending an AWS account; those commented jobs were later dropped from the
workflows entirely, so nothing builds ./tests/oidc+test today.

It could not be reinstated as written in any case. It depends on three
things the fork removed: `earth account login`, which no longer exists as
a subcommand; EARTHLY_TOKEN, documented as removed in
docs/migrating-from-earthly.md along with Earthly Cloud auth; and the
cloud-backed secret `test-oidc-user/token` plus the
`PROJECT other-service+oidc-ci-test/my-project` reference in aws.earth,
neither of which resolves without a cloud provider.

Note this leaves the live --run-with-aws-oidc feature with only unit
coverage (util/oidcutil). The commented-out test-aws-oidc block in
tests/Earthfile still records the error-case assertions if someone
reinstates integration coverage; its pointer to this directory is
dropped.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>

* fix(deps): update github.com/tonistiigi/fsutil digest to 83cac42 (#865)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update module github.com/sirupsen/logrus to v1.10.2 (#867)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update module google.golang.org/grpc to v1.83.2 (#868)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update module google.golang.org/protobuf to v1.36.12 (#869)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency kubernetes-sigs/kind to v0.33.0 (#870)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update module github.com/gofrs/flock to v0.13.1 (#871)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency com.eed3si9n:sbt-assembly to v2.5.0 (#854)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix: register shell completion for the installed binary name (#857)

The bash and zsh completion entries written by `bootstrap
--with-autocomplete` hardcoded `earthly` as the command word, and
installed to files named `earthly` / `_earthly`. The released binary is
`earth`, so `earth <TAB>` offered nothing.

Derive the command word and the completion filenames from the basename of
the running executable instead. The installation name is deliberately not
used: it names on-disk resources and can be overridden independently of
what the user actually types.

A binary still installed as `earthly` also registers `earth`, matching
the alias symlinkEarthlyToEarth already creates for it.

The uninstall docs in docs/alt-installation already documented
`completions/earth` and `_earth`; this makes the code match.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>

* chore(deps): update dependency scala to v3.9.0 (#872)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update aws sdk (#873)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update otel (#874)

* fix(deps): update otel

* fix: bump to the highest possible otel

* chore: bump semconv to v1.43.0

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* chore(deps): update dependency golangci/golangci-lint to v2.13.2 (#875)

* chore(deps): update dependency golangci/golangci-lint to v2.13.2

* fix: lint

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* chore(deps): update dependency sbt/sbt to v2.0.8 (#876)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update aws sdk (#877)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dockerfile-dependencies (#880)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* docs: add missing param to top-level WITH DOCKER doc (#881)

The Earthfile reference doc for `WITH DOCKER` mentions the `--platform`
flag in the list of args, but it isn't shown in the top level invocation
doc. Add it there.

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* fix(deps): update otel (#879)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): lock file maintenance (#885)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update public.ecr.aws/amazonlinux/amazonlinux docker tag to v2023.12.20260831.0 (#886)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update module github.com/aws/aws-sdk-go-v2/config to v1.33.2 (#887)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update module al.essio.dev/pkg/shellescape to v1.6.1 (#888)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* refactor: migrate from encoding/json to encoding/json/v2 (#883)

* refactor: migrate from encoding/json to standard library encoding/json/v2

* chore: tidy

---------

Co-authored-by: Squirrel <gilescope@gmail.com>

* chore(deps): update dependency bundler to v4.0.20 (#889)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* refactor: use std uuid (#882)

* refactor: use std uuid

* fix: lint

* fix(deps): update dependency org.clojure:clojure to v1.12.6 (#891)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update module golang.org/x/crypto to v0.56.0 (#892)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.16.0 (#893)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update jdkato/vale docker tag to v3.20.0 (#894)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore(deps): update public.ecr.aws/amazonlinux/amazonlinux docker tag to v2027 (#895)

* chore(deps): update public.ecr.aws/amazonlinux/amazonlinux docker tag to v2027

* fix: support both Amazon Linux 2023 and 2027

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

* chore(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.6.0 (#896)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update module github.com/docker/cli to v29.8.0+incompatible (#897)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* fix(deps): update aws sdk (#898)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* chore: tidy

* chore: sort gitbook redirects alphabetically

* chore: tidy release/README.md

* Apply suggestion from @janishorsts

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>

---------

Co-authored-by: Janis Horsts <janis.horsts@gmail.com>
Co-authored-by: Kieran Mann <kieranjarrettmann@gmail.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: John Moon <john.moon@voyagertechnologies.com>
Co-authored-by: Squirrel <gilescope@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted Authored with AI assistance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Published docker image ships earthly, not earth — image build path hardcodes DEFAULT_INSTALLATION_NAME while release path sets earth

2 participants