Check links fix - #1171
Merged
Merged
Conversation
process.exit() kills the process immediately; when stdout is a pipe (true in CI) Node's writes to it are async, so the console.log burst listing broken external links right before it can get truncated before the OS drains the write queue. Seen on a real run: the log showed "6 broken external link(s) found." but not one of the six URLs. Use process.exitCode instead — same non-zero exit, but the module finishes and the event loop flushes pending stdout first. Upstream issue filed: InditexTech/docouture#231
check-links.mjs reports which link is broken but not why. Following up on cac0758 (docouture#231): the first live re-run after that fix surfaced 3 URLs, only 1 of which (azure.microsoft.com/es-es/products/web-pubsub) failed consistently across 2 separate runs — the other 2 passed clean on run 2. That's the signature of CI-side rate limiting/timeouts, not dead links, but there was no way to confirm without the actual status code linkinator recorded. link.status is 0 when the request itself never got a response (timeout, DNS, connection reset) vs a real HTTP status when the server did answer — logging it distinguishes "this link is actually gone" from "this crawl's burst of concurrent requests got rate-limited", which decides whether the fix is content (dead link) or script (concurrency/timeout tuning).
Following up on cac0758 / 8e9c99e (docouture#231): live CI runs show the same 3 external links flip between broken and fine run to run (3 broken, then 1, then 0) with no client anywhere else ever seeing anything but 200 — a transient failure (rate limit, timeout, reset), not a dead link, mis-happening to fail the whole build on a bad roll of the dice. linkinator already has a mechanism for exactly this that the script wasn't using: `retry` (honour a 429's retry-after header) and `retryErrors` (retry a 5xx or status-0/no-response result a few times with jitter) instead of accepting the crawl's first failure as final. Wires both up with linkinator's own documented defaults for count/jitter.
Contributor
❗ This Pull Request will not trigger a docs releaseA Pull Request with no |
…hub.com/InditexTech/weavejs into diag/GH-1170-check-links-status-logging
Contributor
❗ This Pull Request will not trigger a docs releaseA Pull Request with no |
Contributor
❗ This Pull Request will not trigger a docs releaseA Pull Request with no |
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.
No description provided.