Harden markdown link checker against transient network failures#27715
Draft
TravisEz13 with Copilot wants to merge 2 commits into
Draft
Harden markdown link checker against transient network failures#27715TravisEz13 with Copilot wants to merge 2 commits into
TravisEz13 with Copilot wants to merge 2 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
- Replace Invoke-WebRequest built-in retry (only handles 5xx) with a manual retry loop that also catches transport-level exceptions (timeouts, TLS errors, DNS failures, etc.) - Add exponential backoff: starts at RetryIntervalSec (2s), doubles each attempt, capped at 15s - HEAD first each attempt; if HEAD throws a transport error OR returns 404/405, fall back to GET for that same attempt before sleeping - Add -MaximumRedirection 10 to all HTTP requests - Change default timeout from 30s to 20s per request - Change default retry count from 2 to 3 (4 total attempts) - Log attempt count in pass/fail/ignore output lines - Update action.yml and verify-markdown-links.yml defaults to match Fixes transient CI failures like: "An error occurred while sending the request." on known-good URLs (e.g. aka.ms/security.md/msrc/bounty, microsoft.com/msrc) that pass after retrying. Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update markdown link verification for resilience against network failures
Harden markdown link checker against transient network failures
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI link-check jobs were failing on valid URLs (
aka.ms,microsoft.com) with"An error occurred while sending the request."— transport-level exceptions thatInvoke-WebRequest's built-in-MaximumRetryCountdoes not retry (it only retries HTTP 5xx).Changes
Verify-MarkdownLinks.ps1— core fixInvoke-WebRequestbuilt-in retry with a manual loop that catches transport exceptions (timeouts, TLS, DNS failures)MaximumRetryCount=3); default timeout: 20s-MaximumRedirection 10to all requestsaction.yml— update defaults to match (timeout-sec: 20,maximum-retry-count: 3)verify-markdown-links.yml— pass updated values explicitlyRetry semantics