-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Flag flip for --experimental_sibling_repository_layout
and --legacy_external_runfiles
#12821
Comments
Nevermind, that's different. I guess the behavior just changed to the above for tests only, but without a feature flag in the first place? I'm not sure, trying to find out why that change happened, why it breaks our tests and what expected migration looks like. |
I've dug a bit more into this, and I'm convinced that is a regression by now. In a nutshell, we're building this test from the aos repository, and we're seeing this test error: [2022-03-31T10:42:05Z] (cd /mnt/buildkite-agent/builds/buildkite-prd-g-i-00afc7d8bffa69495-1/k8_output_base/execroot/shasta && \
[2022-03-31T10:42:05Z] exec env - \
[2022-03-31T10:42:05Z] EXPERIMENTAL_SPLIT_XML_GENERATION=1 \
[2022-03-31T10:42:05Z] JAVA_RUNFILES=bazel-out/k8-dbg/bin/external/aos/aos/util/scoped_pipe_test.runfiles \
[2022-03-31T10:42:05Z] PATH=/bin:/usr/bin:/usr/local/bin \
[2022-03-31T10:42:05Z] PYTHON_RUNFILES=bazel-out/k8-dbg/bin/external/aos/aos/util/scoped_pipe_test.runfiles \
[2022-03-31T10:42:05Z] RUNFILES_DIR=bazel-out/k8-dbg/bin/external/aos/aos/util/scoped_pipe_test.runfiles \
[2022-03-31T10:42:05Z] RUN_UNDER_RUNFILES=1 \
[2022-03-31T10:42:05Z] TEST_BINARY=../aos/aos/util/scoped_pipe_test \
[2022-03-31T10:42:05Z] TEST_INFRASTRUCTURE_FAILURE_FILE=bazel-out/k8-dbg/testlogs/external/aos/aos/util/scoped_pipe_test/test.infrastructure_failure \
[2022-03-31T10:42:05Z] TEST_LOGSPLITTER_OUTPUT_FILE=bazel-out/k8-dbg/testlogs/external/aos/aos/util/scoped_pipe_test/test.raw_splitlogs/test.splitlogs \
[2022-03-31T10:42:05Z] TEST_NAME=@aos//aos/util:scoped_pipe_test \
[2022-03-31T10:42:05Z] TEST_PREMATURE_EXIT_FILE=bazel-out/k8-dbg/testlogs/external/aos/aos/util/scoped_pipe_test/test.exited_prematurely \
[2022-03-31T10:42:05Z] TEST_SHARD_INDEX=0 \
[2022-03-31T10:42:05Z] TEST_SIZE=medium \
[2022-03-31T10:42:05Z] TEST_SRCDIR=bazel-out/k8-dbg/bin/external/aos/aos/util/scoped_pipe_test.runfiles \
[2022-03-31T10:42:05Z] TEST_TARGET=@aos//aos/util:scoped_pipe_test \
[2022-03-31T10:42:05Z] TEST_TIMEOUT=300 \
[2022-03-31T10:42:05Z] TEST_TMPDIR=_tmp/69b36daf54d68eeb8c4fe94db8b8ac98 \
[2022-03-31T10:42:05Z] TEST_TOTAL_SHARDS=0 \
[2022-03-31T10:42:05Z] TEST_UNDECLARED_OUTPUTS_ANNOTATIONS=bazel-out/k8-dbg/testlogs/external/aos/aos/util/scoped_pipe_test/test.outputs_manifest/ANNOTATIONS \
[2022-03-31T10:42:05Z] TEST_UNDECLARED_OUTPUTS_ANNOTATIONS_DIR=bazel-out/k8-dbg/testlogs/external/aos/aos/util/scoped_pipe_test/test.outputs_manifest \
[2022-03-31T10:42:05Z] TEST_UNDECLARED_OUTPUTS_DIR=bazel-out/k8-dbg/testlogs/external/aos/aos/util/scoped_pipe_test/test.outputs \
[2022-03-31T10:42:05Z] TEST_UNDECLARED_OUTPUTS_MANIFEST=bazel-out/k8-dbg/testlogs/external/aos/aos/util/scoped_pipe_test/test.outputs_manifest/MANIFEST \
[2022-03-31T10:42:05Z] TEST_UNDECLARED_OUTPUTS_ZIP=bazel-out/k8-dbg/testlogs/external/aos/aos/util/scoped_pipe_test/test.outputs/outputs.zip \
[2022-03-31T10:42:05Z] TEST_UNUSED_RUNFILES_LOG_FILE=bazel-out/k8-dbg/testlogs/external/aos/aos/util/scoped_pipe_test/test.unused_runfiles_log \
[2022-03-31T10:42:05Z] TEST_WARNINGS_OUTPUT_FILE=bazel-out/k8-dbg/testlogs/external/aos/aos/util/scoped_pipe_test/test.warnings \
[2022-03-31T10:42:05Z] TEST_WORKSPACE=shasta \
[2022-03-31T10:42:05Z] TZ=UTC \
[2022-03-31T10:42:05Z] XML_OUTPUT_FILE=bazel-out/k8-dbg/testlogs/external/aos/aos/util/scoped_pipe_test/test.xml \
[2022-03-31T10:42:05Z] external/bazel_tools/tools/test/generate-xml.sh bazel-out/k8-dbg/testlogs/external/aos/aos/util/scoped_pipe_test/test.log bazel-out/k8-dbg/testlogs/external/aos/aos/util/scoped_pipe_test/test.xml 0 127)
[2022-03-31T10:42:05Z] # Configuration: f450dad876624742a3daaa97dcb304a242804d936865dd06302275a46c80bfe8
[2022-03-31T10:42:05Z] # Execution platform: @aos//tools/platforms:linux_x86
[2022-03-31T10:42:05Z] �[32m[126 / 127]�[0m Testing @aos//aos/util:scoped_pipe_test; 0s remote
[2022-03-31T10:42:05Z]
�[1A�[K�[32m[126 / 127]�[0m Testing @aos//aos/util:scoped_pipe_test; 0s remote
[2022-03-31T10:42:06Z]
�[1A�[K�[31m�[1mFAIL: �[0m@aos//aos/util:scoped_pipe_test (see /mnt/buildkite-agent/builds/buildkite-prd-g-i-00afc7d8bffa69495-1/k8_output_base/execroot/shasta/bazel-out/k8-dbg/testlogs/external/aos/aos/util/scoped_pipe_test/test.log)
[2022-03-31T10:42:06Z] �[32m[126 / 127]�[0m Testing @aos//aos/util:scoped_pipe_test; 0s remote
[2022-03-31T10:42:06Z]
�[1A�[K�[32mINFO: �[0mFrom Testing @aos//aos/util:scoped_pipe_test:
[2022-03-31T10:42:06Z] ==================== Test output for @aos//aos/util:scoped_pipe_test:
[2022-03-31T10:42:06Z] /var/lib/engflow/worker/work/3/exec/bazel-out/k8-dbg/bin/external/aos/aos/util/scoped_pipe_test.runfiles/shasta/../aos/aos/util/scoped_pipe_test: error while loading shared libraries: libexternal_Saos_Saos_Sutil_Slibscoped_Upipe.so: cannot open shared object file: No such file or directory
[2022-03-31T10:42:06Z] ================================================================================ The shared library files are in the runfiles, but not found because the test is executed from a path where it can't see those libraries anymore. We're using upstream rules_cc, no changes to LD variables or anything else strange - I believe this should be reproducible by anyone using the aos repository as an external dependency. I guess nobody besides us is testing external tests? This seems like a regression, and our only recourse was reverting 0080572 - is there any reason this wasn't behind a feature flag, or noted in release notes or something? |
@AustinSchuh @TLATER I've reported the breakage to the author of the original commit. |
Their response:
Could you try the same trick? |
I tried linkstatic = 1 and while it works, I literally need to modify every cc_test in all external repositories that we run. That's going to mean touching grpc, flatbuffers, protobuf and beyond. I don't want to have to maintain patched versions of those, so I'd have to get all their tests updated too. I don't think that's going to work. This suggests to me that the quoted patch is incompatible with the way the C++ rules setup the shared library path. |
@oquenchil Do you have any comments about how C++ rules set up the shared library path? (see above) @lberki @jin The commit in question was authored by someone on the Roboleaf team (IIRC) who has since left the team. Do you have any comments on the breakage? |
Is this an error that triggers without the flags associated to this issue? (or one, or both?) |
Correct, this triggers without the flags. |
@jin , what's the correct course of action here? I can send a revert out. We missed 5.2. |
The Minimal reproducible BUILD file with empty WORKSPACE:
Running on 6.0.0rc5 with default flags:
With
|
Is there any chance |
Update: it looks like there is a general feeling that this flag should be flipped and also a general feeling that no one wants to invest into doing so. If that remains the case, there is no point in pretending that we'll ever flip the flag since the cost of flipping will not be lower in the future so the calculus will not shift towards flipping it, unless something really important comes along that warrants that investment. Given that this is unlikely, let's do this: we wait until Bazel 7.1 arrives, then delete |
@lberki to my understanding While it is sad that No matter what happens to |
Prepares for the flip (bazelbuild#12821) by ensuring that Bazel itself doesn't regress.
Prepares for the flip (bazelbuild#12821) by ensuring that Bazel itself doesn't regress.
Prepares for the flip (bazelbuild#12821) by ensuring that Bazel itself doesn't regress.
I also support the I can start a downstream run when the mac runner situation has improved. I have fixed issues in rules_go and will fix them in gazelle soon. |
Prepares for the flip (bazelbuild#12821) by ensuring that Bazel itself doesn't regress.
Apparently, I am somewhat worried about the fact that if we do this, the paths source artifacts are accessible under will be inconsistent between runfiles trees and action inputs, but I guess that ship has already sailed with bzlmod. |
My perspective is we have those options:
My favorite is option 3) and keeping I have no good answer for the inconsistency issue. All I can say here is that to me it seems acceptable as action input and runfile tree are either way different worlds. |
Agreed; @Wyverald and @meteorcloudy might know something that makes (3) infeasible, though. |
Prepares for the flip (bazelbuild#12821) by ensuring that Bazel itself doesn't regress.
Prepares for the flip (bazelbuild#12821) by ensuring that Bazel itself doesn't regress.
This requires fixing an actual bug that causes the Windows Java launcher to not find the Java runtime with `--nolegacy_external_runfiles`. Work towards bazelbuild#12821 Closes bazelbuild#20680. PiperOrigin-RevId: 601826685 Change-Id: Ib45e60901d47efc06bf875c334edafcaeabc5f1e
This requires fixing an actual bug that causes the Windows Java launcher to not find the Java runtime with `--nolegacy_external_runfiles`. Work towards #12821 Closes #20680. Commit 3d4491c PiperOrigin-RevId: 601826685 Change-Id: Ib45e60901d47efc06bf875c334edafcaeabc5f1e Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
@lberki Thanks for filing the new issues, I'll follow up to flip them before Bazel 8. |
We are changing the way external repositories are handled: they will be a sibling of the main repository instead living in the
external/
directory under it, both in the execroot and in runfiles trees.That is, files in them will be accessible at
../$REPO
instead ofexternal/$REPO
.This is a tracking bug for the imminent flag flip and a place to list tips for the migration and things that broke.
The text was updated successfully, but these errors were encountered: