Skip to content

Conversation

@jgehrcke
Copy link
Collaborator

@jgehrcke jgehrcke commented Jun 10, 2025

The go build takes slightly more than one minute on my machine, and about ~30 seconds on a fast multi-core box. The go build contributes almost 100 % to the image build time.

It's currently triggered when changing any file in the build context because we COPY . . before invoking the build.

This is of course useful in order to make sure we never accidentally don't invalidate. As we all know... missing cache invalidation can be one of the most annoying things.

But I think we should work towards a trade-off here. Mutation of certain files (think: allow-listing) should not invalidate the go build cache layer.

This comes from the perspective of rebuilding at high frequency during local dev / bisection / debugging / dev.

Signed-off-by: Dr. Jan-Philip Gehrcke <[email protected]>
@jgehrcke
Copy link
Collaborator Author

(done as part of working on #389, removing this patch from there)

WORKDIR /build
COPY . .

# Copy everything that is needed for the go build, but do not invalidate go
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

s/but/and

@jgehrcke
Copy link
Collaborator Author

jgehrcke commented Jul 1, 2025

Thanks for having had a look @elezar! Let's land this, and learn as we go. Not very attached to this particular way of doing things -- I just think it's worth making some kind of progress now.

@jgehrcke jgehrcke merged commit ca68be7 into NVIDIA:main Jul 1, 2025
13 checks passed
@klueska klueska added this to the v25.3.0 milestone Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants