Skip to content

update to latest buildkit#442

Draft
gilescope wants to merge 143 commits into
mainfrom
giles-update-latest-buildkit
Draft

update to latest buildkit#442
gilescope wants to merge 143 commits into
mainfrom
giles-update-latest-buildkit

Conversation

@gilescope
Copy link
Copy Markdown

@gilescope gilescope commented Apr 10, 2026

In for a penny, in for a pound.

This is pointing to EarthBuild/buildkit#14

Signed-off-by: Giles Cope <gilescope@gmail.com>
Signed-off-by: Giles Cope <gilescope@gmail.com>
Signed-off-by: Giles Cope <gilescope@gmail.com>
Signed-off-by: Giles Cope <gilescope@gmail.com>
Signed-off-by: Giles Cope <gilescope@gmail.com>
@gilescope gilescope requested a review from a team as a code owner April 10, 2026 13:16
@gilescope gilescope requested review from kmannislands and removed request for a team April 10, 2026 13:16
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 10, 2026

⚠️ Are we earthbuild yet?

Warning: "earthly" occurrences have increased by 156 (2.81%)

📈 Overall Progress

Branch Total Count
main 5557
This PR 5713
Difference +156 (2.81%)

📁 Changes by file type:

File Type Change
Go files (.go) ❌ +23
Documentation (.md) ➖ No change
Earthfiles ✅ -30

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 occurences of earthly in the source code due to backwards compatibility with config files and language constructs.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates repository references and URLs from the 'earthly' organization to 'EarthBuild' across documentation and build configurations. It also performs a significant update of Go dependencies, including upgrading gRPC to v1.80.0 and updating various containerd and Docker-related packages. A bug was identified in the buildkitd/Earthfile where a log message references an undefined variable ${BUILDKIT_BRANCH} instead of ${BUILDKIT_GIT_BRANCH}.

Comment thread buildkitd/Earthfile
echo "looking up branch $BUILDKIT_GIT_BRANCH"; \
buildkit_sha1=$(git ls-remote --refs -q https://github.com/$BUILDKIT_GIT_ORG/buildkit.git "$BUILDKIT_GIT_BRANCH" | awk 'BEGIN { FS = "[ \t]+" } {print $1}'); \
echo "pinning github.com/earthly/buildkit@${BUILDKIT_BRANCH} to reference git sha1: $buildkit_sha1"; \
echo "pinning github.com/${BUILDKIT_GIT_ORG}/buildkit@${BUILDKIT_BRANCH} to reference git sha1: $buildkit_sha1"; \
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The variable ${BUILDKIT_BRANCH} is used in this log message, but the argument defined in this scope is BUILDKIT_GIT_BRANCH. This will result in an empty string being printed for the branch name in the logs. Since you are already modifying this line to parameterize the organization, you should also correct the branch variable name.

            echo "pinning github.com/${BUILDKIT_GIT_ORG}/buildkit@${BUILDKIT_GIT_BRANCH} to reference git sha1: $buildkit_sha1"; \

Signed-off-by: Giles Cope <gilescope@gmail.com>
Signed-off-by: Giles Cope <gilescope@gmail.com>
Signed-off-by: Giles Cope <gilescope@gmail.com>
Signed-off-by: Giles Cope <gilescope@gmail.com>
Signed-off-by: Giles Cope <gilescope@gmail.com>
Alpine 3.22 moved iptables from /sbin to /usr/sbin.

Signed-off-by: Giles Cope <gilescope@gmail.com>
- Update buildkit fork ref to f4ec24bc (includes GRPC_ENFORCE_ALPN_ENABLED=false)
- Disable gRPC ALPN enforcement in earthly client and buildkitd entrypoint
  for backwards compat with older grpc-go during upgrade transition
- Search /usr/sbin in addition to /sbin for iptables (Alpine 3.22 change)
- Bump all CI EARTHLY_BUILDKIT_IMAGE refs to v0.8.17-fix.4

Signed-off-by: Giles Cope <gilescope@gmail.com>
@gilescope gilescope force-pushed the giles-update-latest-buildkit branch from 990ef27 to c42959c Compare April 11, 2026 05:45
Older earth binaries pass EARTHLY_ADDITIONAL_BUILDKIT_CONFIG with the
TOML section header and key on the same line (e.g.
[registry."docker.io"] mirrors = [...]).  The new buildkit's TOML
parser requires a newline after section headers.  Post-process the
generated buildkitd.toml to split these.

Signed-off-by: Giles Cope <gilescope@gmail.com>
Upstream buildkit added a strict verifier that rejects multiple refs
without platform mapping.  Earthly's multi-BUILD pattern legitimately
produces this.  The buildkit fork now downgrades this to a warning.

Signed-off-by: Giles Cope <gilescope@gmail.com>
Signed-off-by: Giles Cope <gilescope@gmail.com>
@gilescope
Copy link
Copy Markdown
Author

21 green CI jobs! It's a start.

Signed-off-by: Giles Cope <gilescope@gmail.com>
Three concurrent Go compilations (buildkitd, ticktock-buildkitd,
earthly) exceed the 16GB runner memory under Podman, causing OOM
kills that manifest as silent cancellations.

Signed-off-by: Giles Cope <gilescope@gmail.com>
The old SHA 88ecf5d6 is incompatible with the current codebase:
missing client/llb/sourceresolver package and containerd API
version conflicts.  Point to the same buildkit fork commit
(da92d3419) used by the main build.

Signed-off-by: Giles Cope <gilescope@gmail.com>
Three concurrent Go compilations (buildkitd, buildctl, earthly) exceed
runner memory under Podman.  Limiting max-parallelism to 2 serialises
the heaviest compilation steps, keeping peak memory within bounds.

Signed-off-by: Giles Cope <gilescope@gmail.com>
The build-earthly parallelism fix only applied to the build step.
Test jobs bootstrap their own buildkitd via stage2-setup, so they
also need the parallelism limit to avoid OOM during Go compilations.

Signed-off-by: Giles Cope <gilescope@gmail.com>
The earthly-next build is even heavier than normal (update-buildkit +
two buildkitd variants + earthly). Apply max-parallelism=2 to prevent
OOM on standard CI runners.

Signed-off-by: Giles Cope <gilescope@gmail.com>
Move GCR mirror config and max-parallelism before bootstrap so
buildkitd starts with the correct settings first time, avoiding
a restart that may not pick up max-parallelism correctly.

Signed-off-by: Giles Cope <gilescope@gmail.com>
Docker earthly-next tests also OOM with default parallelism of 20.
Apply the limit for all CI builds, not just Podman/earthly-next.

Signed-off-by: Giles Cope <gilescope@gmail.com>
@gilescope gilescope closed this May 1, 2026
@gilescope gilescope reopened this May 1, 2026
@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 6, 2026

@janishorsts janishorsts marked this pull request as draft May 12, 2026 20:37
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