🐞 bug report
Affected Rule
The issue is caused by the rule:
py_binary / py_test on Windows when rules_python writes build data via
python/private/build_data_writer.ps1.
Is this a regression?
Introduced by PR #3604 - and first rolled out in 1.9.0
Description
On localized Windows installations, build data generation can fail because
python/private/build_data_writer.ps1 creates a file ACL rule using the English
localized account name "Everyone".
That works on English Windows, but fails on German and other localized Windows
installations where the well-known Everyone principal has a localized display
name. On German Windows, the identity is displayed as Jeder.
The script currently does:
$AccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule("Everyone", "Read", "Allow")
This should use the language-neutral well-known SID for Everyone instead of the
localized display name.
🔬 Minimal Reproduction
On a German Windows installation, run a target that causes rules_python to write
build data, for example in the rules_python repository:
bazel test //tests/build_data:build_data_test --config=fast-tests
The failure can also be reproduced directly with the ACL snippet from
python/private/build_data_writer.ps1 on a German Windows host.
🔥 Exception or Error
Ausnahme beim Aufrufen von "SetAccessRule" mit 1 Argument(en): "Manche oder alle Identitätsverweise konnten nicht
übersetzt werden."
In
<redacted>\execroot\_main\external\rules_python+\python\private\build_data_writer.ps1:25
Zeichen:1
+ $Acl.SetAccessRule($AccessRule)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : IdentityNotMappedException
🌍 Your Environment
Operating System:
Windows with German locale
Output of bazel version:
Rules_python version:
Anything else relevant?
The Windows well-known Everyone principal can be referenced using the
language-neutral SID S-1-1-0, or in .NET via
System.Security.Principal.WellKnownSidType.WorldSid.
Using WorldSid preserves the existing behavior, granting read access to
Everyone, while avoiding localized account-name lookup failures.
🐞 bug report
Affected Rule
The issue is caused by the rule:
py_binary/py_teston Windows when rules_python writes build data viapython/private/build_data_writer.ps1.Is this a regression?
Introduced by PR #3604 - and first rolled out in 1.9.0
Description
On localized Windows installations, build data generation can fail because
python/private/build_data_writer.ps1creates a file ACL rule using the Englishlocalized account name
"Everyone".That works on English Windows, but fails on German and other localized Windows
installations where the well-known Everyone principal has a localized display
name. On German Windows, the identity is displayed as
Jeder.The script currently does:
This should use the language-neutral well-known SID for Everyone instead of the
localized display name.
🔬 Minimal Reproduction
On a German Windows installation, run a target that causes rules_python to write
build data, for example in the rules_python repository:
The failure can also be reproduced directly with the ACL snippet from
python/private/build_data_writer.ps1on a German Windows host.🔥 Exception or Error
🌍 Your Environment
Operating System:
Output of
bazel version:Rules_python version:
Anything else relevant?
The Windows well-known Everyone principal can be referenced using the
language-neutral SID
S-1-1-0, or in .NET viaSystem.Security.Principal.WellKnownSidType.WorldSid.Using
WorldSidpreserves the existing behavior, granting read access toEveryone, while avoiding localized account-name lookup failures.