⚡ Sangsakala Proxy 🏠 Home
Skip to content

Stop enforcing invariant culture in build pipelines - #28260

Merged
Dongbo Wang (daxian-dbw) merged 2 commits into
PowerShell:masterfrom
daxian-dbw:not-enforce-invariant
Oct 26, 2026
Merged

Dongbo Wang (daxian-dbw) merged 2 commits into
PowerShell:masterfrom
daxian-dbw:not-enforce-invariant

Conversation

@daxian-dbw

Copy link
Copy Markdown
Member

PR Summary

With the environment variable DOTNET_SYSTEM_GLOBALIZATION_INVARIANT set to true, only invariant culture is allowed in the build pipelines. However, the default culture of the build image is en-US, and therefore that env var causes failure when loading the Microsoft.PowerShell.Archive module because the module runs Import-LocalizedData using the default culture en-US, which gets blocked.

This PR stops enforcing invariant culture in build pipelines by removing those 2 env vars.

…o allow use non-invariant culture

Set DOTNET_SYSTEM_GLOBALIZATION_INVARIANT to false to avoid Archive module loading issue

Cherry picked from !42308

----
#### AI description  (iteration 1)
#### PR Classification
Configuration change to fix a bug preventing use of non-invariant culture.

#### PR Summary
Sets `DOTNET_SYSTEM_GLOBALIZATION_INVARIANT` to `false` in pipeline variable templates to allow non-invariant culture usage.
- `PowerShell-Coordinated_Packages-Variables.yml`: changed `DOTNET_SYSTEM_GLOBALIZATION_INVARIANT` value from `true` to `false`.
- `PowerShell-Release-Variables.yml`: changed `DOTNET_SYSTEM_GLOBALIZATION_INVARIANT` value from `true` to `false`.
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
Copilot AI balanced review requested due to automatic review settings October 25, 2026 18:36
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Linux pipeline validation is needed to confirm that removing the ICU workaround does not reintroduce BinSkim failures.

No open issues 🎉

What changed in this PR

Removes pipeline-wide invariant globalization settings so culture-dependent operations, including loading Microsoft.PowerShell.Archive, can use the build image’s default en-US culture.

Changes:

  • Removes DOTNET_SYSTEM_GLOBALIZATION_INVARIANT from both shared pipeline variable templates.
  • Removes the associated comments describing the Linux BinSkim ICU workaround.
File Description
.pipelines/​templates/​variables/​PowerShell-Release-Variables.yml Stops enforcing invariant globalization in release pipelines.
.pipelines/​templates/​variables/​PowerShell-Coordinated_Packages-Variables.yml Stops enforcing invariant globalization in coordinated packaging pipelines.

Review effort: Balanced

@daxian-dbw

Copy link
Copy Markdown
Member Author

The equivalent of the changes was already in the 7.4/7.5/7.6 release branches. Now we only need to make sure this gets ported to 7.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport-7.7.x-Done CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants