symbolic links for resources used in sh_binary rule not working for windows remote execution.
- Dominant language
- Rust
- Stars
- 4.4k
- Forks
- 394
- PR merge metrics
- No merged PRs in 30d
Description
Even after bypassing #673, symbolic links are not properly getting propagated to the remote execution executors for windows:
```
Action failed: toolchains//:test_re (test)
Remote command returned non-zero exit code 1
stdout:
C:\worker\work\4\1\exec>setlocal EnableDelayedExpansion
C:\worker\work\4\1\exec>set __RESOURCES_ROOT=.\resources
C:\worker\work\4\1\exec>set __SRC=C:\worker\work\4\1\exec\buck-out\v2\gen\prelude\749e8add6e5f1364\python_bootstrap\tools\__win_python_wrapper__\win_python_wrapper.bat
C:\worker\work\4\1\exec>for %a in ("C:\worker\work\4\1\exec\buck-out\v2\gen\prelude\749e8add6e5f1364\python_bootstrap\tools\__win_python_wrapper__\win_python_wrapper.bat") do set "__SCRIPT_DIR=%~dpa"
C:\worker\work\4\1\exec>set "__SCRIPT_DIR=C:\worker\work\4\1\exec\buck-out\v2\gen\prelude\749e8add6e5f1364\python_bootstrap\tools\__win_python_wrapper__\"
C:\worker\work\4\1\exec>set BUCK_SH_BINARY_VERSION_UNSTABLE=2
C:\worker\work\4\1\exec>set BUCK_PROJECT_ROOT=C:\worker\work\4\1\exec\buck-out\v2\gen\prelude\749e8add6e5f1364\python_bootstrap\tools\__win_python_wrapper__\\.\resources
C:\worker\work\4\1\exec>set BUCK_DEFAULT_RUNTIME_RESOURCES=C:\worker\work\4\1\exec\buck-out\v2\gen\prelude\749e8add6e5f1364\python_bootstrap\tools\__win_python_wrapper__\\.\resources
C:\worker\work\4\1\exec>C:\worker\work\4\1\exec\buck-out\v2\gen\prelude\749e8add6e5f1364\python_bootstrap\tools\__win_python_wrapper__\\.\resources\win_python_wrapper.bat buck-out\v2\gen\prelude\749e8add6e5f1364\cxx\tools\__dep_file_processor__\__dep_file_processor__ buck-out\v2\gen-anon\toolchains\749e8add6e5f1364443bc5d1e95a38d6\__rbox-python__\out\rbox-python\python.exe buck-out\v2\gen\prelude\749e8add6e5f1364\cxx\tools\__dep_file_processor__\dep_file_processor.py
stderr:
**The system cannot find the path specified.**
```
Changing:
https://github.com/facebook/buck2/blob/2214ec241cefe357faf499e30b26629ce6728c8c/prelude/sh_binary.bzl#L38
to use **copied_dirs** bypasses the problem.
Happy to provide a fix for this, as well as #673
Contributor guide
Assessment
This issue has not been assessed yet.