bazel
bazel copied to clipboard
Unresolved symlink to absolute path in remote action outputs is not supported
When a remote action produces an undeclared symlink (i.e., a ctx.actions.declare_symlink) pointing to an absolute path, an exception is thrown here: https://cs.opensource.google/bazel/bazel/+/master:src/main/java/com/google/devtools/build/lib/remote/RemoteExecutionService.java;l=745;drc=bce7db055dd702e8a101f975f8585e0dfeb18a67
We will also have to fix #16289 before adding a regression test for this issue.
This issue may be a blocker for #10298.
Note that this is separate from #13355, which concerns any kind of symlink in action outputs (resolved or unresolved, relative or absolute, dangling or non-dangling) and only applies when building without the bytes.
While we're at it, we should also remove the limitation in https://cs.opensource.google/bazel/bazel/+/master:src/main/java/com/google/devtools/build/lib/remote/RemoteActionFileSystem.java;l=222;drc=79b5b5ddaa3919db48b9143e0afdd4d2cddfdb74 (which AIUI would only apply when a remotely produced declare_symlink is an input to a local action).
I'm not too worried about --experimental_remote_download_outputs=minimal because it's experimental so it's fine for it to be slightly broken, but this indeed needs to be fixed.
I think what's more important than fixing the mock local executor is exercising this functionality with the real RBE so #16289 should not be a blocker for this. It would be nice, but I could live without it.
I'm not too worried about --experimental_remote_download_outputs=minimal because it's experimental so it's fine for it to be slightly broken.
While this feature is listed as experimental, I can speak for the community and say many, many projects depend on it.
Actually, it's not experimental anymore: https://bazel.build/reference/command-line-reference#flag--remote_download_outputs
@brentleyjones that's unfortunate, I didn't realize we promoted that flag to production, thanks for pointing it out
عندما ينتج عن إجراء عن بُعد ارتباط رمزي غير معلن (على سبيل المثال ، ctx.actions.declare_symlink) يشير إلى مسار مطلق ، يتم طرح استثناء هنا: https://cs.opensource.google/bazel/bazel/+/master:src/ main / java / com / google / devtools / build / lib / remote / RemoteExecutionService.java؛ l = 745؛ drc = bce7db055dd702e8a101f975f8585e0dfeb18a67
سيتعين علينا أيضًا إصلاح # 16289 قبل إضافة اختبار انحدار لهذه المشكلة.
قد تكون هذه المشكلة مانعًا لـ # 10298 .
لاحظ أن هذا منفصل عن # 13355 ، والذي يتعلق بأي نوع من مخرجات الارتباط الرمزي في العمل (تم حلها أو لم يتم حلها ، نسبيًا أو مطلقًا ، متدليًا أو غير متدلي) ولا يتم تطبيقه إلا عند الإنشاء بدون وحدات البايت.