Skip to content

[Feature Request]: Add error-checking for removal of files/URLs used by product #736

Open

Description

@lcawl

Prerequisites

  • I have searched existing issues to ensure this feature hasn't already been requested
  • I have tested using the latest version of docs-builder

What problem are you trying to solve?

With the changes to the way we're handling versioning in the Docs V3, we'll have scenarios where URLs that are used in the product (for example, in error messages or logs or UIs) need to continue to exist (or have appropriate redirects) for as long as that product version is supported.

In the old documentation system, as long as the old product version was pointing to an old docs version, it didn't matter if we removed a page from the latest docs versions. That will no longer be true. We'll need to ensure that either the page persists (with version appropriate trail markers if the content moves or changes radically) or that appropriate redirects are created.

Proposed Solution

@Mpdreamz suggested that we could add something like this:

locked:
  - path/to/yaml

... And start erroring if that page is no longer available or does not redirect. That way we can ensure certain pages always resolve.

Examples and Research

This issue arose as part of the discussion about how to handle pages that are linked from the Elasticsearch logs and error messages (https://github.com/elastic/elasticsearch/blob/main/server/src/main/resources/org/elasticsearch/common/reference-docs-links.txt) and how to ensure that the URLs used in V9.0.0, for example, continue to exist. And in the case of version-specific troubleshooting content or performance tuning content that is likely to change over time--how to ensure that when/if version-specific page variations arise that the URLs that existed in the early releases still resolve to something appropriate.

Alternative Solutions

Alternatively, we could add rely on (at a minimum) link checking all the link services that are used across our various product repos. The link checking would still need to run against all in-support branches of those link services.

Relates to #123

Additional Context

No response

How important is this feature to you?

Important

Activity

  1. lcawl commented on Jun 18, 2025

    @lcawl
    ContributorAuthor

    In a meeting with @ElishevaStern today it arose that there are efforts to generate automated links in Search labs (and maybe also blogs and articles) for terms that have a definitive source of truth (e.g. for "ESQL" or "ES|QL" the ES|QL reference in the documentation was the target of those automated links). Though not technically another place in the "product" affected by changes in the docs, it's a similar situation where we ought to be aware of the impact of our changes, IMO. It is TBD what sort of testing of those URLs occurs (e.g. are redirects sufficient or do we need to gain access to that list of URLs and take action when we know they're not longer up-to-date)

  2. cotti commented on Jun 3, 2026

    @cotti
    Contributor

    AI triage

    Automated investigation against the current codebase. A human still needs to confirm before any code change.

    Original concern

    Docs V3 versioning means URLs hardcoded in products (Elasticsearch error messages / reference-docs-links.txt, Kibana kbn-doc-links, automated Search Labs links, etc.) can silently break when a docs page is removed or moved, so we want build-time error-checking (e.g. a locked: list, or link-checking the product link services) that guarantees those URLs keep resolving or redirecting for as long as the product version is supported.

    Findings

    Verdict

    Needs stakeholder input

    The specific ask is not implemented. Today's tooling guarantees docs↔docs cross-links via the inbound-link validator and the link index, but it has no notion of "this URL is consumed by an external product and must keep resolving." Neither the proposed locked: allow-list nor the alternative (ingesting/link-checking product link services across all in-support branches) exists, and there is no removal/redirect-enforcement check. Beyond engineering design, the issue raises a policy question — what URL-stability guarantee do we make per supported product version — that product/docs leadership should settle before implementation.

    Proposal

    Open questions grouped by audience:

    • Product / docs policy: What is the stability contract? (e.g. "any URL referenced by a supported product version must resolve or 3xx for that version's support window.") Who owns curating the protected-URL set, and is breaking such a URL a hard CI failure or a warning + sign-off?
    • Engineering — source of truth: Do we (a) maintain a locked: list in docs config (Mpdreamz's proposal), and/or (b) ingest product link inventories directly (Elasticsearch reference-docs-links.txt, Kibana kbn-doc-links) and validate against them? Option (b) likely extends the inbound-link/link-index machinery in Elastic.Documentation.Links.
    • Engineering — versioning/coverage: How do we run the check against all in-support branches (not just main), and how does a locked URL interact with redirects vs. requiring the page to physically persist?

    Related issues

    Part of the open meta-issue #949 ("[meta] Link checks & Redirects"), which explicitly lists this one. Tight cluster:

    Notes

    • Suggested label additions: ai:eng-question, ai:product-question.
    • No partial fix has been merged for this issue's specific scope; the inbound-link validator predates it and addresses a sibling concern, not product-code link lists.
  3. added
    ai-triaged
    ai:eng-question
    ai:product-question
    on Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-triagedai:eng-questionai:product-questionenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions