Skip to content

docs: serve the newest release at user-guide/latest and main at user-guide/dev - #7758

Draft
ErikBPF wants to merge 1 commit into
apache:mainfrom
ErikBPF:docs/7684-latest-dev
Draft

ErikBPF wants to merge 1 commit into
apache:mainfrom
ErikBPF:docs/7684-latest-dev

Conversation

@ErikBPF

@ErikBPF ErikBPF commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Part of #7684. This is a draft because the first publish of the alias step is still unobserved and I would like review on the rename timing.

Rationale for this change

user-guide/latest/ served the unreleased docs built from main, so a released jar's compatibility and tuning messages sent users to behavior that had not shipped. Apache Spark and Apache Iceberg serve the newest release at latest/, which is what users expect from that name.

What changes are included in this PR?

  • Rename docs/source/user-guide/latest to dev and update the docname references, generated-docs paths, labeler/prettier rules, agent skills, and the release-docs script.

  • docs/generate-versions.py: move the release versions to LATEST_RELEASED_VERSION / PREVIOUS_VERSIONS, build the main guide as dev, detect each release branch's guide directory, fail if docs/source/user-guide/latest exists on main, and add --alias-latest <html dir>.

  • docs/build.sh: generate dynamic content against temp/user-guide/dev and alias the built newest release to user-guide/latest after Sphinx.

  • docs/source/conf.py: drop the five redirect stubs that targeted the old dev-tree URLs.

  • CometDocs maps the running version to a guide directory; CometConf.COMPAT_GUIDE and TUNING_GUIDE use it. Plan-stability goldens normalize the guide version to {version}; new CometDocsSuite is registered in both PR build workflows.

  • User guide index URL table and stability statement, docs/README.md, release_process.md (one-place promotion change), and backporting.md (branch-1.2 and older keep latest).

  • dev/generate-release-docs.sh rewrites the guide links it generates on a release branch
    (branch-X.Y) to user-guide/X.Y/. The freeze runs before the version bump, so generated pages
    otherwise embed user-guide/dev/ links and are then served as the archived X.Y guide.

How are these changes tested?

Docs build, run locally on a JDK 17 box because CI never runs docs/build.sh:

  • docs/build.sh completed: cloned the release branches, built the four Spark profiles, built Sphinx, and ran --alias-latest.
  • diff -rq build/html/user-guide/1.2 build/html/user-guide/latest: no differences.
  • Link check over 222,149 local href/src attributes in 703 built pages: 0 missing (excluding the known unrendered _static/webpack-macros.html fragments).
  • No conditional markers or literal $COMET_VERSION under dev/ or latest/; user-guide/installation.html still redirects to latest/installation.html; latest/ links to ../dev/index.html.
  • Guard: with docs/source/user-guide/latest present, the generator exits 1 with the reserved-directory message.
  • CometDocsSuite: 3 succeeded, 0 failed.
  • CometTPCDSV1_4_PlanStabilitySuite + CometTPCDSV2_7_PlanStabilitySuite: 129 succeeded, 0 failed.
  • dev/ci/check-suites.py and dev/ci/check-ci-config.py pass; spotless and prettier pass.

Merge note: this renames about 50 files, so it will conflict with any open docs PR. Please merge it when the queue is quiet.

…guide/dev

`user-guide/latest/` served the unreleased guide built from main, and the jar
linked there, so a released Comet pointed users at documentation for behaviour
that is not in their release.

The user guide source directory is now `dev/`. `docs/generate-versions.py`
builds main as `dev` and copies the newest release's finished HTML to
`latest/` after Sphinx, so each document is rendered once and the two
directories are byte-identical. Jar messages go through `CometDocs`, which maps
`1.2.x` to `user-guide/1.2/` and a snapshot or unknown version to `dev`, and
the plan-stability goldens normalise the version to `{version}`.

The release freeze script rewrites the guide links it generates to the branch's
own version: it runs before the release branch's version bump, so the generated
pages would otherwise embed `user-guide/dev/` links and then be served as the
archived `user-guide/X.Y/` guide.

Verified: full `docs/build.sh` on the final tree, `1.2` and `latest` identical,
222,149 local links checked across 703 pages with none missing, the
reserved-directory guard failing the build as intended, and the TPC-DS
plan-stability suites passing after the three q24 goldens adopted `{version}`.
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