[release/v7.6] Mark flaky Update-Help web tests as pending to unblock CI#26846
Conversation
…#26796) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Backports the default-branch change to unblock release/v7.6 CI by preventing known-flaky, web-dependent Update-Help tests from failing the pipeline, while keeping those tests visible as Pending for follow-up.
Changes:
- Add a
-MarkAsPendingswitch toRunUpdateHelpTestsand mark CI-tagged web Update-Help tests as Pending viaSet-ItResult -Pending+return. - Add defensive null guards around help-path and Save-Help temp folder cleanup to avoid discovery-time errors.
- Add repository documentation describing the
Set-ItResult(Pending/Skipped) + immediatereturnpattern for Pester tests.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
test/powershell/engine/Help/UpdatableHelpSystem.Tests.ps1 |
Marks CI web Update-Help tests as Pending and adds null guards around cleanup/setup. |
.github/instructions/pester-set-itresult-pattern.instructions.md |
Documents the Set-ItResult + return pattern with examples and guidance. |
| param ( | ||
| [string]$tag = "CI", | ||
| [switch]$useSourcePath, | ||
| [switch]$userscope | ||
| [switch]$userscope, | ||
| [switch]$markAsPending | ||
| ) |
There was a problem hiding this comment.
RunUpdateHelpTests introduces a new switch parameter named $markAsPending. Repo guidance for PowerShell parameters is to use PascalCase; consider renaming this parameter (and its call sites) to MarkAsPending for consistency with that convention.
| ```powershell | ||
| It "Clear-Host works correctly" { | ||
| if ($IsARM64) { | ||
| Set-ItResult -Pending -Because "ARM64 runs in non-interactively mode and Clear-Host does not work." |
There was a problem hiding this comment.
In the example text, "non-interactively mode" is ungrammatical; update it to "non-interactive mode" (or "non-interactive") so the guidance reads correctly.
| Set-ItResult -Pending -Because "ARM64 runs in non-interactively mode and Clear-Host does not work." | |
| Set-ItResult -Pending -Because "ARM64 runs in non-interactive mode and Clear-Host does not work." |
32f7691
into
PowerShell:release/v7.6
Backport of #26796 to release/v7.6
Triggered by @daxian-dbw on behalf of @app/copilot-swe-agent
Original CL Label: CL-Test
/cc @PowerShell/powershell-maintainers
Impact
REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.
Tooling Impact
Customer Impact
This fix addresses intermittent CI build failures caused by flaky Update-Help web tests that experience network timeouts and task cancellations. By marking these tests as pending, CI builds are unblocked while preserving test visibility for future resolution.
Regression
REQUIRED: Check exactly one box.
This is not a regression.
Testing
Tests marked as pending using Set-ItResult pattern. The changes were validated by running the test suite to ensure: (1) web-dependent CI tests now show as NotRun/Pending status, (2) local SourcePath-based tests continue to run normally, (3) defensive null checks prevent errors during Pester discovery phase. Successfully backported to v7.4 and v7.5 branches.
Risk
REQUIRED: Check exactly one box.
This change only affects test behavior (marking flaky tests as pending) and doesn't modify any production code. The defensive null checks add safety without changing functional behavior. Changes are test-only and follow established patterns already applied to v7.4 and v7.5 branches.