bazel-contrib / rules_oci

Bazel rules for building OCI containers
Apache License 2.0
305 stars 159 forks source link

`oci_load` fails with flag `--nolegacy_external_runfiles` #701

Open tgeng opened 2 months ago

tgeng commented 2 months ago

Aspect recommends setting --nolegacy_external_runfiles. But this flag makes oci_load failing.

> bazel run //:ubuntu
WARNING: /home/tgeng/tmp/oci-legayc-runfiles/MODULE.bazel:3:20: The module extension oci defined in @rules_oci//oci:extensions.bzl reported incorrect imports of repositories via use_repo():

Not imported, but reported as direct dependencies by the extension (may cause the build to fail):
    ubuntu_linux_amd64

Fix the use_repo calls by running 'bazel mod tidy'.
INFO: Analyzed target //:ubuntu (39 packages loaded, 178 targets configured).
INFO: Found 1 target...
Target //:ubuntu up-to-date:
  bazel-bin/ubuntu.sh
INFO: Elapsed time: 0.343s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: bazel-bin/ubuntu.sh
tar: Error reading archive -: Can't open external/rules_oci~~oci~ubuntu_linux_amd64/layout/blobs/sha256/9df6d6105df2788299e5cbbf3dfd09aa6b3b5a10b784b214c35a035f76deb4ba
tar: Error exit delayed from previous errors.
open /mnt/docker/tmp/docker-import-3457404222/repositories: no such file or directory

See attached zip for a full repro. repro.zip