Skip to content

check-links: don't fail the generated-docs sync PR over absolute self-links it can't fix - #1910

Closed
marcleblanc2 wants to merge 1 commit into
mainfrom
check-links/upstream-generated-files
Closed

check-links: don't fail the generated-docs sync PR over absolute self-links it can't fix#1910
marcleblanc2 wants to merge 1 commit into
mainfrom
check-links/upstream-generated-files

Conversation

@marcleblanc2

@marcleblanc2 marcleblanc2 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Why

#1858 added the Check links job (--check-anchors --check-self-links), and #1899 rewrote the absolute https://sourcegraph.com/docs/… links in the generated observability/telemetry pages to relative ones. The sync bot (doc/_generated.push.sh) regenerates those files from Go sources that still contain the absolute links, so its next push to sync/generated-docs (#1883) reintroduces them, and the job flags each one as new against main.

Replaying the bot's output (#1883 head 80fb54e4, applied over main) through the job's exact command gives exit 1 with 26 findings, all "Absolute self-link" in alerts.mdx, dashboards.mdx, protocol.mdx and private-metadata-allowlist.mdx. Nothing in this repo can make that go green: the fix belongs in the generators.

What

In the files _generated.push.sh overwrites (self-hosted/observability/{alerts,dashboards}.mdx, cli/references/**, cody/capabilities/supported-models.mdx, admin/telemetry/{protocol,private-metadata-allowlist}.mdx), an absolute self-link is a finding only when its (redirect-followed) target is missing, and the message says (generated in sourcegraph/sourcegraph; fix it there). Everywhere else the check is unchanged. next build runs without --check-self-links, so deploys are unaffected.

Verification

  • Same replay with this branch: 26 → 2 findings, both real dead anchors in upstream source (monitoring/definitions/worker.go/admin/code-hosts/github#github-com-rate-limits, zoekt.go/code-search/features#shard-merging). Upstream fix: sourcegraph/sourcegraph PR to follow.
  • node dev/check-links.mjs --check-anchors --check-self-links --format json on this branch vs main: 248 findings each, 0 new, 0 removed.
  • npx tsc --noEmit passes.

Merge order for the PR-check stack

Trial-merged onto main in this order with no conflicts:

  1. ci: Comment the Vercel build log on PRs whose build fails #1918 Vercel build log comment — independent; first so the other PRs' Vercel failures get a readable log
  2. check-links: one suggestion per fix, synced with findings; one fact per line in reports #1916 check-links report format — adds dev/sync-review-comments.sh, which ci/redirects: Add Redirect check for PRs #1880 calls
  3. ci/redirects: Add Redirect check for PRs #1880 redirect check — needs check-links: one suggestion per fix, synced with findings; one fact per line in reports #1916 merged first
  4. spell check: update inline comments whose text changed #1919 spell check comment updates — independent
  5. check-links: don't fail the generated-docs sync PR over absolute self-links it can't fix #1910 check-links, generated-docs sync PR — conflicts with check-links: one suggestion per fix, synced with findings; one fact per line in reports #1916 on dev/check-links.mjs; rebase after check-links: one suggestion per fix, synced with findings; one fact per line in reports #1916 merges

Squash-merge each, then rebase the next onto main.

#1920 (broken) and #1921 (fixed) are the example PRs that exercise every check; never merge, close them once the stack has landed.

…ink finding

doc/_generated.push.sh in sourcegraph/sourcegraph overwrites alerts.mdx,
dashboards.mdx, cli/references/**, supported-models.mdx, protocol.mdx and
private-metadata-allowlist.mdx on every sync, with absolute
https://sourcegraph.com/docs/... links. Since #1899 made those links
relative here, the next sync PR reintroduces 26 findings and fails the
Check links job; nothing in this repo can fix that. In those files, an
absolute self-link is now only a finding when its target is missing, and
the message names the repository that owns the file.
@vercel

vercel Bot commented Sep 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sourcegraph-docs Ready Ready Preview Sep 11, 2026 5:47am UTC

Request Review

@marcleblanc2

marcleblanc2 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

Plan A is to fix the root cause in the generators: sourcegraph/sourcegraph#15632 (makes the emitted links relative and fixes the moved paths)

This PR is plan B

@marcleblanc2

Copy link
Copy Markdown
Contributor Author

Moved to #1944 (branch renamed to marc/check-links/upstream-generated-files).

@marcleblanc2
marcleblanc2 deleted the check-links/upstream-generated-files branch September 11, 2026 17:27
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.

1 participant