When the SDK ships a new major (e.g. flyte v3), the docs get a new primary line and
the current primary (v2) becomes a secondary line, exactly like v1 is today. For
how the system works overall, see VERSIONING.md.
The framework is line-generic, so this is additive — new branch + config + one edge
rule, no redesign. Concretely, moving from {v2 primary, v1 secondary} to
{v3 primary, v2 secondary, v1 secondary}:
| Line | Branch | Role | Serves |
|---|---|---|---|
| v3 | main |
primary | /docs/latest + /docs/v3 + /docs/v3.x.y.z |
| v2 | v2 (new) |
secondary | /docs/v2 + /docs/v2.x.y.z |
| v1 | v1 |
secondary | /docs/v1 + /docs/v1.x.y.z |
-
Fork the
v2branch offmainat the cutover commit — this freezes the last v2 content into its own branch:git branch v2 <last-v2-main-commit> git push origin v2
-
Configure the new
v2branch as a secondary line (mirrorv1). Onv2:versions.toml: setlatest = false;stable = "v2.x.y.z"(the last v2 cut);enumerated= the v2 pins you want to keep serving.api-packages.toml [docs_version]: pin the SDK to the v2 series (sdk_package = "flyte", seriesv2.), passenger/backend to their v2 values.- CI: the
v2branch inheritsmain's workflows, butmain's are the primary shape. Alignv2's to the secondary shape used byv1:build-and-deploy.yml: trigger onpush: [v2](notmain); production-only (nopull_request).build-pr.yml+deploy-pr-preview.yml: present (the PR-preview split).regen-api-docs.yml:--ref v2-triggered (manual);base: v2, its own PR branch name, and the v2 SDK PyPI link. (This is the same CI-sync we did forv1— see git history / DOC-1245.)
-
Make
mainthe new primary (v3). Onmain:- Regenerate the API reference against flyte 3.x.
api-packages.toml [docs_version]: seriesv3..versions.toml:latest = true(default);stable = "v3.x.y.z"(the first v3 cut).
-
Hand
/docs/latestto the new primary. There is no cross-line registry file to edit:served-versions.tomlwas deleted (DOC-1330) andrun_hugo.shnow derives the registry by reading every line's ownversions.toml, this line's from the working tree and the others' fromorigin. So the only edits are:- on
main:versions.tomlgetslatest = true(the default) andstable = "v3.x.y.z"; - on the new
v2branch:versions.tomlgetslatest = false.
The selector's line order and latest-ownership are derived from those files, so no
run_hugo.shchange is needed. The line name itself comes from thestabletag's prefix, so there is no separate field to keep in sync.Note that the derivation reads the other lines from
origin, so the new branch must be pushed before a build on another branch can see it in the selector. - on
-
Edge routing (eng / Terraform — the one non-repo step). Today
/docs/v2is served bymain's deployment. Oncemainis v3, add a CloudFront behavior so:/docs/v2*→ the new v2 deployment./docs/v3*and/docs/latest→main's deployment (they followmainautomatically;/docs/*already routes there)./docs/v1*→ the v1 deployment (unchanged). This is the only piece that cannot be pre-staged (the v2 deployment doesn't exist until step 1). Update the/docs/stableredirect if you want it to keep pointing at the primary (→ /docs/v3).
-
Verify on the live site (and a preview first):
/docs/v3= v3 stable (indexed);/docs/latest= v3maintip (noindex)./docs/v2= v2 stable, now served from the new v2 deployment./docs/v1unchanged.- The selector shows v3 / v2 / v1, with
LATEST+STABLEbadges on v3 and bare numbers on v2/v1. Cross-line nav works in every direction. - Footers stamp the right components per line.
- Index policy. Decide whether the now-secondary v2 stays indexed or goes
noindexto concentrate search on v3 (same lever as DOC-1291 for v1). - File budgets. Each line is its own Cloudflare Pages deployment (own 20k budget), so three lines don't compete on the ceiling.
- No framework changes. The version scheme, cut/regen/fold, inline-tag machinery, and
selector/footer are all line-generic. The only code touched is config (each branch's
versions.toml+api-packages.toml) plus the branch's CI shape and the one CloudFront behavior. - Retiring the oldest line. If you ever stop serving
v1, remove its CloudFront behavior and archive the branch. Once the branch is gone the selector stops listing the line by itself, because the registry is derived from the branches that exist. The tags remain in git.