bazel-contrib / bazel-contrib/rules_python

Windows + Bazel 8 gets permission denied error in some configs

未关闭
#3,407 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Starlark
星标
688
派生
721
平均合并
15 小时 7 分钟
30 天内合并 PR
76

描述

Just filing a quick issue for now with some light details and investigation results

When run on BCR, we get a failure in the bzlmod example `//tests:version_test_binary_*` tests. It only fails for Windows and bazel 8.

example error:

```
Executing tests from //tests:version_test_binary_3_10
-----------------------------------------------------------------------------
C:/b/yumnn2dr/execroot/_main/bazel-out/x64_windows-fastbuild/bin/tests/version_test_binary_3_10: line 23: tests/version_3_10.exe: Permission denied
```

This seems to be an environment specific or Bazel 8 specific issue.

Running it on my windows laptop, it works.

PR #3406 reproduces the issue.

Oddity: I thought we had bazel 8 + windows testing, so why is it failing now?

The only thing interesting about these tests is they're a shell test that runs the python program. For windows, this means it runs an exe that executes a zip file.

Theory: Possibly related to symlinks? If the test copies the files locally, then the binary-under-test runs successfully.

贡献指南

打开贡献指南

调研方向

首先在 Windows 上使用 Bazel 8 重现 PR #3406,重点关注与 //tests:version_test_binary_* 匹配的 bzlmod 示例测试。阅读运行 Python 程序的 shell 测试,并比较在本地复制文件与不复制文件时的行为。当受影响的测试在报告中的 Windows 和 Bazel 8 配置下成功运行时,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
python, shell
领域
build-system, operating-systems, testing
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。