Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions PACKAGE-INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions app/lib/releaseInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ export const FALLBACK_RELEASES: Record<ReleaseChannel, ReleaseInfo> = {
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: [],
},
};
Expand Down
16 changes: 8 additions & 8 deletions app/services/articleService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/packageArticles.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
14 changes: 7 additions & 7 deletions tests/packageInstall.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
});
});

Expand Down
12 changes: 5 additions & 7 deletions tests/releaseDrift.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});

Expand All @@ -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);
});
Expand All @@ -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);
});

Expand Down