aspect-build / bazel-examples

Bazel examples
https://aspect.build
Apache License 2.0
112 stars 70 forks source link

[Bug]: oci_python_image / py_layers needs tar compression for oci_rules v2 #372

Open gfrankliu opened 2 days ago

gfrankliu commented 2 days ago

What happened?

Quote from rules_oci v2 CHANGES

This means we need to update py_layers to compress the layer.

Version

oci_rules v2

How to reproduce

No response

Any other information?

No response

gfrankliu commented 2 days ago

Below change seems to fix it:

--- py_layer.bzl.orig   2024-11-13 19:35:49.533455430 +0000
+++ py_layer.bzl    2024-11-13 19:35:33.293063953 +0000
@@ -65,6 +65,8 @@
         tar(
             name = layer_target,
             srcs = [binary],
+            compress = "gzip",
+            args = ["--options=gzip:!timestamp"],
             mtree = "{}.{}_tar_manifest".format(name, layer),
         )