Skip to content

docs: publish stable documentation by minor version - #517

Open
WentingWu666666 wants to merge 1 commit into
documentdb:mainfrom
WentingWu666666:developer/wentingwu/minor-docs-versions
Open

WentingWu666666 wants to merge 1 commit into
documentdb:mainfrom
WentingWu666666:developer/wentingwu/minor-docs-versions

Conversation

@WentingWu666666

@WentingWu666666 WentingWu666666 commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Publish stable documentation by major.minor: release 1.1.2 publishes to /1.1/ and appears as 1.1 in the version selector. Installation commands and CRD URLs retain the full release version, with the existing chart/tag match check preserved.

Current published state (verified 2026-11-23)

The current stable operator release is 1.2.1; main’s Helm chart version is also 1.2.1. Documentation currently uses full patch versions: /1.2.1/ appears as 1.2.1 in the selector and owns the latest alias. Existing entries include 1.2.0, 1.1.1, 1.1.0, 1.0.0, 1.0-rc1, 0.3.0, 0.2.0, and the separate dev entry. There are currently no stable major.minor entries.

For a concrete before/after example, a future stable 1.2.2 release containing this workflow would publish to /1.2/, appear as 1.2 in the selector, and advance latest from 1.2.1 to 1.2. Its installation commands and CRD URLs would still use 1.2.2. A later 1.2.3 would update that same /1.2/ entry. These future versions are examples, not already published releases.

Merging alone publishes main to /dev/; it does not republish 1.2.1, create /1.2/, or remove existing patch-version entries. The old /1.2.1/ and other published snapshot URLs remain intact; backfilling minor entries and consolidating the selector require the separately approved migration below. Rerunning the historical 1.2.1 deployment still uses its old workflow, so it is not a way to apply the new publishing policy.

Automatic deployment behavior

  • Record the full release tag in each minor entry's release property in versions.json.
  • Fetch published state under the shared Pages deployment lock; skip an older patch when a newer patch for that minor is already published.
  • Allow maintenance releases to update older minors without moving latest backward. Compare versions numerically, including existing patch snapshots in ordering decisions.
  • Keep main at /dev/ and prereleases at their full-tag paths. Prereleases cannot update a stable minor, latest, or the root redirect. Stable tags must be major.minor.patch; prerelease tags must be major.minor.patch-prerelease.
  • Push release content, provenance, aliases, and the default redirect together. Fail on missing or inconsistent minor provenance rather than risk a downgrade.

Existing URLs and proposed one-time migration

No existing published snapshot is migrated or deleted by this PR. Existing patch directories and their selector entries remain available.

docs/developer-guides/documentation-publishing.md proposes a separate, approval-gated migration: inventory and back up gh-pages; seed missing minor paths from each minor's highest stable patch; align latest; then optionally remove legacy patch entries only from versions.json, preserving every old patch directory byte-for-byte. Preview and verify old deep links before publishing the migration.

Merging this PR does not backfill minor versions. Historical tags retain their original workflows; maintenance branches must receive these publishing changes before tagging future releases.

Validation

  • 19 documentation tests passed, including real mike deployments against a disposable local Git remote.
  • Covered numeric ordering, skipped old patches, equal-version redeployment policy, maintenance releases, prerelease/dev isolation, invalid inputs, full-version installation/CRD stamping, and unchanged legacy snapshot trees.
  • actionlint passed for both documentation workflows.
  • Fully stamped MkDocs build, local entrypoint checks, live released-documentation checks, and git diff --check passed.

Created in a separate worktree from upstream/main; the supported-releases worktree and #516 are untouched. No production documentation deployment or one-time migration was performed.

Keep full release versions in installation commands and preserve existing patch snapshots. Guard minor updates and latest against out-of-order releases, isolate prereleases, and document an approval-gated migration.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: bb97eb45-118e-4327-8add-3ec0527b9089
Signed-off-by: Wenting Wu <wentingwu@microsoft.com>
@documentdb-triage-tool documentdb-triage-tool Bot added CI/CD documentation Improvements or additions to documentation labels Nov 18, 2026
@documentdb-triage-tool

Copy link
Copy Markdown

🤖 Auto-triaged by documentdb-triage-tool.

Applied: CI/CD, documentation
Project fields suggested: Component ci · Priority P2 · Effort L · Status In Progress
Confidence: 0.95 (deterministic)

Reasoning

component from path globs (ci, docs); effort from diff stats (492+76 LOC, 6 files)

If a label is wrong, ping @patty-chow so the rules can be tuned. Issues with component labels are left alone; PR component labels are reconciled from changed paths on every run.

@WentingWu666666
WentingWu666666 marked this pull request as ready for review November 23, 2026 20:17
Copilot AI balanced review requested due to automatic review settings November 23, 2026 20:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block approval of the minor-version documentation publishing changes.

No open issues 🎉

What changed in this PR

This PR changes stable documentation publishing from patch-specific snapshots to shared major.minor paths, while retaining full release versions in installation commands and CRD URLs.

Changes:

  • Adds a deployment helper that records release provenance, prevents older patches from overwriting newer docs, and keeps latest from moving backward.
  • Integrates the helper into documentation workflows and adds deployment-policy and local mike integration tests.
  • Documents the publishing policy and a separately approved migration plan; existing patch snapshots remain unchanged.
File Description
mkdocs.yml Updates comments to describe minor-version publishing.
docs/​developer-guides/​documentation-publishing.md Documents publishing rules and the proposed migration.
.github/​workflows/​test-docs.yml Triggers helper tests when deployment scripts change.
.github/​workflows/​deploy_docs.yml Uses the helper for version stamping and release publishing.
.github/​scripts/​deploy_docs.py Implements version validation, ordering guards, provenance, and publishing.
.github/​scripts/​deploy_docs_test.py Tests deployment policy, full-version stamping, aliases, and legacy snapshot preservation.

Review effort: Balanced

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants