Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[release/v7.5] Mark flaky Update-Help web tests as pending to unblock CI#26837

Merged
daxian-dbw merged 2 commits intoPowerShell:release/v7.5PowerShell/PowerShell:release/v7.5from
daxian-dbw:backport/release/v7.5/26796-6b8d724b0daxian-dbw/PowerShell:backport/release/v7.5/26796-6b8d724b0Copy head branch name to clipboard
Feb 17, 2026
Merged

[release/v7.5] Mark flaky Update-Help web tests as pending to unblock CI#26837
daxian-dbw merged 2 commits intoPowerShell:release/v7.5PowerShell/PowerShell:release/v7.5from
daxian-dbw:backport/release/v7.5/26796-6b8d724b0daxian-dbw/PowerShell:backport/release/v7.5/26796-6b8d724b0Copy head branch name to clipboard

Conversation

@daxian-dbw
Copy link
Member

Backport of #26796 to release/v7.5

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

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

Customer Impact

  • Customer reported
  • Found internally

Update-Help tests downloading from the web were causing intermittent CI failures due to network issues (timeouts, task cancellations). Tests are now marked as pending to unblock CI while keeping them visible for future resolution. Issues #2807 and #6541 document the pattern.

Regression

REQUIRED: Check exactly one box.

  • Yes
  • No

This is not a regression.

Testing

33 of 38 tests now marked as NotRun (pending), unblocking CI while keeping tests visible for future resolution. Tests using local assets (-SourcePath variants) remain active. Null checks prevent issues during Pester discovery phase.

Risk

REQUIRED: Check exactly one box.

  • High
  • Medium
  • Low

Changes only affect test execution flow by marking flaky web-dependent tests as pending. Does not modify product code. Adds defensive null checks to handle Pester discovery phase gracefully. Only affects CI-tagged tests; Feature-tagged tests remain active.

Copilot AI review requested due to automatic review settings February 15, 2026 23:50
@daxian-dbw daxian-dbw added the CL-Test Indicates that a PR should be marked as a test change in the Change Log label Feb 15, 2026
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

Backport to release/v7.5 to reduce CI flakiness by marking web-dependent Update-Help tests as Pending while keeping them visible for future re-enablement.

Changes:

  • Add -MarkAsPending switch to RunUpdateHelpTests and use Set-ItResult -Pending for CI-tagged web Update-Help tests.
  • Add defensive null-guards around cleanup paths (help folder removal; Save-Help temp folder removal).
  • Add a repository instruction doc describing the required Set-ItResult + return pattern in 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 pending; adds null-guards around cleanup/temp paths.
.github/instructions/pester-set-itresult-pattern.instructions.md Documents the Set-ItResult (Pending/Skipped) pattern and the required return.

```powershell
It "Clear-Host works correctly" {
if ($IsARM64) {
Set-ItResult -Pending -Because "ARM64 runs in non-interactively mode and Clear-Host does not work."
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling/grammar: "non-interactively mode" should be "non-interactive mode".

Suggested change
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."

Copilot uses AI. Check for mistakes.
Comment on lines +257 to +265
$saveHelpFolder = if ($TestDrive) {
Join-Path $TestDrive (Get-Random).ToString()
} else {
$null
}

if ($saveHelpFolder) {
New-Item $saveHelpFolder -Force -ItemType Directory > $null
}
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$saveHelpFolder is computed in the RunSaveHelpTests discovery path (outside the It block) using $TestDrive. If $TestDrive isn't populated during discovery (common in Pester), this ends up capturing $null into the It block and Save-Help -DestinationPath $saveHelpFolder will fail when the test actually runs. Consider moving the folder creation into the It block (or a BeforeAll/BeforeEach inside the Describe/Context) and cleaning it up in AfterEach/AfterAll so it always uses the runtime $TestDrive.

Copilot uses AI. Check for mistakes.
Copilot AI and others added 2 commits February 17, 2026 11:54
…#26796)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
@daxian-dbw daxian-dbw force-pushed the backport/release/v7.5/26796-6b8d724b0 branch from edaf509 to a8dbf0b Compare February 17, 2026 19:54
@daxian-dbw daxian-dbw merged commit 0241259 into PowerShell:release/v7.5 Feb 17, 2026
42 of 44 checks passed
@daxian-dbw daxian-dbw deleted the backport/release/v7.5/26796-6b8d724b0 branch February 17, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-Test Indicates that a PR should be marked as a test change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments

Close sidebar
Morty Proxy This is a proxified and sanitized view of the page, visit original site.