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

Tar symlinks cannot find layer from external repository #566

Closed
brett-patterson-ent opened this issue May 10, 2024 · 6 comments · Fixed by #567 or #576
Closed

Tar symlinks cannot find layer from external repository #566

brett-patterson-ent opened this issue May 10, 2024 · 6 comments · Fixed by #567 or #576

Comments

@brett-patterson-ent
Copy link

I was trying out the 2.x changes for the performance improvements and ran into an issue where I cannot use a tar file layer from an external repository. The generated image.sh will fail to find them:

realpath: bazel-out/darwin_arm64-fastbuild/bin/external/_main~_repo_rules~git/data.tar: No such file or directory

Sample reproduction: https://github.com/brett-patterson-ent/rules_oci_repro. I have a commented out patch in there that fixes the immediate issue, but I'm not sure if it's the proper fix.

@gergelyfabian
Copy link
Contributor

Probably another repro for the same bug:

2.x...gergelyfabian:rules_oci:2.x_symlink_debug

bazel build //examples/test2:extended

@thesayyn
Copy link
Collaborator

Thank you for making a reproducer, the fix is already here: #567

@gergelyfabian
Copy link
Contributor

Updated my reproduce branch (2.x_symlink_debug) with the latest 2.x branch.
Now there is a different error:

$ bazel build //examples/test2:extended
INFO: Invocation ID: e7d1ca03-588c-4e30-bada-640eb623e0b0
INFO: Analyzed target //examples/test2:extended (3 packages loaded, 46 targets configured).
ERROR: /home/user/opt/rules_oci/examples/test2/BUILD:56:10: OCI Image //examples/test2:extended failed: (Exit 1): image_extended.sh failed: error executing OCIImage command (from target //examples/test2:extended) bazel-out/k8-fastbuild/bin/examples/test2/image_extended.sh '--from=bazel-out/k8-fastbuild/bin/examples/test2/base' ... (remaining 5 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
ln: Already exists
Target //examples/test2:extended failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.433s, Critical Path: 0.18s
INFO: 2 processes: 2 internal.
ERROR: Build did NOT complete successfully

@thesayyn
Copy link
Collaborator

That makes sense, #576 should fix this for good.

@gergelyfabian
Copy link
Contributor

gergelyfabian commented May 14, 2024

Upgraded my repro branch from #576, and it still fails:

$ bazel build //examples/test2:extended
...
ln: Already exists

2.x...gergelyfabian:rules_oci:2.x_symlink_debug

@thesayyn
Copy link
Collaborator

Upgraded my repro branch from #576, and it still fails:

Thank you. this is fixed by #576 at 2.x now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants