-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
The associated file is either missing or is an invalid symlink. #501
Comments
I'm getting a similar error in my repo, the oci_image_index fails on linux, but seems to work on macos M1. |
Algo got the same error when attempting to use Github Actions to enable CI for the repository. |
Well i fixed it with this. bazel_dep(name = "aspect_bazel_lib", version = "1.36.0")
bazel_dep(name = "rules_oci", version = "1.7.1")
# Right now we are using a fork of rules_oci until the bug is fixed from bazel team.
# The fork uses `yq` to pull and verify the checksum, instead of using the default `jq`
# `jq` with rules_oci has issues with linux arm64 hosts. (ie. MacOs arm64 hosts as well)
# The issue is tracked here:
# * https://github.com/bazel-contrib/rules_oci/issues/253
# * https://bazelbuild.slack.com/archives/CA3NW13MH/p1707430756750789
# Date - 15-02-2024 @oh-tarnished
git_override(
module_name = "rules_oci",
commit = "e060819b2b19dd827f255900068e134b4914ff63",
remote = "https://github.com/archen/rules_oci",
)
ext = use_extension("@aspect_bazel_lib//lib:extensions.bzl", "toolchains")
use_repo(ext, "yq_toolchains") # For checksum verification |
Interesting, using
Using verbose_failures doesn't output any further information. Note that in my case I'm building a multi arch image on a linux/amd64 host. The failure I get is:
|
I tried #501 (comment) but got a different error:
|
This is due to Bazel bug i believe. in bazel-lib 2.x we don't have any action requirements to make copy_to_directory work with BWOB https://github.com/aspect-build/bazel-lib/blob/aa6a58f73cfc7b6833e2d5f7a0c289f293e96637/lib/private/copy_common.bzl#L4 in bazel-lib 1.36.0 this should work. |
I did a quick try with bazel lib 1.36.0:
But still getting error:
|
Another data point, I'm using the rules in a bazel macro, if I add the tags=["no-sandbox"] to the oci rules it also seems to work. |
#525 fixes this. Can someone try and see if it fixes this? |
I don't know if I'm exactly in this same case because I don't have exactly the same error but it's certainly due to the difference between bazel 7.0 and 7.1. Bazel: I have a simple rule returning all OCI images created by a rule equivalent to def _impl(ctx):
return [DefaultInfo(files = depset(ctx.files.image))]
_multi_arch_images = rule(
implementation = _impl,
attrs = {
...
"image": attr.label(
cfg = _multi_arch_images_transition,
mandatory = True,
allow_files = True,
),
"_allowlist_function_transition": attr.label(
default = "@bazel_tools//tools/allowlists/function_transition_allowlist",
),
},
) No problem to build all these images. Blobs files are all ok. And I have a oci_image_index(
...
images = [multi_arch_images_rule_name],
...
)
All blobs files are symbolic links targetting non existing files in It's ok with
EDIT: I didn't say anything. #525 works fine 👌 |
Can i close this now? |
I'm ok with closing for now, I have a workaround in place. I will wait for #525 to be released and once I update I will try to remove the workarounds and see if it fixes, if not I'll reopen the issue. |
This is released in https://github.com/bazel-contrib/rules_oci/releases/tag/v1.7.5 Feel free to reopen if it's still an issue. |
Hey all, i am trying to build a
multi-arch
images for my project usingrules_oci
Here's my
MODULE.bazel
using bazel version7.0.2
Issue is while building the
oci_image_index
here is myBUILD.bazel
fileError Logs
I'm unable to understand what is causing the issue i went thought this #425 issue. I even rolled backed the versions, didn't work.
The text was updated successfully, but these errors were encountered: