Skip to content

DOCS-2996: Add all-versions sitemap and full-coverage link check - #2911

Merged
ctauchen merged 2 commits into
tigera:mainfrom
ctauchen:DOCS-2996-link-checker-full-coverage
Aug 11, 2026
Merged

DOCS-2996: Add all-versions sitemap and full-coverage link check#2911
ctauchen merged 2 commits into
tigera:mainfrom
ctauchen:DOCS-2996-link-checker-full-coverage

Conversation

@ctauchen

Copy link
Copy Markdown
Collaborator

The build link checker only verifies pages in the latest version of each product, because the crawler seeds from sitemap.xml, which is deliberately latest only. Older and preview versions are built and served but never link-checked, so a dead link on an older page passes CI while the same link on latest fails. This was the root cause behind the split behavior seen in DOCS-2995.

This is phase one: produce full-version coverage and start surfacing the backlog, without changing what gates pull requests.

Changes:

  • Add a second sitemap plugin instance that emits sitemap-full.xml with no version ignorePatterns, so it lists every built version. The preset sitemap.xml is unchanged and stays latest only for search engines, and it remains the only sitemap referenced in robots.txt.
  • Add a FULL_COVERAGE env switch to the crawler so it seeds from sitemap-full.xml when set. Default is off, so PR CI keeps crawling latest only.
  • Turn FULL_COVERAGE on in the weekly link check workflow. That job is non-blocking and files an issue on failure, so it is the safe place to surface the full-version backlog.

What this does not do: it does not gate any pull request on older versions. Enforcement policy for PR CI is a later decision, to be made only after the backlog surfaced by the weekly job is triaged and fixed. See DOCS-2996 for the full plan and the enforcement options.

Verification: once the deploy preview builds, sitemap-full.xml lists numbered versions in addition to latest, while sitemap.xml is unchanged. The tigera deploy preview link check runs without FULL_COVERAGE, so its behavior is unchanged.

https://tigera.atlassian.net/browse/DOCS-2996

Add a second sitemap plugin instance that emits sitemap-full.xml with no
version ignorePatterns, so it lists every built version rather than latest
only. The preset sitemap.xml is unchanged: it stays latest only for search
engines and remains the only sitemap referenced in robots.txt.

Add a FULL_COVERAGE env switch to the crawler so it seeds from
sitemap-full.xml when set, and turn it on in the weekly link check workflow.
The weekly job is non-blocking and files an issue on failure, so it is the
safe place to surface the full-version backlog. PR CI is unchanged and still
crawls latest only, so this does not gate any pull request yet.
@ctauchen
ctauchen requested a review from a team as a code owner August 10, 2026 16:16
Copilot AI lite review requested due to automatic review settings August 10, 2026 16:16
@netlify

netlify Bot commented Aug 10, 2026

Copy link
Copy Markdown

Deploy Preview for calico-docs-preview-next ready!

Name Link
🔨 Latest commit 4fe79d1
🔍 Latest deploy log https://app.netlify.com/projects/calico-docs-preview-next/deploys/6a79fb260ff7f70008d94cf9
😎 Deploy Preview https://deploy-preview-2911--calico-docs-preview-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Aug 10, 2026

Copy link
Copy Markdown

Deploy Preview succeeded!

Built without sensitive environment variables

Name Link
🔨 Latest commit 4fe79d1
🔍 Latest deploy log https://app.netlify.com/projects/tigera/deploys/6a79fb26f9854700081c4e13
😎 Deploy Preview https://deploy-preview-2911--tigera.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 71 (🔴 down 22 from production)
Accessibility: 98 (no change from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR expands link-check crawl coverage to include all built documentation versions by introducing an additional “full” sitemap and a FULL_COVERAGE toggle, while keeping PR CI behavior unchanged (latest/SEO-limited coverage).

Changes:

  • Add a second Docusaurus sitemap plugin instance that emits sitemap-full.xml without version ignore patterns.
  • Add FULL_COVERAGE env switching in the crawler to seed from sitemap-full.xml when enabled.
  • Enable FULL_COVERAGE in the weekly link-check workflow (non-blocking) to surface the full-version backlog.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
docusaurus.config.js Adds a second sitemap plugin instance to generate an all-versions sitemap (sitemap-full.xml).
.github/workflows/link-check-weekly.yml Enables full-coverage crawling for the weekly (non-blocking) link check job via FULL_COVERAGE=true.
tests/crawler.test.js Makes the crawler seed from sitemap-full.xml when FULL_COVERAGE=true and logs the coverage mode.
Suppressed comments (1)

tests/crawler.test.js:618

  • The log message prints “latest only” for the default crawl, but the default sitemap in this repo is “SEO-limited” (via ignorePatterns) rather than strictly “latest-only”. Updating the wording makes log output accurate and easier to interpret when debugging coverage.
  console.log(`Crawling the docs (${DOCS}) and executing tests.`);
  console.log(`Coverage: ${fullCoverage ? 'FULL (all versions)' : 'latest only'} via ${SITEMAP}.`);

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread __tests__/crawler.test.js
Comment on lines +25 to +28
// FULL_COVERAGE seeds the crawl from the all-versions sitemap (sitemap-full.xml) instead of the
// latest-only sitemap.xml. Used by the weekly job; leave off for PR CI until the backlog is fixed.
const fullCoverage = process.env.FULL_COVERAGE === 'true';
const SITEMAP = fullCoverage ? 'sitemap-full.xml' : 'sitemap.xml';
Comment thread docusaurus.config.js
Comment on lines +414 to +417
// Second sitemap instance for the internal link checker only. The preset sitemap above
// stays latest-only for SEO (sitemap.xml, the one advertised in robots.txt). This one has
// no version ignorePatterns, so it lists every built version at sitemap-full.xml. The
// crawler seeds from it when FULL_COVERAGE=true; it is not referenced in robots.txt.
Comment on lines +47 to +50
# Crawl every built version (via sitemap-full.xml), not just latest. This job is
# non-blocking and files an issue on failure, so it is the safe place to surface the
# full-version backlog. PR CI stays latest-only until the backlog is cleared.
FULL_COVERAGE: 'true'
The second sitemap instance references @docusaurus/plugin-sitemap by name, but
it was only present transitively via preset-classic and could not be resolved
as a standalone plugin. Add it as a direct dependency, pinned to 3.10.1 to
match the rest of the Docusaurus packages, since Docusaurus requires all of its
packages to be on the same version.
@ctauchen
ctauchen merged commit 3672e8d into tigera:main Aug 11, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants