You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The behaviour has been seen both when running a remote docker and a local docker in GitHub Actions.
Earthfile and Buildkit logs are included below.
The line where the nil pointer exception is seen is here: https://github.com/moby/buildkit/blob/master/solver/jobs.go#L525
Resolution
Determine the underlying cause of the issue.
Update buildkit as we are a few months behind upstream (in case it was already resolved).
Tidy the error message when failing to unmarshal the response from docker version.
Earthfile
Minimum
VERSION 0.6
test-case:
FROM debian
RUN --push mkdir -p artifact
SAVE ARTIFACT artifact AS LOCAL test-output/artifact
VERSION 0.6
all:
BUILD +push-artifacts
test-preparation:
FROM debian
RUN mkdir /work
WORKDIR /work
RUN apt-get update -y && \
apt-get install -y \
puppet \
puppet-lint \
bundler \
libsodium-dev \
curl \
git
COPY Gemfile .
RUN bundle install
# Install gsutils
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && \
apt-get update -y && apt-get install -y google-cloud-sdk
COPY --dir \
bootstrap \
build \
common_data_all_envs \
environments \
modules \
spec \
test \
kitchen-google.yml \
verifier.sh \
test_run.sh \
Gemfile \
.
COPY . .
RUN ls -alh .
RUN du -sh *
RUN test/test_setup.sh
RUN test/syntax_check.sh
push-artifacts:
FROM +test-preparation
ARG SANITIZED_BRANCH
ARG GOOGLE_APPLICATION_CREDENTIALS=google_credentials.json
RUN --mount type=secret,target=${GOOGLE_APPLICATION_CREDENTIALS},id=+secrets/gcloud \
gcloud auth activate-service-account --key-file=${GOOGLE_APPLICATION_CREDENTIALS}
IF [ "${SANITIZED_BRANCH}" = "master" ]
RUN --push build/build_artifacts.sh
ELSE
RUN --push build/build_artifacts-feature-branch.sh
END
SAVE ARTIFACT artifact AS LOCAL test-output/artifact
Earthly Logs
Two different scenarios:
00:39:40.549 Total 38m59.024992861s
00:39:40.549 Total (real) 38m42.140056269s
00:39:40.549 Share your logs with an Earthly account (experimental)! Register for one at https://ci.earthly.dev/.
00:39:40.549 Error stack trace:
00:39:40.549 github.com/moby/buildkit/client.(*Client).solve.func4
00:39:40.549 /go/pkg/mod/github.com/earthly/buildkit@v0.0.1-0.20220913002628-9c256c19c539/client/solve.go:300
00:39:40.549 golang.org/x/sync/errgroup.(*Group).Go.func1
00:39:40.549 /go/pkg/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c/errgroup/errgroup.go:57
00:39:40.549 runtime.goexit
00:39:40.549 /usr/local/go/src/runtime/asm_amd64.s:1581
00:39:40.549 Error: build target: build push: failed to receive status: rpc error: code = Unavailable desc = error reading from server: EOF
00:39:40.809
00:01:11.272 frontend | Running command: docker info
00:01:11.530 frontend | Running command: docker info --format={{.SecurityOptions}}
00:01:11.530 frontend | docker-shell frontend initialized.
00:01:11.787 frontend | Running command: docker container inspect earthly-buildkitd
00:01:11.787 buildkitd | Starting buildkit daemon as a docker container (earthly-buildkitd)...
00:01:11.787 frontend | Running command: docker container inspect earthly-buildkitd
00:01:11.787 frontend | Running command: docker rm earthly-buildkitd
00:01:11.787 frontend | Running command: docker image inspect earthly/buildkitd:v0.6.27
00:01:11.787 frontend | Running command: docker version --format={{json .}}
00:01:11.787 frontend | Running command: docker run --privileged --env BUILDKIT_TLS_ENABLED=false --env BUILDKIT_MAX_PARALLELISM=20 --env BUILDKIT_DEBUG=false --env BUILDKIT_TCP_TRANSPORT_ENABLED=false --label dev.earthly.settingshash=2593e4a9ed74e9f --mount type=volume,source=earthly-cache,dst=/tmp/earthly --publish 127.0.0.1:8373:8373/tcp --publish 127.0.0.1:8371:8371/tcp -d --name earthly-buildkitd earthly/buildkitd:v0.6.27
00:01:12.046 Share your logs with an Earthly account (experimental)! Register for one at https://ci.earthly.dev/.
00:01:12.046 Error stack trace:
00:01:12.046 github.com/earthly/earthly/util/containerutil.(*dockerShellFrontend).Information
00:01:12.046 /earthly/util/containerutil/docker.go:102
00:01:12.046 github.com/earthly/earthly/util/containerutil.(*shellFrontend).supportsPlatform
00:01:12.046 /earthly/util/containerutil/shell_shared.go:343
00:01:12.046 github.com/earthly/earthly/util/containerutil.(*shellFrontend).ContainerRun
00:01:12.046 /earthly/util/containerutil/shell_shared.go:197
00:01:12.046 github.com/earthly/earthly/buildkitd.Start
00:01:12.046 /earthly/buildkitd/buildkitd.go:466
00:01:12.046 github.com/earthly/earthly/buildkitd.MaybeStart
00:01:12.046 /earthly/buildkitd/buildkitd.go:178
00:01:12.046 github.com/earthly/earthly/buildkitd.NewClient
00:01:12.046 /earthly/buildkitd/buildkitd.go:76
00:01:12.046 main.(*earthlyApp).actionBuildImp
00:01:12.046 /earthly/cmd/earthly/build_cmd.go:221
00:01:12.046 main.(*earthlyApp).actionBuild
00:01:12.046 /earthly/cmd/earthly/build_cmd.go:78
00:01:12.046 github.com/urfave/cli/v2.(*App).RunContext
00:01:12.046 /go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:322
00:01:12.046 main.(*earthlyApp).run
00:01:12.046 /earthly/cmd/earthly/main.go:535
00:01:12.046 main.main
00:01:12.046 /earthly/cmd/earthly/main.go:268
00:01:12.046 runtime.main
00:01:12.046 /usr/local/go/src/runtime/proc.go:255
00:01:12.047 runtime.goexit
00:01:12.047 /usr/local/go/src/runtime/asm_amd64.s:1581
00:01:12.047 Error: build new buildkitd client: maybe start buildkitd: start: could not start buildkit: 1 error occurred:
00:01:12.047 * failed to get platform information: failed to parse docker version output: invalid character 'W' after top-level value
The fix will be automatically included in VERSION 0.7, but there is a workaround for now:
add --wait-block to the version line. VERSION --wait-block 0.6
Internally, this changes the behaviour of our --push implementation, which seems to resolve the issue.
This is this Earthfile passes now.
With that feature a new BUILT_IN arg is also exposed (not documented yet) that is set to "true" if --push is specified:
VERSION --wait-block 0.6
push:
FROM alpine
RUN echo "in the push target"
test:
FROM debian
ARG EARTHLY_PUSH
IF [ "$EARTHLY_PUSH" = "true" ]
BUILD +push
END
Slack conversation: https://earthlycommunity.slack.com/archives/C01DL2928RM/p1666094497824899
A nil pointer exception is sometimes encountered when running an earthly target.
The behaviour has been seen both when running a remote docker and a local docker in GitHub Actions.
Earthfile and Buildkit logs are included below.
The line where the nil pointer exception is seen is here: https://github.com/moby/buildkit/blob/master/solver/jobs.go#L525
Resolution
docker version
.Earthfile
Minimum
Earthly Logs
Two different scenarios:
Buildkit logs
The text was updated successfully, but these errors were encountered: