check-links: don't fail the generated-docs sync PR over absolute self-links it can't fix - #1910
Open
marcleblanc2 wants to merge 1 commit into
Open
check-links: don't fail the generated-docs sync PR over absolute self-links it can't fix#1910marcleblanc2 wants to merge 1 commit into
marcleblanc2 wants to merge 1 commit into
Conversation
…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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 |
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.
Why
#1858 added the
Check linksjob (--check-anchors --check-self-links), and #1899 rewrote the absolutehttps://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 tosync/generated-docs(#1883) reintroduces them, and the job flags each one as new againstmain.Replaying the bot's output (#1883 head
80fb54e4, applied overmain) through the job's exact command gives exit 1 with 26 findings, all "Absolute self-link" inalerts.mdx,dashboards.mdx,protocol.mdxandprivate-metadata-allowlist.mdx. Nothing in this repo can make that go green: the fix belongs in the generators.What
In the files
_generated.push.shoverwrites (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 buildruns without--check-self-links, so deploys are unaffected.Verification
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 jsonon this branch vsmain: 248 findings each, 0 new, 0 removed.npx tsc --noEmitpasses.