bazel-contrib / rules_oci

Bazel rules for building OCI containers
Apache License 2.0
255 stars 132 forks source link

rules_oci@v2beta1 bazel run with remote execution does not work correctly #643

Open juanzolotoochin opened 3 days ago

juanzolotoochin commented 3 days ago

When I do:

$ bazel run //path/to:oci_push

And I have remote execution enabled via --bes_backend and --remote_download_outputs=toplevel it fails with:

2024/07/02 10:33:57 existing blob: sha256:893fbf7914f5d3b1fd9cb21e026aff8272338b581ea4eea19748091b0d7ed80c
2024/07/02 10:33:57 existing blob: sha256:b30e7a7784779eeb8b5f08aba3cfe4b5222760a62a3e41293d2234d59be8a182
2024/07/02 10:33:57 existing blob: sha256:878dd088de17af19b02f566314fd514bff227297f01b074dc436701059185699
2024/07/02 10:33:57 existing blob: sha256:9305790b8fb52a3ba1e96257850b796294084cac27c403e5334b0bda0a7050d7
Error: open path/to/image/blobs/sha256/70f0a1617dc909b6d0da8c1cd1b18ca098e6c84c679d274bab4e07f52e6d9c60: no such file or directory

it works fine if you set --remote_download_outputs=all but AFAIK it should not be necessary if my understanding of the flag is correct. This works fine in v1.

thesayyn commented 2 days ago

this is probably fixed by #646, can you try using the 2.x branch?

mkmik commented 2 days ago

I encountered the issue in 2.0.0-beta0. I tried 2.0.0-beta1 and it fixed the issue for me.

I assume the title of this issue has a typo and it should be beta0 since beta1 contains the fix referenced by @thesayyn and the issue predates the beta1 release