diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 4cfcad4..41b86e8 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -96,9 +96,9 @@ jobs: run: | sudo apt-get update sudo apt-get install -y createrepo-c dpkg-dev rpm python3 - - name: Generate stable from v1.2-0 and latest from the newest release + - name: Generate stable from v1.0-0 and latest from the newest release env: - DOCUMENTDB_VERSION: v1.2-0 + DOCUMENTDB_VERSION: v1.0-0 GH_TOKEN: ${{ github.token }} run: | set -euo pipefail diff --git a/PACKAGE-INSTALL.md b/PACKAGE-INSTALL.md index 44430ea..c39cf95 100644 --- a/PACKAGE-INSTALL.md +++ b/PACKAGE-INSTALL.md @@ -2,7 +2,7 @@ Repository-backed installation commands for DocumentDB. -> The `latest` and `stable` channels both serve v1.2-0; see [Release channels](#release-channels). +> The `latest` channel serves v1.2-0 and `stable` serves v1.0-0; see [Release channels](#release-channels). ## Clean-host installer @@ -17,7 +17,7 @@ This installs v1.2-0 from the `latest` channel on PostgreSQL 18; add `--pg-major The host keeps that channel, so `apt upgrade` and `dnf upgrade` follow `latest` to new releases. To choose another release, add one option: -- `--stable`: the `stable` channel (v1.2-0), with the same repository definition the 1.0 +- `--stable`: the `stable` channel (v1.0-0), with the same repository definition the 1.0 installer wrote. - `--version 1.0.0`: exactly that release (1.0.0 or later; `1.2` means `1.2.0`), downloaded from its GitHub release and checked against its `SHA256SUMS`. No DocumentDB repository is @@ -41,7 +41,7 @@ release's packages. The commands on this page use `latest`. | Channel | Release | APT source | DNF `baseurl` | |---|---|---|---| | `latest` | v1.2-0 | `https://documentdb.io/deb latest ubuntu24` | `https://documentdb.io/rpm/latest/rhel9` | -| `stable` | v1.2-0 | `https://documentdb.io/deb stable ubuntu24` | `https://documentdb.io/rpm/rhel9` | +| `stable` | v1.0-0 | `https://documentdb.io/deb stable ubuntu24` | `https://documentdb.io/rpm/rhel9` | `stable` takes new releases later than `latest`. Release metadata is at `https://documentdb.io/packages/release-info-latest.json` for `latest` and @@ -106,7 +106,7 @@ these paths is part of the current hosted support matrix. This is the recommended path. It installs the whole stack and brings up a working wire-protocol endpoint. -These commands use the `latest` channel. For `stable` (v1.2-0), write `stable` in place of +These commands use the `latest` channel. For `stable` (v1.0-0), write `stable` in place of `latest` in the DocumentDB APT line, or use `baseurl=https://documentdb.io/rpm/rhel9` on EL9. > These commands assume a regular Linux host where you use `sudo`. In a clean container that @@ -399,8 +399,8 @@ The current release publishes PostgreSQL 17 and 18. Install `documentdb-17` or ## Upgrading an existing install -Package installs from v0.116, v0.117 or 1.0 upgrade in place to 1.2 on either channel; to take each new release as -soon as it is published, [switch it to `latest`](#switch-from-stable-to-latest). Move the entire stack +Package installs from v0.116 or v0.117 upgrade in place to 1.0 from the `stable` channel; to +take a 1.0.0 install to 1.2, [switch it to `latest`](#switch-from-stable-to-latest). Move the entire stack together; upgrading only `postgresql-N-documentdb` does not update the gateway, tools, common payload, or `documentdb-N`. These steps use systemd; upgrading a host without it isn't covered here. On a package-managed private PostgreSQL 18 instance: @@ -486,10 +486,10 @@ SELECT extname, extversion FROM pg_extension WHERE extname LIKE 'documentdb%'; ## Switch from `stable` to `latest` -Both channels serve 1.2, and `stable` takes new releases later than `latest`. To have a host -take each new release as soon as it is published, point its one repository file at `latest` and -upgrade the packages. This is one-way: a release does not run correctly on data that a newer -release has updated, so back up the data directory first. +`stable` still serves 1.0.0 and takes new releases later than `latest`, which serves 1.2. To move a +1.0.0 install to 1.2 now, point its one repository file at `latest` and upgrade the packages. +This is one-way: 1.0 does not run correctly on data that 1.2 has updated, so back up the data +directory first. ```bash # Debian / Ubuntu diff --git a/app/lib/releaseInfo.ts b/app/lib/releaseInfo.ts index 7902a06..b1daa37 100644 --- a/app/lib/releaseInfo.ts +++ b/app/lib/releaseInfo.ts @@ -54,12 +54,12 @@ export const FALLBACK_RELEASES: Record = { assetNames: [], }, stable: { - tagName: "v1.2-0", - aptVersion: "1.2-0", - rpmVersion: "1.2.0-1.el9", - metaVersion: "1.2.0", - metaRpmVersion: "1.2.0-1", - releaseUrl: "https://github.com/documentdb/documentdb/releases/tag/v1.2-0", + tagName: "v1.0-0", + aptVersion: "1.0-0", + rpmVersion: "1.0.0-1.el9", + metaVersion: "1.0.0", + metaRpmVersion: "1.0.0-1", + releaseUrl: "https://github.com/documentdb/documentdb/releases/tag/v1.0-0", assetNames: [], }, }; diff --git a/app/services/articleService.ts b/app/services/articleService.ts index ede82ea..64afa24 100644 --- a/app/services/articleService.ts +++ b/app/services/articleService.ts @@ -217,14 +217,14 @@ sudo sh documentdb-install.sh This installs the current release (v1.2-0) from the \`latest\` channel of the package repository, on PostgreSQL 18; add \`--pg-major 17\` for 17. The host keeps that channel, so \`apt upgrade\` and \`dnf upgrade\` follow \`latest\` to new releases. To choose another release, add one option: -- \`--stable\`: the \`stable\` channel, which serves v1.2-0 and takes new releases later than \`latest\`. +- \`--stable\`: the \`stable\` channel, which serves v1.0-0 and takes new releases later than \`latest\`. - \`--version 1.0.0\`: exactly that release (1.0.0 or later), downloaded from its GitHub release. No DocumentDB repository is configured, so the package manager never upgrades it. The installer only sets up new installs: on a host where DocumentDB is already installed it changes no packages. To move an existing install to a newer release, follow [Upgrading](/docs/linux-packages#upgrading). ## Install -These commands use the \`latest\` channel. For \`stable\` (v1.2-0), write \`stable\` in place of \`latest\` in the DocumentDB APT line, or use \`baseurl=https://documentdb.io/rpm/rhel9\` on EL9. +These commands use the \`latest\` channel. For \`stable\` (v1.0-0), write \`stable\` in place of \`latest\` in the DocumentDB APT line, or use \`baseurl=https://documentdb.io/rpm/rhel9\` on EL9. ### Ubuntu 24.04, PostgreSQL 18 (APT) @@ -447,8 +447,8 @@ For an adopted instance, use the operator's existing PostgreSQL connection inste ## Upgrading -Package installs from v0.116, v0.117 or 1.0 upgrade in place to 1.2 on either channel; to take each new release as -soon as it is published, [switch it to \`latest\`](#switch-from-stable-to-latest). Move the entire stack +Package installs from v0.116 or v0.117 upgrade in place to 1.0 from the \`stable\` channel; to +take a 1.0.0 install to 1.2, [switch it to \`latest\`](#switch-from-stable-to-latest). Move the entire stack together; upgrading only \`postgresql-N-documentdb\` does not update the gateway, tools, common payload, or \`documentdb-N\`. These steps use systemd; upgrading a host without it isn't covered here. On a package-managed private PostgreSQL 18 instance: @@ -530,10 +530,10 @@ PostgreSQL and run it once more. By hand, use that instance's own \`psql\` conne ## Switch from \`stable\` to \`latest\` -Both channels serve 1.2, and \`stable\` takes new releases later than \`latest\`. To have a host -take each new release as soon as it is published, point its one repository file at \`latest\` and -upgrade the packages. This is one-way: a release does not run correctly on data that a newer -release has updated, so back up the data directory first. +\`stable\` still serves 1.0.0 and takes new releases later than \`latest\`, which serves 1.2. To move a +1.0.0 install to 1.2 now, point its one repository file at \`latest\` and upgrade the packages. +This is one-way: 1.0 does not run correctly on data that 1.2 has updated, so back up the data +directory first. \`\`\`bash # Debian / Ubuntu diff --git a/tests/packageArticles.test.ts b/tests/packageArticles.test.ts index 0f7ad12..bb3aa27 100644 --- a/tests/packageArticles.test.ts +++ b/tests/packageArticles.test.ts @@ -698,7 +698,7 @@ describe('release channels', () => { linuxPackagesOperationsContent.indexOf('## Upgrading'), ); const text = operations!.replace(/\s+/g, ' '); - expect(text).toContain('This is one-way: a release does not run correctly on data that a newer release has updated'); + expect(text).toContain('This is one-way: 1.0 does not run correctly on data that 1.2 has updated'); expect(operations).toContain('```bash\nsudo documentdb-setup --pg-version 18 --yes\n```'); expect(operations).not.toMatch(/documentdb-setup[^\n]*--admin-user/); expect(operations).toContain('sudo apt upgrade'); diff --git a/tests/packageInstall.test.ts b/tests/packageInstall.test.ts index f63a3ba..1254567 100644 --- a/tests/packageInstall.test.ts +++ b/tests/packageInstall.test.ts @@ -79,7 +79,7 @@ describe('package metadata', () => { }); describe('release metadata', () => { - it('uses v1.2-0 for latest and stable before the feeds load', () => { + it('uses v1.2-0 for latest and v1.0-0 for stable before the feeds load', () => { expect(FALLBACK_RELEASES.latest).toMatchObject({ tagName: 'v1.2-0', aptVersion: '1.2-0', @@ -89,12 +89,12 @@ describe('release metadata', () => { releaseUrl: 'https://github.com/documentdb/documentdb/releases/tag/v1.2-0', }); expect(FALLBACK_RELEASES.stable).toMatchObject({ - tagName: 'v1.2-0', - aptVersion: '1.2-0', - rpmVersion: '1.2.0-1.el9', - metaVersion: '1.2.0', - metaRpmVersion: '1.2.0-1', - releaseUrl: 'https://github.com/documentdb/documentdb/releases/tag/v1.2-0', + tagName: 'v1.0-0', + aptVersion: '1.0-0', + rpmVersion: '1.0.0-1.el9', + metaVersion: '1.0.0', + metaRpmVersion: '1.0.0-1', + releaseUrl: 'https://github.com/documentdb/documentdb/releases/tag/v1.0-0', }); }); diff --git a/tests/releaseDrift.test.ts b/tests/releaseDrift.test.ts index d493271..e977322 100644 --- a/tests/releaseDrift.test.ts +++ b/tests/releaseDrift.test.ts @@ -46,7 +46,7 @@ describe('release drift check', () => { it('passes when each fallback names the release its channel mirrors', () => { const { status, output } = checkDrift({ latest, stable }); expect(output).toContain('The latest fallback matches the mirrored release (v1.2-0).'); - expect(output).toContain('The stable fallback matches the mirrored release (v1.2-0).'); + expect(output).toContain('The stable fallback matches the mirrored release (v1.0-0).'); expect(status).toBe(0); }); @@ -62,12 +62,10 @@ describe('release drift check', () => { expect(status).toBe(1); }); - it('fails when stable still mirrors 1.0 but its fallback names 1.2', () => { - const previous = feed({ tagName: 'v1.0-0', aptVersion: '1.0-0', rpmVersion: '1.0.0-1.el9', metaVersion: '1.0.0' }); - const { status, output } = checkDrift({ latest, stable: previous }); + it('fails when stable moves to 1.2 but its fallback still names 1.0', () => { + const { status, output } = checkDrift({ latest, stable: latest }); expect(output).toContain("the site's stable fallback release does not match"); - expect(output).toContain('release-info.json): v1.0-0'); - expect(output).toContain('FALLBACK_RELEASES.stable): v1.2-0'); + expect(output).toContain('FALLBACK_RELEASES.stable): v1.0-0'); expect(output).not.toContain("the site's latest fallback release does not match"); expect(status).toBe(1); }); @@ -76,7 +74,7 @@ describe('release drift check', () => { const next = feed({ tagName: 'v1.3-0', aptVersion: '1.3-0', rpmVersion: '1.3.0-1.el9', metaVersion: '1.3.0' }); const { status, output } = checkDrift({ latest: next, stable }); expect(output).toContain("the site's latest fallback release does not match"); - expect(output).toContain('The stable fallback matches the mirrored release (v1.2-0).'); + expect(output).toContain('The stable fallback matches the mirrored release (v1.0-0).'); expect(status).toBe(1); });