-
Notifications
You must be signed in to change notification settings - Fork 4k
Fix batch generation build artifact #27945
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
772763f
to
c41d00c
Compare
9536c6e
to
ea8ff73
Compare
df2254d
to
61fa378
Compare
0e76723
to
f3b8726
Compare
There was a problem hiding this comment.
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 refactors the batch-generation pipeline to support running tests only on changed modules, enhances logging and artifact outputs, and fixes timing typos.
- Introduce a
TestChangedModulesOnly
parameter and wire it into the pipeline environment - Update batch-generation scripts to emit per-item JSON output and record artifact files
- Correct typos in timing variables and improve grouping logs
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
.azure-pipelines/batch-generation.yml | Add TestChangedModulesOnly parameter and replace legacy env var |
.azure-pipelines/PipelineSteps/BatchGeneration/util.psm1 | Add Azure DevOps log grouping markers |
.azure-pipelines/PipelineSteps/BatchGeneration/test-modules.ps1 | Emit each test result as JSON |
.azure-pipelines/PipelineSteps/BatchGeneration/prepare.ps1 | Rename artifacts directory var and record prepared module list |
.azure-pipelines/PipelineSteps/BatchGeneration/filter.ps1 | Switch to TEST_CHANGED_MODULES_ONLY logic and persist filtered lists |
.azure-pipelines/PipelineSteps/BatchGeneration/build-modules.ps1 | Fix $endTine typo, output each build result as JSON |
.azure-pipelines/PipelineSteps/BatchGeneration/batch-generate-modules.ps1 | Output each generation result as JSON |
.azure-pipelines/PipelineSteps/BatchGeneration/analyse-modules.ps1 | Fix $endTine typo, output each analysis result as JSON |
Comments suppressed due to low confidence (4)
.azure-pipelines/batch-generation.yml:1
- Consider changing the
TestChangedModulesOnly
parameter type fromstring
toboolean
so that downstream scripts can use native boolean logic instead of string comparisons.
parameters:
.azure-pipelines/PipelineSteps/BatchGeneration/filter.ps1:18
- New branches have been introduced for
TEST_CHANGED_MODULES_ONLY
; please add unit or integration tests covering both true and false cases to ensure the filter logic works correctly.
if ($env:TEST_CHANGED_MODULES_ONLY -eq "True") {
.azure-pipelines/PipelineSteps/BatchGeneration/filter.ps1:18
- The regex pattern uses forward slashes only, which may not match Windows-style backslashes in
$ChangedFiles
. Consider normalizing path separators or updating the pattern to use[\\/]
to support both.
if ($env:TEST_CHANGED_MODULES_ONLY -eq "True") {
.azure-pipelines/PipelineSteps/BatchGeneration/util.psm1:69
- [nitpick] Azure DevOps grouping commands expect
##[group]
immediately followed by the group name. Consider moving the count to a second line or separating the label for clearer log grouping.
Write-Host "##[group]$VariableName module groups: $($GroupedModules.Count)"
This reverts commit 3bb1042.
Description
Fixed a few bugs in batch generation and added some loggings for further traking/debugging
Bug was related to the regx match index
TestChangedModulesOnly parameter was added, which was used as variable.
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.md
and reviewed the following information:ChangeLog.md
file(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
.## Upcoming Release
header in the past tense.ChangeLog.md
if no new release is required, such as fixing test case only.