Skip to content

Add PowerShell support to update-dependencies - #7381

Merged
lbussell merged 9 commits into
nightlyfrom
lbussell/update-deps-powershell
Oct 5, 2026
Merged

lbussell merged 9 commits into
nightlyfrom
lbussell/update-deps-powershell

Conversation

@lbussell

Copy link
Copy Markdown
Member

Previously, PowerShell versions and checksums in manifest.versions.json were updated by hand. SDK Dockerfile templates also hardcoded the public and internal download URLs.

This PR moves the PowerShell download location into the manifest and adds a powershell command to update-dependencies that can manage PowerShell updates.

Changes to templates

Added powershell|base-url|public, powershell|base-url|internal, and a per-.NET-version powershell|<version>|base-url variable. PowerShell can be internal independently of .NET.

Changes to update-dependencies

  • Command: powershell version <version> (--internal) (--base-url <url>)
    • Updates PowerShell to a specific version.
    • Automatically reads hashes from blob storage instead of computing them.
    • --internal automatically handles updating to internal versions.
  • Command: powershell latest (--dotnet-version <version>)
    • Automatically probes blob storage for a newer version to update to.
    • Can update all versions at once, or scope to a specific .NET version.
    • Reads internal versions from private storage account using a service connection. Made some changes to service connection authentication to facilitate this.

Changes to other commands

Updated Monitor command and updater to match the one-off style of the PowerShell command. The generic IVersionUpdater and IPipelineBuildUpdater interfaces were not serving these commands well - they are each unique. The monitor pipeline-build and monitor version commands and behavior are unchanged.

lbussell and others added 9 commits September 29, 2026 12:24
Add a per-.NET-version powershell|<X>|base-url variable pointing at the
directory containing the PowerShell nupkgs and SHA512SUMS, instead of
hardcoding public/internal URLs in the sdk templates. PowerShell's
internal/public state is now independent of .NET's, so the sdk templates
request ACCESSTOKEN when either one is internal.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ae5811c9-20e9-4453-916d-fe73b50582d5
Substitute the version in powershell|<X>|base-url with \
(or \ for the dashed internal layout) so generated
Dockerfiles only write the version once, like the .NET downloads. Use the
real internal storage layout in the internal Dockerfile baseline test.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ae5811c9-20e9-4453-916d-fe73b50582d5
Updaters that implement IVersionSourceUpdater get --internal, --base-url,
and --dotnet-version options on their version command. Other updaters are
unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ae5811c9-20e9-4453-916d-fe73b50582d5
Move version source handling out of FromVersionCommand into a separate
FromVersionSourceCommand that DependencyCommand adds based on the updater's
interfaces, like the other update sources.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ae5811c9-20e9-4453-916d-fe73b50582d5
Move --internal, --base-url, and --dotnet-version onto FromVersionOptions and pass them as parameters to IVersionUpdater.ResolveFromVersionAsync. This removes the separate VersionSource record, VersionSourceOptions helper, IVersionSourceUpdater interface, and FromVersionSourceCommand. MonitorUpdater rejects these options.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ae5811c9-20e9-4453-916d-fe73b50582d5
Adds a 'powershell version' command that updates PowerShell versions,
base URLs, and checksums from the SHA512SUMS file for public or internal
builds. Internal downloads authenticate with the staging service
connection through AzurePipelinesCredential.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ae5811c9-20e9-4453-916d-fe73b50582d5
@lbussell
lbussell marked this pull request as ready for review October 1, 2026 18:37
@lbussell
lbussell requested review from a team and wiktork as code owners October 1, 2026 18:37
Comment thread eng/update-dependencies/Program.cs Resolved
@lbussell

lbussell commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

/azp run dotnet-docker-nightly-pr

@lbussell

lbussell commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

/azp run dotnet-docker-nightly-pr-no-cache

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

1 similar comment
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@lbussell
lbussell merged commit 3e7be40 into nightly Oct 5, 2026
150 checks passed
@github-actions github-actions Bot added the needs-backport PR that should be backported to another branch label Oct 5, 2026
lbussell added a commit that referenced this pull request Oct 9, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ae5811c9-20e9-4453-916d-fe73b50582d5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-backport PR that should be backported to another branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants