Skip to content

Commit 1b51afa

Browse files
authored
Serve v1.0-0 on the stable channel again (#269)
The stable channel goes back to 1.0: DOCUMENTDB_VERSION returns to v1.0-0, and the deploy drift check fails unless FALLBACK_RELEASES.stable names that release. Reverts #265 (8fae8b1). Signed-off-by: Guanzhou Song <26541184+GuanzhouSong@users.noreply.github.com> Co-authored-by: Guanzhou Song <26541184+GuanzhouSong@users.noreply.github.com>
1 parent 4a83a07 commit 1b51afa

7 files changed

Lines changed: 39 additions & 41 deletions

File tree

‎.github/workflows/continuous-integration.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ jobs:
9696
run: |
9797
sudo apt-get update
9898
sudo apt-get install -y createrepo-c dpkg-dev rpm python3
99-
- name: Generate stable from v1.2-0 and latest from the newest release
99+
- name: Generate stable from v1.0-0 and latest from the newest release
100100
env:
101-
DOCUMENTDB_VERSION: v1.2-0
101+
DOCUMENTDB_VERSION: v1.0-0
102102
GH_TOKEN: ${{ github.token }}
103103
run: |
104104
set -euo pipefail

‎PACKAGE-INSTALL.md‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Repository-backed installation commands for DocumentDB.
44

5-
> The `latest` and `stable` channels both serve v1.2-0; see [Release channels](#release-channels).
5+
> The `latest` channel serves v1.2-0 and `stable` serves v1.0-0; see [Release channels](#release-channels).
66
77
## Clean-host installer
88

@@ -17,7 +17,7 @@ This installs v1.2-0 from the `latest` channel on PostgreSQL 18; add `--pg-major
1717
The host keeps that channel, so `apt upgrade` and `dnf upgrade` follow `latest` to new releases.
1818
To choose another release, add one option:
1919

20-
- `--stable`: the `stable` channel (v1.2-0), with the same repository definition the 1.0
20+
- `--stable`: the `stable` channel (v1.0-0), with the same repository definition the 1.0
2121
installer wrote.
2222
- `--version 1.0.0`: exactly that release (1.0.0 or later; `1.2` means `1.2.0`), downloaded from
2323
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`.
4141
| Channel | Release | APT source | DNF `baseurl` |
4242
|---|---|---|---|
4343
| `latest` | v1.2-0 | `https://documentdb.io/deb latest ubuntu24` | `https://documentdb.io/rpm/latest/rhel9` |
44-
| `stable` | v1.2-0 | `https://documentdb.io/deb stable ubuntu24` | `https://documentdb.io/rpm/rhel9` |
44+
| `stable` | v1.0-0 | `https://documentdb.io/deb stable ubuntu24` | `https://documentdb.io/rpm/rhel9` |
4545

4646
`stable` takes new releases later than `latest`. Release metadata is at
4747
`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.
106106
This is the recommended path. It installs the whole stack and brings up a working
107107
wire-protocol endpoint.
108108

109-
These commands use the `latest` channel. For `stable` (v1.2-0), write `stable` in place of
109+
These commands use the `latest` channel. For `stable` (v1.0-0), write `stable` in place of
110110
`latest` in the DocumentDB APT line, or use `baseurl=https://documentdb.io/rpm/rhel9` on EL9.
111111

112112
> 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
399399

400400
## Upgrading an existing install
401401

402-
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
403-
soon as it is published, [switch it to `latest`](#switch-from-stable-to-latest). Move the entire stack
402+
Package installs from v0.116 or v0.117 upgrade in place to 1.0 from the `stable` channel; to
403+
take a 1.0.0 install to 1.2, [switch it to `latest`](#switch-from-stable-to-latest). Move the entire stack
404404
together; upgrading only `postgresql-N-documentdb` does not update the gateway, tools, common
405405
payload, or `documentdb-N`. These steps use systemd; upgrading a host without it isn't covered here.
406406
On a package-managed private PostgreSQL 18 instance:
@@ -486,10 +486,10 @@ SELECT extname, extversion FROM pg_extension WHERE extname LIKE 'documentdb%';
486486

487487
## Switch from `stable` to `latest`
488488

489-
Both channels serve 1.2, and `stable` takes new releases later than `latest`. To have a host
490-
take each new release as soon as it is published, point its one repository file at `latest` and
491-
upgrade the packages. This is one-way: a release does not run correctly on data that a newer
492-
release has updated, so back up the data directory first.
489+
`stable` still serves 1.0.0 and takes new releases later than `latest`, which serves 1.2. To move a
490+
1.0.0 install to 1.2 now, point its one repository file at `latest` and upgrade the packages.
491+
This is one-way: 1.0 does not run correctly on data that 1.2 has updated, so back up the data
492+
directory first.
493493

494494
```bash
495495
# Debian / Ubuntu

‎app/lib/releaseInfo.ts‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ export const FALLBACK_RELEASES: Record<ReleaseChannel, ReleaseInfo> = {
5454
assetNames: [],
5555
},
5656
stable: {
57-
tagName: "v1.2-0",
58-
aptVersion: "1.2-0",
59-
rpmVersion: "1.2.0-1.el9",
60-
metaVersion: "1.2.0",
61-
metaRpmVersion: "1.2.0-1",
62-
releaseUrl: "https://github.com/documentdb/documentdb/releases/tag/v1.2-0",
57+
tagName: "v1.0-0",
58+
aptVersion: "1.0-0",
59+
rpmVersion: "1.0.0-1.el9",
60+
metaVersion: "1.0.0",
61+
metaRpmVersion: "1.0.0-1",
62+
releaseUrl: "https://github.com/documentdb/documentdb/releases/tag/v1.0-0",
6363
assetNames: [],
6464
},
6565
};

‎app/services/articleService.ts‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,14 @@ sudo sh documentdb-install.sh
217217
218218
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:
219219
220-
- \`--stable\`: the \`stable\` channel, which serves v1.2-0 and takes new releases later than \`latest\`.
220+
- \`--stable\`: the \`stable\` channel, which serves v1.0-0 and takes new releases later than \`latest\`.
221221
- \`--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.
222222
223223
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).
224224
225225
## Install
226226
227-
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.
227+
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.
228228
229229
### Ubuntu 24.04, PostgreSQL 18 (APT)
230230
@@ -447,8 +447,8 @@ For an adopted instance, use the operator's existing PostgreSQL connection inste
447447
448448
## Upgrading
449449
450-
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
451-
soon as it is published, [switch it to \`latest\`](#switch-from-stable-to-latest). Move the entire stack
450+
Package installs from v0.116 or v0.117 upgrade in place to 1.0 from the \`stable\` channel; to
451+
take a 1.0.0 install to 1.2, [switch it to \`latest\`](#switch-from-stable-to-latest). Move the entire stack
452452
together; upgrading only \`postgresql-N-documentdb\` does not update the gateway, tools,
453453
common payload, or \`documentdb-N\`. These steps use systemd; upgrading a host without it isn't covered here.
454454
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
530530
531531
## Switch from \`stable\` to \`latest\`
532532
533-
Both channels serve 1.2, and \`stable\` takes new releases later than \`latest\`. To have a host
534-
take each new release as soon as it is published, point its one repository file at \`latest\` and
535-
upgrade the packages. This is one-way: a release does not run correctly on data that a newer
536-
release has updated, so back up the data directory first.
533+
\`stable\` still serves 1.0.0 and takes new releases later than \`latest\`, which serves 1.2. To move a
534+
1.0.0 install to 1.2 now, point its one repository file at \`latest\` and upgrade the packages.
535+
This is one-way: 1.0 does not run correctly on data that 1.2 has updated, so back up the data
536+
directory first.
537537
538538
\`\`\`bash
539539
# Debian / Ubuntu

‎tests/packageArticles.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ describe('release channels', () => {
698698
linuxPackagesOperationsContent.indexOf('## Upgrading'),
699699
);
700700
const text = operations!.replace(/\s+/g, ' ');
701-
expect(text).toContain('This is one-way: a release does not run correctly on data that a newer release has updated');
701+
expect(text).toContain('This is one-way: 1.0 does not run correctly on data that 1.2 has updated');
702702
expect(operations).toContain('```bash\nsudo documentdb-setup --pg-version 18 --yes\n```');
703703
expect(operations).not.toMatch(/documentdb-setup[^\n]*--admin-user/);
704704
expect(operations).toContain('sudo apt upgrade');

‎tests/packageInstall.test.ts‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ describe('package metadata', () => {
7979
});
8080

8181
describe('release metadata', () => {
82-
it('uses v1.2-0 for latest and stable before the feeds load', () => {
82+
it('uses v1.2-0 for latest and v1.0-0 for stable before the feeds load', () => {
8383
expect(FALLBACK_RELEASES.latest).toMatchObject({
8484
tagName: 'v1.2-0',
8585
aptVersion: '1.2-0',
@@ -89,12 +89,12 @@ describe('release metadata', () => {
8989
releaseUrl: 'https://github.com/documentdb/documentdb/releases/tag/v1.2-0',
9090
});
9191
expect(FALLBACK_RELEASES.stable).toMatchObject({
92-
tagName: 'v1.2-0',
93-
aptVersion: '1.2-0',
94-
rpmVersion: '1.2.0-1.el9',
95-
metaVersion: '1.2.0',
96-
metaRpmVersion: '1.2.0-1',
97-
releaseUrl: 'https://github.com/documentdb/documentdb/releases/tag/v1.2-0',
92+
tagName: 'v1.0-0',
93+
aptVersion: '1.0-0',
94+
rpmVersion: '1.0.0-1.el9',
95+
metaVersion: '1.0.0',
96+
metaRpmVersion: '1.0.0-1',
97+
releaseUrl: 'https://github.com/documentdb/documentdb/releases/tag/v1.0-0',
9898
});
9999
});
100100

‎tests/releaseDrift.test.ts‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe('release drift check', () => {
4646
it('passes when each fallback names the release its channel mirrors', () => {
4747
const { status, output } = checkDrift({ latest, stable });
4848
expect(output).toContain('The latest fallback matches the mirrored release (v1.2-0).');
49-
expect(output).toContain('The stable fallback matches the mirrored release (v1.2-0).');
49+
expect(output).toContain('The stable fallback matches the mirrored release (v1.0-0).');
5050
expect(status).toBe(0);
5151
});
5252

@@ -62,12 +62,10 @@ describe('release drift check', () => {
6262
expect(status).toBe(1);
6363
});
6464

65-
it('fails when stable still mirrors 1.0 but its fallback names 1.2', () => {
66-
const previous = feed({ tagName: 'v1.0-0', aptVersion: '1.0-0', rpmVersion: '1.0.0-1.el9', metaVersion: '1.0.0' });
67-
const { status, output } = checkDrift({ latest, stable: previous });
65+
it('fails when stable moves to 1.2 but its fallback still names 1.0', () => {
66+
const { status, output } = checkDrift({ latest, stable: latest });
6867
expect(output).toContain("the site's stable fallback release does not match");
69-
expect(output).toContain('release-info.json): v1.0-0');
70-
expect(output).toContain('FALLBACK_RELEASES.stable): v1.2-0');
68+
expect(output).toContain('FALLBACK_RELEASES.stable): v1.0-0');
7169
expect(output).not.toContain("the site's latest fallback release does not match");
7270
expect(status).toBe(1);
7371
});
@@ -76,7 +74,7 @@ describe('release drift check', () => {
7674
const next = feed({ tagName: 'v1.3-0', aptVersion: '1.3-0', rpmVersion: '1.3.0-1.el9', metaVersion: '1.3.0' });
7775
const { status, output } = checkDrift({ latest: next, stable });
7876
expect(output).toContain("the site's latest fallback release does not match");
79-
expect(output).toContain('The stable fallback matches the mirrored release (v1.2-0).');
77+
expect(output).toContain('The stable fallback matches the mirrored release (v1.0-0).');
8078
expect(status).toBe(1);
8179
});
8280

0 commit comments

Comments
 (0)