ci(pull-request): add Sphinx linkcheck to catch dead external links#61
Merged
Conversation
Internal :ref:/:doc: references are already enforced by the nitpicky html build; add a linkcheck step that reuses the rst/ tree build.sh generates to validate external URLs. Harden against flaky endpoints with retries, a timeout, and an ignore list for hosts that 403 non-browser clients (galaxy.ansible.com, hub.docker.com). Signed-off-by: Simon Bärlocher <s.baerlocher@sbaerlocher.ch>
The new linkcheck step caught genuine broken links: - compatibility.rst: 'ansible.*/issues' and 'ansible.*/releases.atom' used a literal '.*' glob as a URL; rewrite as prose listing the real per-collection repositories. - standards.rst: linked a non-existent STANDARDS.md in arillso/.github (404); point at the repository root instead. - conf.py: ignore the 'tag:' URI scheme that appears in generated collection RST (tailscale_role ACL tags), which linkcheck cannot resolve and which lives in generated output we do not edit. Signed-off-by: Simon Bärlocher <s.baerlocher@sbaerlocher.ch>
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.
Summary
Adds a Sphinx
linkcheckstep to the PR workflow so dead external links are caught automatically, instead of being found manually (cf. commit2e96c60"remove broken quickstart link").Internal
:ref:/:doc:references are already enforced by the existing nitpicky html build (-W); this adds coverage for external URLs.Changes
conf.py— linkcheck configuration hardened against flaky endpoints:linkcheck_retries=2,linkcheck_timeout=15,linkcheck_workers=5,linkcheck_anchors=False(client-rendered anchors aren't real breakage), and an ignore list for hosts that 403 non-browser clients (galaxy.ansible.com, hub.docker.com)..github/workflows/pull-request.yml— newCheck Linksstep after the build, reusing therst/treebuild.shalready generated (collections rendered + normalized), so no double build.Notes
From a triage of the Notion "Repo Ideas" backlog for
guide: this was the one clearly-lohnende offene Idee. The other guide ideas were either already done (build.sh versions via versions.env/Renovate, Dockerfile SHA256 pin, local-build docs, Mermaid) or low-ROI (incremental builds, facet search) and were closed/annotated in Notion.