-
Notifications
You must be signed in to change notification settings - Fork 691
docker load fails with "duplicates of file paths not supported" #246
Comments
Trying to reproduce this now, I'll post back anything I find here. |
Ok, there is definitely something weird going on here: # This looks like the output of //:foo
-r-xr-xr-x 0/0 7696 1970-01-01 00:00 ./app/main.binary.runfiles/__main__/foo
# This contains the data for foo and creates the conflict.
drwxr-xr-x 0/0 0 1970-01-01 00:00 ./app/main.binary.runfiles/__main__/foo/
-r-xr-xr-x 0/0 1 1970-01-01 00:00 ./app/main.binary.runfiles/__main__/foo/data.txt If I rename your target to something else (e.g. |
Perhaps we're laying things out in a strange fashion, but this seems like something perhaps Bazel should reject... |
I can see a few options:
WDYT? FYI: I found a thread on bazel-discuss where someone was confused by the shadowing behaviour (with |
I think we at least want I'm going to assign this to @damienmg to refile this appropriately for the broader context. |
is this still an issue? please reopen if so. |
Looks like bazel has added a warning:
So even though the latest rules_docker still has the same confusing error, Bazel's warning should help users figure it out. Seems good enough to me. |
If you pass a binary as data to a py_image, and this conflicts with a directory of the same name,
docker load
will fail with this error:Error processing tar file(duplicates of file paths not supported):
Nothing follows the colon :(
You can get more detail as to the cause of the error by running the binary corresponding to the image:
Then you can rename your binary to avoid the conflict.
Expected behaviour
rules_docker could print a warning or error when there are path conflicts.
Arguably, rules_docker shouldn't produce invalid tar files, although it's hard to blame it when the user has asked it to do this. I'm mostly posting this so that the error is google-able.
Repro
The text was updated successfully, but these errors were encountered: