question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Garden not detecting finished buildkit job

See original GitHub issue

Bug

Current Behavior

Garden does not detect that a buildkit job is finished, and basically hangs. If the local CLI command is stopped and re-run, then it’s correctly registered as already built, and the steps continue.

Expected behavior

Correctly detect a finished build

Reproducible example

(Note that I haven’t yet tried to replicate this) The dockerfile in particular is of the following format

# The below get passed from other garden-build modules as buildargs
ARG BASE_IMAGE_VERSION
ARG BASE_IMAGE_NAME
FROM ${BASE_IMAGE_NAME}:${BASE_IMAGE_VERSION} as builder
WORKDIR /app
COPY . .
RUN ./command_that_builds.sh && \
  mkdir compiled-binaries && \
  ./copy_binaries.sh compiled-binaries && \
  ./clean_compilation.sh

# The below is only used as a binary container. I'd use scratch, but kaniko did not like that
FROM alpine
COPY --from=builder /app/compiled-binaries /
COPY --from=builder /app/resources /

Your environment

  • OS: Linux
  • How I’m running Kubernetes: AKS

garden version 0.12.46

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
agates4commented, Dec 1, 2022

After manually testing with a built version of Garden from the linked pull request, the issue on our end is resolved!

2reactions
stefreakcommented, Oct 31, 2022

@to266 no, absolutely not, we will dig into this and fix it. I think I also ran into this issue today.

Thank you so much for sharing this with us, especially your workaround, this is super helpful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Buildkit: "docker build --cache-from" doesn't use ... - GitHub
I'm using docker build with --cache-from on a multi-stage build to allow caching in a gitlab-ci (docker in docker) environment.
Read more >
local-kubernetes - Garden documentation
when the build is finished, upload cache information to `_buildcache` ... This is because buildkit will not actually use all imported. # caches....
Read more >
Docker BuildKit: Securing Without Losing Speed & Cache ...
This is great because the layers created by the first image are not cached, so the secret isn't stored and isn't pushed with...
Read more >
BuildKit - Docker Documentation
Detect and skip transferring unused files in your build context; Use Dockerfile frontend implementations with many new features; Avoid side effects with rest...
Read more >
Garden | VMware Tanzu Docs
This topic describes Garden, the component that VMware Tanzu Application Service for VMs (TAS for VMs) uses to create and manage isolated ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found