Skip to content

dev: Propose automating the monthly docs version bump - #2012

Draft
marcleblanc2 wants to merge 1 commit into
mainfrom
marc/dev/versioning-automation
Draft

marcleblanc2 wants to merge 1 commit into
mainfrom
marc/dev/versioning-automation

Conversation

@marcleblanc2

@marcleblanc2 marcleblanc2 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor
  • Amp generated, I haven't read through this yet

Summary

Proposal to automate the monthly "Update docs latest version to X.Y" work, written up in dev/versioning-proposal.md. No behaviour change in this PR; it is a draft for discussion.

Today each minor takes five hand steps across four systems (infrastructure DNS PR behind an Entitle grant, cut and push a legacy branch, set its metadata, bump three files in this repo, map the domain in the Vercel dashboard). The three files here carry the same fact three times, the cut commit has in practice been the parent of the bump commit, and the release registry already knows which minors exist.

Proposed, in shippable order:

  1. One DOCS_VERSIONS list in docs.config.js; src/data/versions.ts and docs/legacy.mdx derive from it. A frozen branch then needs no metadata commit.
  2. A push to main workflow archives the previous version: push HEAD^ to docs-legacy-versions as vP_Q, map P.Q.sourcegraph.com through the Vercel API, verify, report to #alerts-vercel-doc-site.
  3. A daily workflow opens the bump PR when the release registry's latest minor differs from DOCS_VERSIONS[0].
  4. Pre-provision a whole major in dns/sourcegraph.vercel.tf once, instead of one minor per month.

Net: monthly work becomes reading and merging one bot-opened PR; the Notion runbook and the publishing-docs-versions skill shrink accordingly.

The list stays in the repo rather than being fetched at build time because /v1/releases/sourcegraph caps at the newest 50 releases with no paging (checked limit, page, offset), so it would lose old minors over time, and a frozen host has to pin its own version anyway.

Open questions are at the bottom of the doc: selector scope (current and previous major vs today's 14 entries), whether "parent of the bump commit" is an acceptable default cut rule, and who owns the two new secrets.

Test plan

  • Prose only. prettier --check, markdownlint-cli2 and cspell clean on both files.
  • Facts checked against git log in this repo, the v7_7 branch in docs-legacy-versions, dns/sourcegraph.vercel.tf in infrastructure, the release registry API, and https://7.7.sourcegraph.com/api/versions.

One DOCS_VERSIONS list in docs.config.js written by a scheduled workflow
from the release registry; a push-to-main workflow cuts the legacy branch
and maps the Vercel domain; DNS pre-provisioned one major at a time.

Amp-Thread-ID: https://ampcode.com/threads/T-01a0b2f1-85f6-717a-85a8-42fa0054fc68
Co-authored-by: Amp <amp@ampcode.com>
@vercel

vercel Bot commented Sep 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sourcegraph-docs Ready Ready Preview Sep 18, 2026 5:27am UTC

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

registry knows which minors exist, Terraform knows which hosts exist, and
the legacy repo knows which snapshots exist.

The cut commit is not really a judgment call either: `v7_7` was branched

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.

In this case, I think we picked the wrong commit. If we see 7.7.sourcegraph.com we see ABC now as GA where we should have probably picked f0addc6 where we still callout ABC as beta

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.

fixed that ^ btw

2 maps it. The `versioned-docs-robots` Cloudflare worker reads the same
list, so the robots rule is covered too. This turns an Entitle grant plus PR
every month into one per year; a bot with standing write access to
`infrastructure` is the alternative and probably not worth the access.

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.

I guess its not the end of the world if there's a unclaimed CNAME? Maybe Sec team has an opinion

and loses a minor every few patch releases. A frozen host also has to pin
its own version, which the registry cannot tell it.

### 2. Archive the previous version on merge (docs repo, two secrets)

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.

See above but I think this is the biggest part of this. We don't really have a "develop" or "next" branch we consistently use for content that is coming up for the next version.

This means if we merge some cool new feature for 8.1 before the release actually happened, we'll now have that in the "old" 8.0.sourcegraph.com.

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