Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unrelated files are being sent to buildkit on COPYs #1062

Closed
alexcb opened this issue Jun 15, 2021 · 1 comment
Closed

unrelated files are being sent to buildkit on COPYs #1062

alexcb opened this issue Jun 15, 2021 · 1 comment
Assignees
Labels
type:bug Something isn't working

Comments

@alexcb
Copy link
Collaborator

alexcb commented Jun 15, 2021

consider build our deps from within a local context:

$ cd ~/gh/earthly/earthly # where I keep it locally
$ ./earthly -V +deps

deps only has a single COPY:

COPY go.mod go.sum ./

unrelated files are being sent:

             context | sent data for release/yum-repo/output/repo/packages/earthly-0.5.10-1.armv7l.rpm (11 MB)
             context | sent data for release/yum-repo/output/repo/packages/earthly-0.5.12-1.x86_64.rpm (6.5 MB)
             context | sent data for release/yum-repo/output/repo/packages/earthly-0.5.12-1.aarch64.rpm (11 MB)
             context | sent data for main (31 MB)
             context | sent data for release/yum-repo/output/repo/packages/earthly-0.5.12-1.armv7l.rpm (11 MB)
             context | sent data for release/yum-repo/output/repo/repodata/1f1b06d392f52ca0d1a6e12235b527de89007639c5276e93af2c224892c78bc8-other.xml.gz (397 B)
             context | sent data for release/yum-repo/output/repo/repodata/2bd8f905bb02d36c72774478b199d8e6e92727afef21aee245b9bd4a03ffa884-primary.xml.gz (871 B)
             context | sent data for release/yum-repo/output/repo/repodata/2d414c1fde7cdbe66623f8c6126fa11af7986a4a1a23d12c816f420e8b21f0d8-primary.sqlite.bz2 (3.4 kB)

This resulted in way too much data being sent:

transferred 801 file(s) for context . (258 MB, 1118 file/dir stats)

if I rerun earthly -V +deps, these files are cached; however earthly will still walk the dir sendinf file stats:

context | transferred 0 file(s) for context . (60 kB, 1118 file/dir stats)

When I would expect to only send file stats for go.mod and go.sum.

@alexcb
Copy link
Collaborator Author

alexcb commented Jul 27, 2021

#1085 introduced a new feature which can be enabled via:

VERSION --use-copy-include-patterns 0.5 

which will set the underlying include pattern option in buildkit, which limit which files are sent for each build context.

@alexcb alexcb closed this as completed Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant