[6.1] Fix symbol publishing connectivity and extract into testable script#4171
[6.1] Fix symbol publishing connectivity and extract into testable script#4171paulmedynski wants to merge 5 commits intorelease/6.1from
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the MDS pipeline symbol publishing configuration to use the working AKV-backed variables and extracts the publishing logic into a standalone, testable PowerShell script used by the pipeline template.
Changes:
- Switch MDS variables to pull symbol publishing configuration from the
akv-variables-v2variable group. - Replace inline symbol-publishing PowerShell in
publish-symbols-step.ymlwith ascriptPathinvocation ofPublish-Symbols.ps1and updated default variable names. - Add a documented
Publish-Symbols.ps1script plus Pester tests and a small test README.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| eng/pipelines/libraries/mds-variables.yml | Points MDS pipeline variables at akv-variables-v2 for symbol publishing values. |
| eng/pipelines/common/templates/steps/publish-symbols-step.yml | Uses new variable names and runs the extracted Publish-Symbols.ps1 via scriptPath. |
| eng/pipelines/common/templates/steps/Publish-Symbols.ps1 | New standalone script that registers/publishes/checks symbol publish requests via REST API. |
| eng/pipelines/common/templates/steps/tests/Publish-Symbols.Tests.ps1 | Adds Pester tests for validation, URL/body construction, and failure paths. |
| eng/pipelines/common/templates/steps/tests/README.md | Documents prerequisites and how to run the Pester tests. |
- Update MDS pipeline to use akv-variables-v2 variable group for working symbol server configuration (SymbolsPublishServer, SymbolsPublishTokenUri) - Extract inline PowerShell into Publish-Symbols.ps1 with full documentation, parameter validation, and error handling with expanded URI/body in error messages - Append System.JobAttempt to request name for retry uniqueness - Use AzureCLI@2 scriptPath invocation instead of inline script - Add Pester tests for parameter validation, URL construction, request bodies, and error handling
1734ee8 to
c7395e6
Compare
- Fix request name mismatch: remove JobAttempt from PS1, append _$(System.JobAttempt) in YAML to both PublishSymbols@2 and the script invocation so upload and publish use the same name - Add token validation: trim and check for empty/whitespace token after az CLI returns - Fix error handling: replace Write-Error + throw with throw in catch blocks to avoid masking errors under ErrorActionPreference=Stop - Remove backslash-escaped quotes in YAML >- arguments block - Update Pester tests: remove JobAttempt parameter, add empty token test, update assertions
- Move license into .NOTES section of Publish-Symbols.ps1 so it is visible only with Get-Help -Full - Add license header to Publish-Symbols.Tests.ps1 - Fix 'three steps' to 'four steps' in description - Update README test coverage table to reflect current tests
| variables: | ||
| - group: Release Variables | ||
| # SymbolServer | ||
| # SymbolTokenUri | ||
| - group: Symbols Publishing | ||
| # Shared symbols publishing variables: | ||
| # SymbolsAzureSubscription |
There was a problem hiding this comment.
PR description says this change replaces Release Variables with akv-variables-v2, but this template now imports the Symbols Publishing variable group instead. Please align the PR description (or the variable group reference) so reviewers/operators know which variable group must exist for MDS pipelines to resolve Symbols* variables.
|
I plan to clobber the entire OneBranch pipeline with that of main, and then adjust it to build 6.1-style. That will incorporate the symbols improvements from #4175. |
Summary
Release Variablesgroup withakv-variables-v2to help eliminate duplicate LIbrary variables.Testing