Skip to content

DOC-7003 retarget the remaining dead k8s API anchors - #3879

Merged
andy-stark-redis merged 1 commit into
mainfrom
DOC-7003-k8s-api-anchors-followup
Aug 27, 2026
Merged

DOC-7003 retarget the remaining dead k8s API anchors#3879
andy-stark-redis merged 1 commit into
mainfrom
DOC-7003-k8s-api-anchors-followup

Conversation

@andy-stark-redis

@andy-stark-redis andy-stark-redis commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Follow-up to a75f8c03b (Part A2), clearing the 26 remaining dead Go-type anchors
into the generated Kubernetes API reference. Based on main. Same root cause: those
pages are organised by field path, so a Go type name was never an anchor on them.

Found by the Part B1 checker (#3867), and
nothing before it could see them — the external audit couldn't by construction (these are
relrefs, not external URLs), and the build can't because relref validates the page and
never the heading.

Counting distinct anchors understated this

There are 10 distinct (file, anchor) pairs but 26 instances, and they are not
duplicates
. Eight separate links share #redisenterprisespec while each names a
different field in its link text, so each needed its own target. The unit of work was
the link, not the anchor.

Targets were derived, not guessed

Each field name was located in the API reference's own tables and the containing section
taken. That gives eight precise targets where a blanket #spec would have been defensible
but worse:

Fields Target
apiCertificateSecretName, cmCertificateSecretName, metricsExporterCertificateSecretName, proxyCertificateSecretName, syncerCertificateSecretName, ldapClientCertificateSecretName #speccertificates
awsSecretName, sftpSecretName, swiftSecretName, absSecretName, gcsSecretName #specbackups3 / sftp / swift / abs / gcs
clientKeySecret, serverCertSecret #specreplicasources
globalConfigurations #specglobalconfigurations
licenseSecretName, clusterCredentialSecretName, secretName, redisVersion, redisUpgradePolicy #spec (these genuinely live in the top-level table)

The strongest evidence this was right: vault.md already used correct field-path anchors
for four of its links
(#speccertificates, #specldap, #specssosaml,
#specuserdefinedmodulessourcehttps) alongside the broken Go-type ones. The convention was
known and applied inconsistently, so matching the working links is the local standard
rather than my invention.

Verification

Check Result
All 11 target anchors in the rendered HTML present, with a negative control confirming #redisenterprisespec is genuinely absent
Checker: k8s API-reference findings 26 → 0
Checker: anchored relrefs resolving OK 2,416 → 2,442 (+26)
Hugo build no errors, so every relref still resolves
Dead-anchor form anywhere in current k8s content none

The +26 on the OK count is the check that matters: findings could drop to zero because
links vanished. The OK count rising by exactly 26 proves they now resolve.

Rendered vault.md shows 10 hrefs to #speccertificates — 6 retargeted plus the 4 already
correct, which reconciles.

Two limits of my own tooling, recorded

  • My field extractor first reported globalConfigurations as not existing on its page.
    It does, with a section of its own; the table cell wraps it in an anchor tag and my regex
    only matched bare cell text.
  • Three links reading [REDB spec.redisVersion field] rather than a bare field name went
    unmatched, giving 23 against the checker's 26.

Both were caught by refusing to edit until the two instance counts agreed — which is the
only reason this PR isn't three links short.

Still open

86 checker findings remain repo-wide outside Kubernetes. Not touched here; they span several
product areas and mix mechanical retargets with genuine editorial decisions (one target page
split "Create certificates" into four narrower sections).

🤖 Generated with Claude Code


Note

Low Risk
Documentation-only anchor updates with no runtime, security, or configuration impact.

Overview
DOC-7003 follow-up: retargets 26 internal relref links that still pointed at obsolete Go-type fragments (for example #redisenterprisespec, #redisenterprisedbspec) on generated Kubernetes API reference pages, which only expose field-path section anchors.

In vault.md, API field links in the Vault secrets table now jump to the matching sections—#spec, #speccertificates, #specreplicasources, per-backup-provider anchors, #specglobalconfigurations, and similar—instead of a single broken spec-type anchor.

The upgrade pages (upgrade-redis-cluster.md, openshift-cli.md, upgrade-olm.md) get the same treatment for spec.redisVersion, redisUpgradePolicy, and related REC/REDB API links (#spec rather than #redisversion / #redisupgradepolicy).

No product or operator behavior changes; this is link hygiene so readers land on the right API table rows.

Reviewed by Cursor Bugbot for commit e463891. Bugbot is set up for automated code reviews on this repo. Configure here.

Clears the 26 remaining Go-type anchors pointing into the generated Kubernetes API
reference, across vault.md and the three upgrade pages. Same root cause as the four
fixed in a75f8c0: the local pages are organised by field path, so a Go type name
was never an anchor on them.

The checker from the B1 branch found these, and nothing before it could. The
external-anchor audit could not see them by construction, because they are relrefs
rather than external URLs, and the build cannot see them because relref validates
the page and never the heading.

Counting distinct anchors understated this badly. There are 10 distinct (file,
anchor) pairs but 26 instances, and they are not duplicates of each other: eight
separate links share the dead anchor #redisenterprisespec while each names a
different field in its link text, so each one needed its own target. The right unit
of work here was the link, not the anchor.

Targets were derived rather than guessed, by locating each field name in the API
reference's own tables and taking the containing section. That produced eight
distinct precise targets where a blanket #spec would have been defensible but worse
-- the six certificate fields belong to spec.certificates, the five backup
credentials to their own spec.backup.* subsections, the two replica-source secrets
to spec.replicaSources. Only the fields that genuinely live in the top-level table
became #spec.

The strongest hint that this was the right approach is that vault.md already used
correct field-path anchors for four of its links, alongside the broken Go-type ones.
The convention was known and applied inconsistently, so matching the working links
was the local standard rather than an invention.

Two limits of my own extraction are worth recording. It first reported
globalConfigurations as a field that did not exist on its page, because the table
cell wraps it in an anchor tag and the regex only matched bare cell text -- the
field is there, with a section of its own. And three links whose text reads "REDB
spec.redisVersion field" rather than a bare field name went unmatched until the
instance counts were reconciled, 23 against the checker's 26. Both were caught by
insisting the two numbers agree before editing anything.

Learned: counting distinct dead anchors is the wrong unit when one anchor serves many links -- eight links shared #redisenterprisespec and each needed a different target, so reconcile instances against distinct pairs before estimating the work.
Constraint: these targets are field-path slugs produced by the sed pass in k8s_apis_sync.yaml, so they move together if that workflow changes.
Directive: derive an API-reference anchor by finding the field in the reference's own tables; don't blanket-retarget to #spec, and match the field-path anchors already working in the same file.
Gaps: 86 findings remain repo-wide outside the Kubernetes pages, unverified individually; the two /spec targets for redisVersion and redisUpgradePolicy send a reader to a large table because neither field has a section of its own.
Ticket: DOC-7003
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

DOC-7003

@github-actions

Copy link
Copy Markdown
Contributor

🧠 Redis Memory

Found 5 related items from repository history (5 new this commit):

Memory updated at e463891

@andy-stark-redis

Copy link
Copy Markdown
Contributor Author

Thanks @kaitlynmichael !

@andy-stark-redis
andy-stark-redis merged commit 82adf5c into main Aug 27, 2026
93 checks passed
@andy-stark-redis
andy-stark-redis deleted the DOC-7003-k8s-api-anchors-followup branch August 27, 2026 14:21
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