bazel-buildfarm icon indicating copy to clipboard operation
bazel-buildfarm copied to clipboard

[maybe bug] OUTPUT_DIRECTORY_IS_OUTPUT_ANCESTOR check failure

Open manageryzy opened this issue 3 years ago • 1 comments

In my case, I was using makefile build in rules_foreign_cc

here are my bazel aquery result:

  Outputs: [bazel-out/k8-fastbuild/bin/external/python3/copy_cpython3_make/cpython3_make (TreeArtifact), bazel-out/k8-fastbuild/bin/external/python3/cpython3_make/bin (TreeArtifact), bazel-out/k8-fastbuild/bin/external/python3/cpython3_make/bin/python3, bazel-out/k8-fastbuild/bin/external/python3/cpython3_make/include (TreeArtifact), bazel-out/k8-fastbuild/bin/external/python3/cpython3_make/lib (TreeArtifact), bazel-out/k8-fastbuild/bin/external/python3/cpython3_make/lib/libpython3.8d.a, bazel-out/k8-fastbuild/bin/external/python3/cpython3_make/share (TreeArtifact), bazel-out/k8-fastbuild/bin/external/python3/cpython3_make_foreign_cc/Configure.log]
  Environment: [PATH=/bin:/usr/bin]
  ExecutionInfo: {block-network: ''}
  Command Line: (exec /bin/bash \
    -c \
    bazel-out/k8-fastbuild/bin/external/python3/cpython3_make_foreign_cc/wrapper_build_script.sh)
# Configuration: 74d1648134a5a5026fb99e6d0be598e176bd2ebc2abcab7390a33535135c7fde
# Execution platform: @local_config_platform//:host
  ExecutionInfo: {block-network: ''}

image image

Checking in validateOutputs of AbstractServerInstance did not passed for there are dup path of object.

manageryzy avatar Apr 24 '22 03:04 manageryzy

Do you have a reproducer WORKSPACE for this? It just looks like a build of python3 that should be fairly compact, so that we can deal with this usecase.

The conflict in question comes when both bazel-out/k8-fastbuild/bin/external/python3/cpython3_make/lib directory and bazel-out/k8-fastbuild/bin/external/python3/cpython3_make/lib/libpython3.8d.a file are specified - it is redundant to specify files as outputs under a directory that is already an output. Buildfarm is (roughly) trying to be helpful and avoiding presenting this, as we contractually have to specify both as returns. I could be convinced that this could be done efficiently at least in this case (versus a case of nested directory specification, which would also fail this check).

werkt avatar Jul 24 '22 04:07 werkt

Closing this without user followup. Feel free to reopen if you have a reproducer.

werkt avatar Jan 20 '23 20:01 werkt