Skip to content

Conversation

@TravisEz13
Copy link
Member

Backport of #26326 to release/v7.6

Triggered by @TravisEz13 on behalf of @app/copilot-swe-agent

Original CL Label: CL-BuildPackaging

/cc @PowerShell/powershell-maintainers

Impact

REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.

Tooling Impact

  • Required tooling change
  • Optional tooling change (include reasoning)

Improves readability of GitHub Actions logs by creating collapsible sections. Makes it easier to navigate verbose build output.

Customer Impact

  • Customer reported
  • Found internally

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

Verified that log grouping functions (Write-LogGroupStart/Write-LogGroupEnd) work correctly in GitHub Actions workflows. Tested collapsible log sections render properly in the Actions UI. Backport tested by reviewing conflict resolution in build.psm1 to ensure v7.6 code patterns are preserved while adding log grouping.

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

This change only adds logging wrapper functions that create collapsible sections in GitHub Actions. The core build logic remains unchanged. Merge conflicts were minimal and only involved preserving v7.6's Scenario validation values while adding the log grouping calls.

Merge Conflicts

Conflict in build.psm1: v7.6 uses different Scenario parameter values ('Package', 'DotNet', 'Both') compared to main branch which added 'Tools' and 'All'. Resolution: Kept v7.6's existing values and added log grouping calls without changing the Scenario logic.

…owerShell#26326)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
Co-authored-by: Travis Plunk <travis.plunk@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings November 24, 2025 20:02
@TravisEz13 TravisEz13 requested a review from a team as a code owner November 24, 2025 20:02
@TravisEz13 TravisEz13 added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Nov 24, 2025
Copy link
Contributor

Copilot AI left a 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 is a backport of log grouping functionality from the main branch to release/v7.6. The changes add collapsible log sections to GitHub Actions workflows, making verbose build output easier to navigate. The PR includes new log grouping wrapper functions (Write-LogGroupStart and Write-LogGroupEnd) that create GitHub Actions workflow commands for collapsible sections.

Key changes:

  • Added Show-Environment function to tools/ci.psm1 for displaying environment variables in a collapsible log group
  • Wrapped major build operations in build.psm1 with log groups (Install Native Dependencies, Install .NET SDK, Build PowerShell, etc.)
  • Updated CI workflows to trigger on buildModuleChanged in addition to source changes, ensuring that changes to build.psm1 trigger CI runs
  • Created comprehensive log grouping guidelines in .github/instructions/log-grouping-guidelines.instructions.md
  • Refactored GitHub Actions to use the new Show-Environment function instead of inline environment dumping

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
build.psm1 Added log grouping around major build operations (bootstrap, restore, build, configuration generation, etc.)
tools/ci.psm1 Added new Show-Environment function that wraps environment variable display in a log group
.github/workflows/windows-ci.yml Added buildModuleChanged output and updated job conditions to trigger on build module changes
.github/workflows/linux-ci.yml Added buildModuleChanged output and updated job conditions to trigger on build module changes
.github/workflows/macos-ci.yml Added buildModuleChanged output and updated job conditions to trigger on build module changes
.github/workflows/windows-packaging-reusable.yml Replaced inline environment capture with Show-Environment call
.github/workflows/analyze-reusable.yml Replaced inline environment capture with Show-Environment call
.github/actions/test/windows/action.yml Replaced inline log grouping with Show-Environment call
.github/actions/test/nix/action.yml Replaced inline log grouping with Show-Environment call
.github/actions/test/linux-packaging/action.yml Replaced inline environment capture with Show-Environment call
.github/actions/build/ci/action.yml Replaced inline environment capture with Show-Environment call
.github/instructions/log-grouping-guidelines.instructions.md New instruction file documenting best practices for using log groups in GitHub Actions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@TravisEz13 TravisEz13 enabled auto-merge (squash) November 24, 2025 20:37
@TravisEz13 TravisEz13 merged commit 61682d4 into PowerShell:release/v7.6 Nov 24, 2025
44 checks passed
@TravisEz13 TravisEz13 deleted the backport/release/v7.6/26326-cdeda2a50 branch November 24, 2025 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants