Move inlined scripts to checked in files - #50101
Merged
Alan Zimmer (alzimmermsft) merged 4 commits intoAug 12, 2026
Merged
Conversation
Alan Zimmer (alzimmermsft)
requested review from
Ben Broderick Phillips (benbp),
Mike Harder (mikeharder) and
Ray Chen (raych1)
as code owners
August 11, 2026 18:50
Copilot started reviewing on behalf of
Alan Zimmer (alzimmermsft)
August 11, 2026 18:50
View session
|
Azure Pipelines: 34 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Ben Broderick Phillips (benbp)
approved these changes
Aug 11, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors Azure DevOps pipeline templates to replace several inline PowerShell script blocks with checked-in .ps1 files, reducing YAML size to avoid Azure DevOps YAML size limit failures.
Changes:
- Replaced inline
pwsh:blocks in pipeline templates withPowerShell@2tasks that reference checked-in scripts. - Added new pipeline script files under
eng/pipelines/scripts/to encapsulate previously inlined behavior. - Removed the dedicated
publish-http-fault-injector-logs.ymlsteps template and inlined its behavior as aPowerShell@2file-based task.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| eng/pipelines/templates/steps/publish-http-fault-injector-logs.yml | Removed inlined script template (replaced by checked-in script usage). |
| eng/pipelines/templates/steps/build-and-test.yml | Switched inline PowerShell blocks to PowerShell@2 file-based tasks. |
| eng/pipelines/templates/jobs/live.tests.yml | Updated HTTP fault injector log publishing step to use a checked-in script. |
| eng/pipelines/templates/jobs/ci.versions.tests.yml | Replaced inline test-proxy log dumping with a checked-in script. |
| eng/pipelines/templates/jobs/ci.tests.yml | Replaced inline test-proxy log dumping with a checked-in script and adjusted comments. |
| eng/pipelines/scripts/Write-TestProxyLogs.ps1 | New script to emit grouped test-proxy and test-proxy-error logs. |
| eng/pipelines/scripts/Update-TestNamesForReporting.ps1 | New script to rewrite JUnit testcase names for improved reporting. |
| eng/pipelines/scripts/Set-PowerShellJavaHome.ps1 | New script to set PowerShellJavaHome from the Java version selection. |
| eng/pipelines/scripts/Publish-FaultInjectorLogs.ps1 | New script to zip and publish http-fault-injector logs for troubleshooting. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Copilot started reviewing on behalf of
Alan Zimmer (alzimmermsft)
August 12, 2026 00:45
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.
Suppressed comments (2)
eng/pipelines/templates/steps/build-and-test.yml:259
workingDirectoryis an input ofPowerShell@2, not a step-level property (seeeng/pipelines/templates/steps/run-and-validate-linting.yml:43-48). At this indentation Azure Pipelines can reject the step as an unexpected property; if it is ignored, the script runs from the repository root and no longer limits its recursive XML scan tosdk. Move it underinputs.
workingDirectory: $(System.DefaultWorkingDirectory)/sdk
eng/pipelines/scripts/Write-TestProxyLogs.ps1:9
- The callers pass
-LogFileDirectory, but this script has noparamblock. PowerShell therefore leaves the supplied tokens in$argsand$LogFileDirectoryremains unset, so the task does not reliably search$(Build.SourcesDirectory)and may fail when binding the null path. Declare the documented parameter before using it.
$files = @(Get-ChildItem -Path $LogFileDirectory -Filter test-proxy.log)
Ben Broderick Phillips (benbp)
approved these changes
Aug 12, 2026
Alan Zimmer (alzimmermsft)
merged commit Aug 12, 2026
3c3bd28
into
Azure:main
17 of 18 checks passed
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.
Description
Updates a few spots where YAML was using inline scripts to use checked in files to reduce YAML sizes. This resolves an issue where a few pipelines are failing due to YAML sizes exceeding limits in Azure DevOps.
This PR has related work in azure-sdk-tools for
eng/commonscripts: Azure/azure-sdk-tools#16705All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines