-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
feat: don't produce big tar file as default output of oci_tarball #548
Conversation
This is expected to be a big performance improvement because it doesn't overload the remote cache with these files, that only should be needed for local dev workflow of load'ing the image into a container runtime.
@thesayyn we have to figure out whether we want to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems pretty reasonable to me!
916fe8d
to
f35d705
Compare
That forces the big .tar file to be an action output, which is not good for caching. Instead the docker driver that can load the image is preferred.
bd152b2
to
7499f36
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small nit, looks great!
Instead stream the output of tar as the stdin of docker load
This is expected to be a big performance improvement because it doesn't overload the remote cache with these files, that only should be needed for local dev workflow of load'ing the image into a container runtime.
Outputs
The default output is an mtree specification file.
This is because producing the tarball in
bazel build
is expensive, and should typically not be an input to any other build actions,so producing it only creates unnecessary load on the action cache.
If needed, the
tarball
output group allows you to depend on the tar output from another rule.On the command line,
bazel build //path/to:my_tarball --output_groups=tarball
or in a BUILD file: