Fix mgmt library regeneration in Submit-AzureSdkForNetPr.ps1 - #11319
Merged
Conversation
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
|
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. |
Copilot created this pull request from a session on behalf of
jorgerangel-msft
July 20, 2026 21:00
View session
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
commit: |
jorgerangel-msft
approved these changes
Jul 20, 2026
jorgerangel-msft
marked this pull request as ready for review
July 20, 2026 21:50
jorgerangel-msft
requested review from
JoshLove-msft,
joseharriaga,
jsquire and
m-nash
as code owners
July 20, 2026 21:50
jorgerangel-msft
enabled auto-merge
July 20, 2026 21:50
Contributor
There was a problem hiding this comment.
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-*.tgzfrom$BuildArtifactsPathinto$debugFolder. - Updates
$unbrandedPackagePathto point at the staged copy in$debugFolder.
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
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
$unbrandedTgzis selected withSelect-Object -First 1fromtypespec-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$PackageVersionand 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)"
JoshLove-msft
approved these changes
Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The regen preview pipeline aborted mgmt library regeneration with
Unbranded package not found: .../csharp-debug-.../typespec-http-client-csharp-<version>.tgz.Update-MgmtGeneratorresolves the unbranded emitter from the debug folder astypespec-http-client-csharp-$LocalVersion.tgz, butSubmit-AzureSdkForNetPr.ps1referenced the unbranded.tgzdirectly from$BuildArtifactsPathand only staged the.nupkgfiles and the locally built Azure.tgzinto the debug folder — leaving the unbranded package absent from where the mgmt build looks.Changes
Submit-AzureSdkForNetPr.ps1: Copy the unbrandedtypespec-http-client-csharp-*.tgzfrom build artifacts into$debugFolderand point$unbrandedPackagePathat that copy, so both the Azure and management plane generators resolve it from the same location.