Skip to content

Fix mgmt library regeneration in Submit-AzureSdkForNetPr.ps1 - #11319

Merged
jorgerangel-msft merged 3 commits into
mainfrom
copilot/fix-regeneration-pipeline-issue
Jul 21, 2026
Merged

Fix mgmt library regeneration in Submit-AzureSdkForNetPr.ps1#11319
jorgerangel-msft merged 3 commits into
mainfrom
copilot/fix-regeneration-pipeline-issue

Conversation

Copilot AI commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

The regen preview pipeline aborted mgmt library regeneration with Unbranded package not found: .../csharp-debug-.../typespec-http-client-csharp-<version>.tgz.

Update-MgmtGenerator resolves the unbranded emitter from the debug folder as typespec-http-client-csharp-$LocalVersion.tgz, but Submit-AzureSdkForNetPr.ps1 referenced the unbranded .tgz directly from $BuildArtifactsPath and only staged the .nupkg files and the locally built Azure .tgz into the debug folder — leaving the unbranded package absent from where the mgmt build looks.

Changes

  • Submit-AzureSdkForNetPr.ps1: Copy the unbranded typespec-http-client-csharp-*.tgz from build artifacts into $debugFolder and point $unbrandedPackagePath at that copy, so both the Azure and management plane generators resolve it from the same location.

Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Comment thread packages/http-client-csharp/eng/scripts/Submit-AzureSdkForNetPr.ps1 Outdated
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
@pkg-pr-new

pkg-pr-new Bot commented Jul 20, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-client-csharp@11319

commit: 2c631b9

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.

Pull request overview

This PR fixes management library regeneration in Submit-AzureSdkForNetPr.ps1 by ensuring the unbranded @typespec/http-client-csharp .tgz is staged into the same debug folder used by RegenPreview’s generator update flow, aligning Azure + mgmt regeneration to resolve local packages from a consistent location.

Changes:

  • Copies the unbranded typespec-http-client-csharp-*.tgz from $BuildArtifactsPath into $debugFolder.
  • Updates $unbrandedPackagePath to point at the staged copy in $debugFolder.

Comment thread packages/http-client-csharp/eng/scripts/Submit-AzureSdkForNetPr.ps1 Outdated
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>

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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

packages/http-client-csharp/eng/scripts/Submit-AzureSdkForNetPr.ps1:484

  • $unbrandedTgz is selected with Select-Object -First 1 from typespec-http-client-csharp-*.tgz. If the build artifacts contain multiple unbranded emitter packages (e.g., from multiple runs/versions), this can silently pick the wrong .tgz and then rename it to ...-$PackageVersion.tgz, causing the regen to use a different emitter version than requested. Prefer selecting the .tgz that matches $PackageVersion and throw with a diagnostic list when it’s missing.
                $unbrandedTgz = Get-ChildItem -Path $BuildArtifactsPath -Filter "typespec-http-client-csharp-*.tgz" -Recurse | Select-Object -First 1
                if (-not $unbrandedTgz) {
                    throw "Could not find unbranded emitter .tgz in build artifacts at: $BuildArtifactsPath"
                }
                Write-Host "Using unbranded package from build artifacts: $($unbrandedTgz.FullName)"

@jorgerangel-msft
jorgerangel-msft added this pull request to the merge queue Jul 21, 2026
Merged via the queue into main with commit 6e46bcf Jul 21, 2026
30 checks passed
@jorgerangel-msft
jorgerangel-msft deleted the copilot/fix-regeneration-pipeline-issue branch July 21, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants