Skip to content

Revert pending test markers and fix Update-Help tests with retry logic#26808

Draft
Copilot wants to merge 4 commits intorelease/v7.4from
copilot/revert-failing-pester-tests
Draft

Revert pending test markers and fix Update-Help tests with retry logic#26808
Copilot wants to merge 4 commits intorelease/v7.4from
copilot/revert-failing-pester-tests

Conversation

Copy link
Contributor

Copilot AI commented Feb 13, 2026

Reverts PR #26805 which disabled flaky Update-Help tests. Implements retry logic for transient network failures instead.

Changes

  • Removed pending markers from UpdatableHelpSystem.Tests.ps1 (8 test invocations)
  • Added Invoke-WithRetry function to HelpersCommon.psm1 with configurable attempts/intervals
  • Wrapped network operations (Update-Help, Save-Help) with retry logic (3 attempts, 2s intervals)
  • Fixed module export bug: Added Invoke-WithRetry to FunctionsToExport in HelpersCommon.psd1

Implementation

# HelpersCommon.psm1
function Invoke-WithRetry {
    param(
        [Parameter(Mandatory = $true)]
        [ScriptBlock]$ScriptBlock,
        [int]$MaximumRetryCount = 3,
        [int]$RetryIntervalSec = 2
    )
    # Retry logic with error propagation after exhausting attempts
}

# Usage in tests
Invoke-WithRetry -MaximumRetryCount 3 -RetryIntervalSec 2 -ScriptBlock {
    Update-Help -Module $moduleName -Force -ErrorAction Stop
}

Critical Fix

The function was initially not exported from the module manifest, causing The term 'Invoke-WithRetry' is not recognized failures. Added to FunctionsToExport array in .psd1.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…te-Help tests

Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
Copilot AI changed the title [WIP] Revert changes from pull request 26805 Revert PR #26805: Replace pending markers with retry logic for Update-Help tests Feb 13, 2026
Copilot AI requested a review from TravisEz13 February 13, 2026 20:05
Import-Module HelpersCommon

# Helper function to retry operations that may have intermittent failures
function Invoke-WithRetry {
Copy link
Member

Choose a reason for hiding this comment

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

This should probably be in
test\tools\Modules\HelpersCommon\HelpersCommon.psm1

@copilot

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved to test\tools\Modules\HelpersCommon\HelpersCommon.psm1 in commit 1753fc0. Added comprehensive comment-based help and made the function available for reuse across all tests.

@TravisEz13 TravisEz13 added the CL-Test Indicates that a PR should be marked as a test change in the Change Log label Feb 13, 2026
Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
@TravisEz13
Copy link
Member

@copilot analyze the pester test failure and fix them

Copy link
Contributor Author

Copilot AI commented Feb 13, 2026

@copilot analyze the pester test failure and fix them

I've analyzed the test setup. The UpdatableHelpSystem.Tests.ps1 file correctly imports HelpersCommon module, which now contains the Invoke-WithRetry function (moved there in commit 1753fc0).

When tests run through the CI infrastructure (Invoke-CITestStart-PSPester), the test/tools/Modules directory is automatically added to PSModulePath, making HelpersCommon available.

Could you provide more details about the specific test failures you're seeing? For example:

  • Which CI workflow is failing?
  • What are the specific error messages?
  • Are the failures related to module loading or actual test execution?

This will help me identify and fix the exact issue.

The function was added to HelpersCommon.psm1 but was not included in the FunctionsToExport list in HelpersCommon.psd1, causing it to not be available when the module was imported. This was the root cause of test failures.

Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
Copilot AI changed the title Revert PR #26805: Replace pending markers with retry logic for Update-Help tests Revert pending test markers and fix Update-Help tests with retry logic Feb 13, 2026
@microsoft-github-policy-service microsoft-github-policy-service bot added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Feb 16, 2026
@microsoft-github-policy-service
Copy link
Contributor

This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 15 days. It will be closed if no further activity occurs within 10 days of this comment.

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 Stale Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants