Skip to content

Ensure Az.Storage is installed from CFS feed - #28395

Open
Justin Chung (jshigetomi) wants to merge 6 commits into
PowerShell:masterfrom
jshigetomi:jshigetomi-release-infrastructure-fixes
Open

Justin Chung (jshigetomi) wants to merge 6 commits into
PowerShell:masterfrom
jshigetomi:jshigetomi-release-infrastructure-fixes

Conversation

@jshigetomi

@jshigetomi Justin Chung (jshigetomi) commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

PR Summary

Harden the release publishing jobs by:

  • installing pinned Az.Storage 9.7.2 from PowerShellGalleryMirror so its dependencies resolve from CFS
  • resetting the PowerShell Gallery mirror registration before module installation
  • retaining concise diagnostics for preinstalled Az modules
  • removing Azure Linux 4.0 from packages.microsoft.com publishing mappings

Validation:

  • Invoke-Pester -Path 'test/packaging/packaging.tests.ps1' -Output Detailed — passed, 20 tests
  • PowerShell AST parsing and JSON parsing — passed
  • YAML parsing for both changed release templates — passed after the review update
  • git diff --check origin/master...HEAD — passed

PR Context

These infrastructure fixes were first applied to the release/v7.7.0 branch while stabilizing release publishing. Bringing them to master keeps future release jobs deterministic and prevents the default branch from regressing on the same Az module installation, repository registration, and PMC publishing issues.

PR Checklist

Justin Chung added 5 commits November 11, 2026 09:04
## Summary
- Explicitly install `Az.Accounts 5.5.2` from `PowerShellGalleryMirror` before `Az.Storage 9.7.2`.
- Apply the fix to both Make Blob Public jobs and the Upload BuildInfo job.

## Reason
Network-isolated release runs resolve the `Az.Storage 9.7.2` dependency through `www.powershellgallery.com`. The blocked response is treated as a NuGet package and fails with `End of Central Directory record could not be found`.

Installing the exact dependency from the internal mirror prevents the PowerShell Gallery fallback.

Observed in release builds 738128 and 738307.

## Validation
- Both changed YAML templates parsed successfully with PyYAML.
- `git diff --check` passed.
# PR Summary

Remove the Azure Linux 4.0 x64 and ARM64 PMC mappings from the PowerShell 7.7 release branch. Azure Linux 3 publishing remains unchanged.

## PR Context

Azure Linux 4.0 does not support .NET 11, which PowerShell 7.7 uses. This prevents PowerShell 7.7 packages from being published to the unsupported Azure Linux 4.0 repositories while retaining Azure Linux 4.0 package-building support.

Validation: `Invoke-Pester -Path test/packaging/packaging.tests.ps1 -Output Detailed` passed all 20 tests.

## PR Checklist

- [x] [PR has a meaningful title](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
  - Use the present tense and imperative mood when describing your changes
- [x] [Summarized changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
- [x] [Make sure all `.h`, `.cpp`, `.cs`, `.ps1` and `.psm1` files have the correct copyright header](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
- [x] This PR is ready to merge. If this PR is a work in progress, please open this as a [Draft Pull Request and mark it as Ready to Review when it is ready to merge](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-a-pull-request/about-changing-the-stage-of-a-pull-request).
- **[Breaking changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#making-breaking-changes)**
  - [x] None
  - **OR**
  - [ ] [Experimental feature(s) needed](https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/7.5/Microsoft.PowerShell.Core/About/about_Experimental_Features.md)
    - [ ] Experimental feature name(s):
- **User-facing changes**
  - [x] Not Applicable
  - **OR**
  - [ ] [Documentation needed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
    - [ ] Issue filed:
- **Testing - New and feature**
  - [ ] N/A or can only be tested interactively
  - **OR**
  - [x] [Make sure you've added a new test if existing tests do not effectively test the code changed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#before-submitting)
…ease publishing

# PR Summary

Deterministically reset and validate the `PowerShellGalleryMirror` registration before installing Az.Accounts 5.5.2 and Az.Storage 9.7.2 in all three release storage publishing jobs.

## PR Context

Build 738388 still contacted `www.powershellgallery.com` during the explicit Az.Accounts installation. Az.Accounts 5.5.2 is valid in the internal mirror and has no dependencies, and a fresh uniquely named repository registration resolves it without PSGallery. This indicates the existing conditional logic accepted a stale `PowerShellGalleryMirror` repository or PackageManagement source.

Each affected install block now unregisters only `PowerShellGalleryMirror`, registers it with the exact internal URL and Trusted policy, and verifies the normalized `SourceLocation` before installing the pinned modules. PSGallery remains registered.

Validation:
- `.pipelines/templates/release-MakeBlobPublic.yml`: parsed successfully with PyYAML
- `.pipelines/templates/release-upload-buildinfo.yml`: parsed successfully with PyYAML
- `git diff --check`: passed

## PR Checklist

- [x] PR has a meaningful title
- [x] Summarized changes
- [x] Copyright headers are not applicable to the changed YAML files
- [x] This PR is ready to merge
- **Breaking changes**
  - [x] None
- **User-facing changes**
  - [x] Not Applicable
- **Testing - New and feature**
  - [x] N/A; pipeline configuration was validated by parsing both YAML files and running `git diff --check`
<!-- Anything that looks like this is a comment and can't be seen after the Pull Request is created. -->

# PR Summary

Add a shared diagnostic installer for the three release publishing jobs. It records PowerShell/package tooling, available Az modules, repository and package-source configuration, sanitized proxy state, direct CFS download integrity, verbose installation output, and a sanitized PackageManagement trace.

## PR Context

Build 738410 fails with an invalid ZIP while installing `Az.Accounts 5.5.2` under the newer Network Isolation environment, while build 734698 previously installed `Az.Storage 9.7.2` successfully on the same hosted image. These diagnostics distinguish preinstalled-module state, repository resolution, proxy behavior, direct CFS transport integrity, and PackageManagement behavior without logging signed URL query strings or proxy credentials.

The existing repository registration and module installation behavior remains unchanged.

Validation:
- PowerShell parser accepted `.pipelines/scripts/Install-ReleaseAzModules.ps1`.
- PSScriptAnalyzer passed with no warnings or errors.
- PyYAML parsed `.pipelines/templates/release-MakeBlobPublic.yml` successfully.
- PyYAML parsed `.pipelines/templates/release-upload-buildinfo.yml` successfully.
- `git diff --check` passed.

## PR Checklist

- [x] [PR has a meaningful title](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
  - Use the present tense and imperative mood when describing your changes
- [x] [Summarized changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
- [x] [Make sure all `.h`, `.cpp`, `.cs`, `.ps1` and `.psm1` files have the correct copyright header](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
- [x] This PR is ready to merge. If this PR is a work in progress, please open this as a [Draft Pull Request and mark it as Ready to Review when it is ready to merge](https://docs.github.com/pull-requests/collaborating-with-pull-requests/proposing-changes-to-a-pull-request/about-pull-requests#draft-pull-requests).
- **[Breaking changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#making-breaking-changes)**
  - [x] None
  - **OR**
  - [ ] [Experimental feature(s) needed](https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/7.5/Microsoft.PowerShell.Core/About/about_Experimental_Features.md)
    - [ ] Experimental feature name(s):
- **User-facing changes**
  - [x] Not Applicable
  - **OR**
  - [ ] [Documentation needed](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
    - [ ] Issue filed:
- **Testing - New and feature**
  - [x] N/A or can only be tested interactively
  - **OR**
  - [ ] [Make sure you've added a new test if existing tests do not effectively test the code changed](https://github.com/PowerS...
<!-- Anything that looks like this is a comment and can't be seen after the Pull Request is created. -->

# PR Summary

Keep the available `Az.Accounts` and `Az.Storage` module inventory before installation, and revert the expanded isolated-environment diagnostics.

## PR Context

Build 738427 established that the installation failure was caused by `Az.Storage 9.7.2` resolving `Az.Accounts 5.5.4` before that package was cached in `PowerShellGalleryMirror`. After the package was added to the feed, both modules installed successfully.

The direct-download probes, proxy details, PackageManagement tracing, archive inspection, and shared diagnostic script are no longer needed. The release jobs return to their original inline repository configuration and installation flow while retaining the concise module inventory that is useful for future image changes.

Validation:
- PyYAML parsed `.pipelines/templates/release-MakeBlobPublic.yml` successfully.
- PyYAML parsed `.pipelines/templates/release-upload-buildinfo.yml` successfully.
- `git diff --check` passed.

## PR Checklist

- [x] [PR has a meaningful title](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
  - Use the present tense and imperative mood when describing your changes
- [x] [Summarized changes](https://github.com/PowerShell/PowerShell/blob/master/.github/CONTRIBUTING.md#pull-request---submission)
- [x] This PR is ready to merge.
- **Breaking changes**
  - [x] None
- **User-facing changes**
  - [x] Not Applicable
- **Testing - New and feature**
  - [x] N/A or can only be tested interactively
@jshigetomi
Justin Chung (jshigetomi) requested a review from a team as a code owner November 11, 2026 15:05
Copilot AI balanced review requested due to automatic review settings November 11, 2026 15:06
@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.

🟡 Changes recommended

The pipeline installs Az.Accounts 5.5.2 but leaves authentication tasks on LatestVersion, allowing another Accounts version to be selected and undermining deterministic imports.

1 open issue
What changed in this PR

Brings release-publishing infrastructure fixes to master to improve consistency in future PowerShell releases.

Changes:

  • Installs pinned Az.Accounts and Az.Storage versions and logs available modules.
  • Resets and validates the PowerShell Gallery mirror registration before installation.
  • Removes Azure Linux 4.0 publishing mappings and updates regression coverage.
File Description
tools/​packages.microsoft.com/​mapping.json Removes Azure Linux 4.0 stable publishing targets.
test/​packaging/​packaging.tests.ps1 Verifies that no Azure Linux 4.0 mappings remain.
.pipelines/​templates/​release-upload-buildinfo.yml Hardens module installation and repository setup for build-info publishing.
.pipelines/​templates/​release-MakeBlobPublic.yml Applies the same setup improvements to both blob-copy jobs.

Review effort: Balanced

@jshigetomi Justin Chung (jshigetomi) changed the title Harden release publishing infrastructure Ensure Az.Storage is installed form CFS feed Nov 11, 2026
@jshigetomi Justin Chung (jshigetomi) added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Nov 11, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jshigetomi Justin Chung (jshigetomi) changed the title Ensure Az.Storage is installed form CFS feed Ensure Az.Storage is installed from CFS feed Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants