Fix the nightly link check: tell a broken runner from a dead link, repair every dead link it found - #21694
Merged
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21694
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 114 PendingAs of commit f4bd5e6 with merge base 9cd0c12 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
shoumikhin
force-pushed
the
shoumikhin/linkcheck-fewer-false-positives
branch
from
August 8, 2026 23:33
dbb9910 to
091bebf
Compare
shoumikhin
force-pushed
the
shoumikhin/linkcheck-fewer-false-positives
branch
from
August 9, 2026 04:39
091bebf to
8ca5333
Compare
shoumikhin
requested review from
kirklandsign,
larryliu0820 and
mergennachin
as code owners
August 9, 2026 04:39
shoumikhin
force-pushed
the
shoumikhin/linkcheck-fewer-false-positives
branch
from
August 9, 2026 04:51
8ca5333 to
6813118
Compare
shoumikhin
force-pushed
the
shoumikhin/linkcheck-fewer-false-positives
branch
from
August 9, 2026 05:41
6813118 to
a6bb414
Compare
shoumikhin
force-pushed
the
shoumikhin/linkcheck-fewer-false-positives
branch
from
August 9, 2026 05:55
a6bb414 to
6c4e82c
Compare
shoumikhin
force-pushed
the
shoumikhin/linkcheck-fewer-false-positives
branch
from
August 10, 2026 05:51
6c4e82c to
70e4370
Compare
…pair every dead link it found
shoumikhin
force-pushed
the
shoumikhin/linkcheck-fewer-false-positives
branch
from
August 10, 2026 18:07
70e4370 to
f4bd5e6
Compare
JakeStevens
approved these changes
Aug 10, 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.
The nightly
link-check / lint-urlsjob has been red for weeks. There are two separate problems behind that, and this PR fixes both.Problem 1: the script cannot tell a dead host from a broken runner
scripts/lint_urls.shgets000back from curl when there is no HTTP response atall. That happens for two very different reasons: the host is dead, or the runner
has no working egress. The script treated both as
WARNand moved on.That is unsafe in both directions:
most want to catch.
.github/workflows/lint.ymlruns this same script in diff mode on every pull request, where the only URLs
checked are the ones that pull request adds. A new link with a typo in the host
name gives 000 and passes today. A runner with no egress makes every link WARN
and the whole job green. Both were reproduced locally.
The fix
On
000, probe one known-good URL,https://api.github.com, which the runneralready depends on:
000, so this runner has no egress:WARN, as before.the URL once with a 60 second timeout, then judge it on that result, which for a
dead host means
FAIL.One deliberate addition worth calling out: the retry with the longer timeout is
more than the minimum needed to close the hole. It is there because the same URLs
were sampled across six nights of nightly logs and a small number of them, one or
two per night out of about 2100, return
000once and then answer normally. Thedefault timeout is 10 seconds. Without the retry, this change would turn those
into hard failures and the nightly would stay red for no good reason.
Also removed: the check-host.net fallback
When the first request failed, the script asked
check-host.netwhether the URLwas reachable from elsewhere and could then overwrite the verdict. That is
removed. Note this makes the script stricter, not more lenient: on a 404 or a 500
the fallback could turn a
FAILinto anOK. Dropping it means a real 404 stays a404, and it also removes a third-party service from the critical path of a lint
job.
Problem 2: eight actually dead links
With problem 1 fixed the nightly would still be red, because there really are dead
links in the tree. The most recent nightly on main
(31350839957)
reported 7 x
FAIL 404and 1 xFAIL 000. All eight are handled here:setup.pyblob/master/setup.pysetup.py, so amasterlink cannot work.ci/docker/common/install_openssl.shblob/main/.ci/docker/common/install_openssl.shmain.ci/scripts/test_llava.shdocs/source/kernel-library-custom-aten-kernel.mdpytorch.org/cppdocs/library.html#...test/models/export_program.pypytorch.org/cppdocs/notes/tensor_indexing.htmldocs/source/success-stories.mdREADME.mdgithub.com/pytorch/executorch/stargazers@lint-ignorebackends/arm/scripts/toolchain_utils.shmusl.cctoolchain tarball@lint-ignoreTwo more URLs are cleaned up along the way: a truncated Qualcomm SDK URL in
backends/qualcomm/scripts/download_qnn_sdk.pythat was never a real link, and aQwen issue link in
examples/models/llama/runner/generation.pypointing at theold repository name.
On the Wikimedia one specifically:
examples/models/llava/README.mdalreadyembeds the renamed photo and documents the caption the model produces for it,
which matches the
EXPECTED_PREFIXthe script asserts. So this restores theoriginal input rather than substituting a different picture. Worth knowing, and
the reason this is low risk: no workflow runs
.ci/scripts/test_llava.sh. Bothpull.ymlandtrunk.ymlcarry the comment "llava gives segfault so notcovering", so llava is not in CI at all right now.
How this was verified
A whole-tree scan is nightly-only, so a pull request run here would only check the
handful of URLs this PR adds. To get real numbers,
_link_check.ymlwas dispatchedin whole-tree mode against this branch's contents
(31417702080):
Reconciling the two totals, since they should not match exactly:
and 2 now marked
@lint-ignore.https://api.github.com, which is nowwritten in
lint_urls.shas the probe target and so gets scanned itself.during the day, in
examples/models/muse-glimmer/, and are unrelated to thischange. All 4 pass.
The 7 extra WARNs are the same thing that produces the existing 24: sites that
return
403to an automated client. Between the two runs,cppreference.com,stackoverflow.comandvulkan.orghappened to answer403instead of200.Those are already treated as warnings and are not affected by this PR.
The 000 handling itself was also exercised directly, in a scratch repository:
WARN 000, exit 0, matching a broken runner.FAIL 000, exit 1.OK 200,WARN 403andFAIL 404all still behave as before.