diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 829b4e7..89f18f0 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 repository from v0.116-0 + - name: Generate repository from v0.117-0 env: - DOCUMENTDB_VERSION: v0.116-0 + DOCUMENTDB_VERSION: v0.117-0 run: .github/scripts/download_packages.sh - name: Verify release inventory and metadata run: python3 .github/scripts/verify_package_inventory.py diff --git a/PACKAGE-INSTALL.md b/PACKAGE-INSTALL.md index bacec44..5d99a40 100644 --- a/PACKAGE-INSTALL.md +++ b/PACKAGE-INSTALL.md @@ -141,6 +141,10 @@ The explicit major and fresh-instance flags prevent another installed PostgreSQL existing system cluster from being selected accidentally. To adopt an existing PostgreSQL instance instead, use [Adopt an existing PostgreSQL instance](#adopt-an-existing-postgresql-instance). +Sample data is opt-in. Add `--load-sample-data` to the setup command to seed the `StoreData` +database with 41,505 documents in `stores` and 2 documents in `ratings`. This requires +`mongosh`; the command above leaves the new instance empty. + `mongosh` is not shipped by these packages. Install it from the [official instructions](https://www.mongodb.com/docs/mongodb-shell/install/), then: @@ -200,7 +204,7 @@ Before using this anywhere but a private machine: ```bash sudo documentdb-setup --status # gateway listener, service states, resolved paths -documentdb-gateway --version # DocumentDB version (0.116.0) +documentdb-gateway --version # DocumentDB version (0.117.0) dpkg -l | grep documentdb # or: rpm -qa | grep documentdb ``` @@ -288,7 +292,7 @@ On a systemd host, a scoped restore stops and disables that major's gateway: sudo documentdb-setup --restore --pg-version 18 ``` -On a host without systemd, v0.116 cannot safely attribute a nohup gateway process to one +On a host without systemd, the current setup tooling cannot safely attribute a nohup gateway process to one PostgreSQL major. If only one DocumentDB major is configured, use an unscoped restore so the orphan gateway sweep runs: @@ -344,8 +348,8 @@ The current release publishes PostgreSQL 17 and 18. Install `documentdb-17` or ## Upgrading an existing install -> **Warning:** v0.116 does not support an in-place upgrade from the extension-only package -> layout in v0.114 or earlier. Use a clean host, or remove the earlier packages and perform the +> **Warning:** In-place package upgrades from earlier releases are not supported yet. Use a +> clean host, or remove the earlier packages and perform the > current fresh installation. Upgrading only `postgresql-N-documentdb` does not install the > gateway, tools, common payload, or `documentdb-N`. @@ -429,7 +433,7 @@ three entry points: - `packaging/gateway/build_gateway_packages.sh` — wire-protocol gateway - `packaging/build_extra_packages.sh` — tools, common payload, `documentdb-N`, and meta package -The [v0.116 packaging guide](https://github.com/documentdb/documentdb/blob/v0.116-0/packaging/README.md) +The [v0.117 packaging guide](https://github.com/documentdb/documentdb/blob/v0.117-0/packaging/README.md) documents their required arguments, version formats, prerequisites, and accepted targets. PostgreSQL 15 remains extension-only for package-managed installs because the setup tools require PostgreSQL 16 or newer. @@ -444,9 +448,9 @@ they do not retain packages from older releases. Examples: ```text -ubuntu24.04-documentdb_0.116.0_all.deb -ubuntu24.04-postgresql-18-documentdb_0.116-0_amd64.deb -rhel9-postgresql18-documentdb-0.116.0-1.el9.x86_64.rpm +ubuntu24.04-documentdb_0.117.0_all.deb +ubuntu24.04-postgresql-18-documentdb_0.117-0_amd64.deb +rhel9-postgresql18-documentdb-0.117.0-1.el9.x86_64.rpm ``` Because the packages depend on each other, installing a downloaded meta package on its own diff --git a/app/lib/releaseInfo.ts b/app/lib/releaseInfo.ts index 6afc8a4..948c748 100644 --- a/app/lib/releaseInfo.ts +++ b/app/lib/releaseInfo.ts @@ -12,23 +12,23 @@ import { useEffect, useState } from "react"; // after v0.116-0 had been published and mirrored. export type ReleaseInfo = { - /** Git tag of the mirrored release, e.g. "v0.116-0". */ + /** Git tag of the mirrored release, e.g. "v0.117-0". */ tagName: string; - /** Extension package version on DEB, e.g. "0.116-0". */ + /** Extension package version on DEB, e.g. "0.117-0". */ aptVersion: string; - /** Extension package version on RPM, e.g. "0.116.0-1.el9". */ + /** Extension package version on RPM, e.g. "0.117.0-1.el9". */ rpmVersion: string; /** - * Version of every non-extension package, e.g. "0.116.0". + * Version of every non-extension package, e.g. "0.117.0". * - * The extension keeps the control-file form (`0.116-0`) while the meta, + * The extension keeps the control-file form (`0.117-0`) while the meta, * per-major, gateway, tools and common packages use the flat dotted form. * Pinning examples MUST pick the right one for the package being pinned: - * `apt install documentdb-18=0.116-0` fails with "Version '0.116-0' for - * 'documentdb-18' was not found", because that package is `0.116.0`. + * `apt install documentdb-18=0.117-0` fails with "Version '0.117-0' for + * 'documentdb-18' was not found", because that package is `0.117.0`. */ metaVersion: string; - /** RPM form of the non-extension packages, e.g. "0.116.0-1". */ + /** RPM form of the non-extension packages, e.g. "0.117.0-1". */ metaRpmVersion: string; releaseUrl: string; assetNames: readonly string[]; @@ -39,12 +39,12 @@ export type ReleaseInfo = { // placeholder. Keep it in step with the newest release; the drift check in CI // fails the build when it falls behind release-info.json. export const FALLBACK_RELEASE: ReleaseInfo = { - tagName: "v0.116-0", - aptVersion: "0.116-0", - rpmVersion: "0.116.0-1.el9", - metaVersion: "0.116.0", - metaRpmVersion: "0.116.0-1", - releaseUrl: "https://github.com/documentdb/documentdb/releases/tag/v0.116-0", + tagName: "v0.117-0", + aptVersion: "0.117-0", + rpmVersion: "0.117.0-1.el9", + metaVersion: "0.117.0", + metaRpmVersion: "0.117.0-1", + releaseUrl: "https://github.com/documentdb/documentdb/releases/tag/v0.117-0", assetNames: [], }; @@ -96,8 +96,8 @@ export function parseReleaseInfo(payload: unknown): ReleaseInfo { ? raw.html_url : `https://github.com/documentdb/documentdb/releases/tag/${tagName}`; - // The extension keeps the control-file form (0.116-0) on DEB, while RPM - // splits it into Version/Release and renders 0.116.0-1.el9. Everything else + // The extension keeps the control-file form (0.117-0) on DEB, while RPM + // splits it into Version/Release and renders 0.117.0-1.el9. Everything else // uses the flat dotted form. Read all three off real filenames so the page // cannot claim a shape the release does not contain. const aptVersion = @@ -114,7 +114,7 @@ export function parseReleaseInfo(payload: unknown): ReleaseInfo { firstMatch(names, /^documentdb-(\d+\.\d+\.\d+)-\d+\.noarch\.rpm$/) ?? FALLBACK_RELEASE.metaVersion; - // e.g. documentdb-0.116.0-1.noarch.rpm -> 0.116.0-1 + // e.g. documentdb-0.117.0-1.noarch.rpm -> 0.117.0-1 const metaRpmVersion = firstMatch(names, /^documentdb-(\d+\.\d+\.\d+-\d+)\.noarch\.rpm$/) ?? FALLBACK_RELEASE.metaRpmVersion; diff --git a/app/packages/page.tsx b/app/packages/page.tsx index 0d40748..559b4a8 100644 --- a/app/packages/page.tsx +++ b/app/packages/page.tsx @@ -112,7 +112,7 @@ export default function PackagesPage() { const aptCommand = buildAptInstallCommand(aptTarget, aptArch, aptPgVersion); const rpmCommand = buildRpmInstallCommand(rpmTarget, rpmArch, rpmPgVersion); - // Tier-1 targets resolve the full v0.116-0 stack, so the selected package is + // Tier-1 targets resolve the current full stack, so the selected package is // the per-major stand-alone rather than the bare extension. const isFullStack = packageFamily === "apt" @@ -384,6 +384,13 @@ export default function PackagesPage() { )} label="Setup" /> +

+ Sample data is opt-in. After installing{" "} + mongosh, add{" "} + --load-sample-data to seed the{" "} + StoreData database with 41,505 stores + and 2 ratings. The command above leaves the new instance empty. +

The gateway then listens on port{" "} 10260. It binds all interfaces by diff --git a/app/services/articleService.ts b/app/services/articleService.ts index 788ea33..507aab0 100644 --- a/app/services/articleService.ts +++ b/app/services/articleService.ts @@ -60,10 +60,11 @@ docker run -dt --name documentdb \\ > \`-p 127.0.0.1:10260:10260\` keeps the endpoint on loopback. A bare \`-p 10260:10260\` > publishes it on **every** interface, which is rarely what you want on a laptop. > -> \`--init-data true\` seeds the built-in sample data into \`sampledb\`, which the +> \`--init-data true\` seeds the built-in sample data into \`StoreData\`, which the > verification step below queries. It is **not** enabled by default — without it the -> container starts with no \`sampledb\` and \`use sampledb\` returns nothing. The data is -> seeded once per data volume; re-create the volume to seed again. See +> container starts with no \`StoreData\` database and \`use StoreData\` returns nothing. The data is +> seeded once per data volume. Existing volumes are not migrated automatically; +> re-create the volume to seed again. See > [DocumentDB Local](/docs/documentdb-local) for \`--init-data-path\`, certificate setup, > and additional runtime options. @@ -96,14 +97,14 @@ mongosh localhost:10260 \\ --tlsAllowInvalidCertificates \`\`\` -Then run a quick health check. The sample data below needs \`--init-data true\` on the \`docker run\` above — without it \`sampledb\` does not exist: +Then run a quick health check. The sample data below needs \`--init-data true\` on the \`docker run\` above — without it \`StoreData\` does not exist: \`\`\`javascript db.runCommand({ ping: 1 }) -use sampledb +use StoreData -db.users.find({}, { firstName: 1, lastName: 1, email: 1, _id: 0 }).limit(3) +db.stores.find({}, { _id: 0, name: 1, city: 1, "sales.revenue": 1 }).limit(3) \`\`\` If you prefer certificate validation instead of \`--tlsAllowInvalidCertificates\`, follow the certificate steps in [DocumentDB Local](/docs/documentdb-local). @@ -113,10 +114,10 @@ If you prefer certificate validation instead of \`--tlsAllowInvalidCertificates\ The quick start command above is ideal for disposable local environments. When you need more control: - Use \`--data-path\` with a mounted host directory to keep data across container restarts -- Omit \`--init-data true\` if you want an empty instance instead of the \`sampledb\` collections +- Omit \`--init-data true\` if you want an empty instance instead of the \`StoreData\` collections - Use \`--init-data-path\` to run your own \`.js\` initialization scripts with \`mongosh\` at startup -The built-in sample dataset includes \`users\`, \`products\`, \`orders\`, and \`analytics\` collections in \`sampledb\`. +The built-in \`StoreData\` sample dataset includes 41,505 documents in \`stores\` and 2 documents in \`ratings\`. ## Stop, start, and remove @@ -168,7 +169,7 @@ Install DocumentDB from the published package repository and get a MongoDB-compa The current official release publishes the full stack — extension, gateway, setup wizard and systemd units — for **Ubuntu 24.04 and EL9, on PostgreSQL 17 or 18**. EL9 includes Rocky Linux, AlmaLinux, CentOS Stream, and registered Red Hat Enterprise Linux; the Package Finder supplies the prerequisite command for each family. Starting with v0.116, this is a deliberately smaller prebuilt matrix than earlier releases. The website repository mirrors only the current release assets and does not carry older packages forward to make other targets appear current. > [!NOTE] -> Need another distribution or PostgreSQL major? We welcome community builds. Check out the matching release tag and use the version-parameterized [packaging scripts](https://github.com/documentdb/documentdb/blob/v0.116-0/packaging/README.md). \`build_packages.sh\` builds the extension, \`gateway/build_gateway_packages.sh\` builds the gateway, and \`build_extra_packages.sh\` builds the common, tools, stand-alone, and meta packages. PostgreSQL 15 is extension-only because the setup tools require PostgreSQL 16 or newer. These builds are on demand and are not official release assets hosted by documentdb.io. +> Need another distribution or PostgreSQL major? We welcome community builds. Check out the matching release tag and use the version-parameterized [packaging scripts](https://github.com/documentdb/documentdb/blob/v0.117-0/packaging/README.md). \`build_packages.sh\` builds the extension, \`gateway/build_gateway_packages.sh\` builds the gateway, and \`build_extra_packages.sh\` builds the common, tools, stand-alone, and meta packages. PostgreSQL 15 is extension-only because the setup tools require PostgreSQL 16 or newer. These builds are on demand and are not official release assets hosted by documentdb.io. ## If you used an earlier repository target @@ -241,6 +242,8 @@ ${buildSetupCommand('18')} It creates a new private PostgreSQL 18 instance, installs the extensions, starts the gateway, and enables it at boot. It **prompts for the admin password**. The explicit major and fresh-instance flags keep another installed PostgreSQL major or an existing system cluster from being selected accidentally. +Sample data is opt-in. Add \`--load-sample-data\` to the setup command to seed the \`StoreData\` database with 41,505 documents in \`stores\` and 2 documents in \`ratings\`. This requires \`mongosh\`; the command above leaves the new instance empty. + For automation, use the complete [unattended setup](/docs/linux-packages#unattended-setup) command. To adopt an existing PostgreSQL instance instead, follow [Adopt an existing PostgreSQL instance](/docs/linux-packages#adopt-an-existing-postgre-sql-instance); brownfield setup intentionally has different lifecycle and restart requirements. Now open a shell against the endpoint: @@ -379,8 +382,8 @@ For an adopted instance, use the operator's existing PostgreSQL connection inste ## Upgrading > [!WARNING] -> v0.116 does not support an in-place upgrade from the extension-only package layout in -> v0.114 or earlier. Use a clean host, or remove the earlier packages and perform the current +> In-place package upgrades from earlier releases are not supported yet. Use a clean host, +> or remove the earlier packages and perform the current > [fresh installation](/docs/getting-started/packages). Upgrading only > \`postgresql-N-documentdb\` does not install the gateway, tools, common payload, or > \`documentdb-N\`. @@ -448,7 +451,7 @@ On a systemd host, a scoped restore stops and disables that major's gateway: sudo documentdb-setup --restore --pg-version 18 \`\`\` -On a host without systemd, v0.116 cannot safely attribute a nohup gateway process to one +On a host without systemd, the current setup tooling cannot safely attribute a nohup gateway process to one PostgreSQL major. If only one DocumentDB major is configured, use an unscoped restore so the orphan gateway sweep runs: @@ -485,14 +488,13 @@ deletes the state that identifies custom data directories and protects adopted c On a systemd multi-major host, remove one major at a time and re-check the survivor: \`documentdb-common\` owns the shared tooling and only \`documentdb-N\` holds it. -## Known issues in 0.116 +## Known package-install issues -These are defects in this release, not expected behaviour. Most need a host without systemd to hit; the two marked **any host** do not. +These are defects in this release, not expected behaviour. Most need a host without systemd to hit; the status issue also affects systemd hosts. | Area | Issue | Affects | | --- | --- | --- | | Status | \`documentdb-setup --status\` can report "active" for any process holding port 10260 | **any host** | -| Upgrade | \`documentdb-setup\` does not run \`ALTER EXTENSION documentdb_core UPDATE\`; run it yourself | **any host** | | Restart | Re-running \`documentdb-setup\` to restart can hang; redirecting output to a file avoids it | no systemd | | Stop | A scoped \`documentdb-setup --restore --pg-version N\` cannot stop a nohup gateway; follow the no-systemd brownfield removal steps above | no systemd | | Minimal RHEL | Install \`procps-ng\` first, or \`--restore\` reports success while the gateway keeps serving and a later run fails with \`Port 10260 is already in use\` | no systemd | @@ -606,7 +608,7 @@ Then continue with [Set up and connect](/docs/getting-started/packages#set-up-an If the target already has PostgreSQL, the PGDG extension dependencies (\`postgresql-N-cron\`, \`-pgvector\`, \`-postgis-3\`) and \`jq\`, you do not need a bundle: -- **Extension only, one file** — \`sudo apt install ./ubuntu24.04-postgresql-18-documentdb_0.116-0_amd64.deb\`. No gateway and no \`documentdb-setup\`. +- **Extension only, one file** — \`sudo apt install ./ubuntu24.04-postgresql-18-documentdb_0.117-0_amd64.deb\`. No gateway and no \`documentdb-setup\`. - **Full stack from the release assets** — pass all six files for your platform to a *single* \`apt install\` / \`dnf install\`. Local files resolve dependencies only against enabled repositories, so the meta package on its own fails with \`Depends: documentdb-18 ... but it is not installable\`. `; @@ -659,8 +661,8 @@ If you prefer a host installation instead of Docker, use the [Linux Packages Qui Once connected: -1. Expand the connection and open \`sampledb\`. This exists only if you started the container with \`--init-data true\`; without it DocumentDB Local starts empty. -2. Open a collection such as \`users\` or \`products\`. +1. Expand the connection and open \`StoreData\`. This exists only if you started the container with \`--init-data true\`; without it DocumentDB Local starts empty. +2. Open the \`stores\` or \`ratings\` collection. 3. Switch between the **Table**, **Tree**, and **JSON** views to confirm the extension is reading data correctly. 4. Create your own database and collection from the context menu, then add a test document like: @@ -920,14 +922,14 @@ You should see the recent movie documents printed after a successful \`ping\`. ## Explore the built-in sample data -Sample data is **opt-in** — this needs a container started with \`--init-data true\`. Without it \`sampledb\` does not exist and the query returns nothing. Add this snippet after \`client.admin.command("ping")\`: +Sample data is **opt-in** — this needs a container started with \`--init-data true\`. Without it \`StoreData\` does not exist and the query returns nothing. Add this snippet after \`client.admin.command("ping")\`: \`\`\`python -for user in client["sampledb"]["users"].find( +for store in client["StoreData"]["stores"].find( {}, - {"_id": 0, "firstName": 1, "lastName": 1, "email": 1}, + {"_id": 0, "name": 1, "city": 1, "sales.revenue": 1}, ).limit(3): - print(user) + print(store) \`\`\` ## Use a trusted local certificate instead @@ -992,7 +994,7 @@ If you prefer a host installation instead of Docker, use the [Linux Packages Qui > Replace \`\` and \`\` with your own credentials. > -> DocumentDB Local starts **empty** — pass \`--init-data true\` on the \`docker run\` above to seed the \`sampledb\` sample data used below. It also uses a self-signed certificate by default, so the fastest local \`mongosh\` connection adds \`--tlsAllowInvalidCertificates\`. +> DocumentDB Local starts **empty** — pass \`--init-data true\` on the \`docker run\` above to seed the \`StoreData\` sample data used below. It also uses a self-signed certificate by default, so the fastest local \`mongosh\` connection adds \`--tlsAllowInvalidCertificates\`. ## Connect and verify the connection @@ -1017,20 +1019,17 @@ Successful output confirms authentication, TLS, and the gateway endpoint are wor ## Explore the built-in sample data -Sample data is **opt-in**: this section needs a container started with \`--init-data true\`. Without it \`sampledb\` does not exist and these queries return nothing. +Sample data is **opt-in**: this section needs a container started with \`--init-data true\`. Without it \`StoreData\` does not exist and these queries return nothing. \`\`\`javascript -use sampledb +use StoreData -db.users.find( +db.stores.find( {}, - { firstName: 1, lastName: 1, email: 1, _id: 0 } + { _id: 0, name: 1, city: 1, "sales.revenue": 1 } ).limit(3) -db.products.find( - { category: "Electronics" }, - { name: 1, price: 1, _id: 0 } -) +db.ratings.find({}, { _id: 1, rating: 1 }).limit(2) \`\`\` ## Create your own collection @@ -1098,10 +1097,10 @@ The \`latest\` tag is a convenience alias. Pin an explicit tag for anything repr | Tag | Contents | |---|---| -| \`ghcr.io/documentdb/documentdb/documentdb-local:pg18-0.116.0\` | DocumentDB 0.116.0 on PostgreSQL 18 | -| \`…:pg17-0.116.0\` | DocumentDB 0.116.0 on PostgreSQL 17 | -| \`…:pg16-0.116.0\` · \`…:pg15-0.116.0\` | PostgreSQL 16 and 15 | -| \`…:latest\` | Currently identical to \`pg17-0.116.0\` | +| \`ghcr.io/documentdb/documentdb/documentdb-local:pg18-0.117.0\` | DocumentDB 0.117.0 on PostgreSQL 18 | +| \`…:pg17-0.117.0\` | DocumentDB 0.117.0 on PostgreSQL 17 | +| \`…:pg16-0.117.0\` · \`…:pg15-0.117.0\` | PostgreSQL 16 and 15 | +| \`…:latest\` | Currently identical to \`pg17-0.117.0\` | > \`latest\` tracks **PostgreSQL 17**, while the \`documentdb\` package on Linux pins > **PostgreSQL 18**. If you evaluate in Docker and then deploy from packages, you change @@ -1110,13 +1109,13 @@ The \`latest\` tag is a convenience alias. Pin an explicit tag for anything repr Every image records what it was built from: \`\`\`bash -docker run --rm --entrypoint cat ghcr.io/documentdb/documentdb/documentdb-local:pg18-0.116.0 /version.txt +docker run --rm --entrypoint cat ghcr.io/documentdb/documentdb/documentdb-local:pg18-0.117.0 /version.txt \`\`\` ## Data initialization -DocumentDB Local starts **empty**. Pass \`--init-data true\` to seed a \`sampledb\` database -with the \`users\`, \`products\`, \`orders\`, and \`analytics\` collections: +DocumentDB Local starts **empty**. Pass \`--init-data true\` to seed the \`StoreData\` database +with the \`stores\` and \`ratings\` collections: \`\`\`bash docker run -dt -p 10260:10260 --name documentdb \\ @@ -1124,18 +1123,18 @@ docker run -dt -p 10260:10260 --name documentdb \\ --username --password --init-data true \`\`\` -Seeding happens once per data volume, on a fresh volume. Re-create the volume to seed again. +Seeding happens once per data volume, on a fresh volume. Existing volumes are not migrated +automatically; re-create the volume to seed again. ### Control initialization behavior | Requirement | Arg | Env | Default | Description | |---|---|---|---|---| -| Load built-in sample data | \`--init-data [true\\|false]\` | \`INIT_DATA\` | \`false\` | Seed the \`sampledb\` sample collections on a fresh data volume. | +| Load built-in sample data | \`--init-data [true\\|false]\` | \`INIT_DATA\` | \`false\` | Seed the \`StoreData\` sample collections on a fresh data volume. | | Skip built-in sample data | \`--skip-init-data\` | \`SKIP_INIT_DATA\` | — | Legacy alias for \`--init-data false\`. Does not affect \`--init-data-path\`. | | Run custom initialization scripts | \`--init-data-path [PATH]\` | \`INIT_DATA_PATH\` | \`/init_doc_db.d\` | Execute every \`.js\` file in the mounted directory with \`mongosh\`. | -The built-in sample dataset currently includes 5 users, 5 products, 4 orders, and 2 -analytics records. +The built-in sample dataset currently includes 41,505 store documents and 2 rating documents. ### Use custom initialization scripts @@ -1378,7 +1377,7 @@ function updatePrebuiltPackagesContent(content: string): string { const legacyClaim = 'Everything else — PostgreSQL 15/16, Debian 11/12/13, Ubuntu 22.04, RHEL-compatible 8 — is not built by first-party CI for this release. The [package repository](https://documentdb.io/packages) serves those targets the extension package from an earlier release, or build from the tag with the scripts in [`packaging/`](https://github.com/documentdb/documentdb/blob/main/packaging/README.md). PostgreSQL 15 is extension-only: `documentdb-setup` needs 16 or newer.'; const currentPolicy = - 'Everything else — PostgreSQL 15/16, Debian 11/12/13, Ubuntu 22.04, RHEL-compatible 8 — is not built by first-party CI or hosted by documentdb.io for this release. Starting with v0.116, packages from earlier releases are not carried forward. Build from the matching tag with the [`packaging/` scripts](https://github.com/documentdb/documentdb/blob/v0.116-0/packaging/README.md); PostgreSQL 15 remains extension-only because `documentdb-setup` requires 16 or newer.'; + 'Everything else — PostgreSQL 15/16, Debian 11/12/13, Ubuntu 22.04, RHEL-compatible 8 — is not built by first-party CI or hosted by documentdb.io for this release. Starting with v0.116, packages from earlier releases are not carried forward. Build from the matching tag with the [`packaging/` scripts](https://github.com/documentdb/documentdb/blob/v0.117-0/packaging/README.md); PostgreSQL 15 remains extension-only because `documentdb-setup` requires 16 or newer.'; return content.replace(legacyClaim, currentPolicy); } @@ -1559,7 +1558,7 @@ export function getArticleByPath(section: string, slug: string[] = []): { content: linuxPackagesOperationsContent, frontmatter: { title: 'Operating a Package Install', - description: 'Secure, manage, upgrade and remove a DocumentDB installed from Linux packages, plus known issues in 0.116.', + description: 'Secure, manage, upgrade and remove a DocumentDB installed from Linux packages, including known package-install issues.', }, navigation, section, diff --git a/tests/packageArticles.test.ts b/tests/packageArticles.test.ts index dc2b87a..5c42b2f 100644 --- a/tests/packageArticles.test.ts +++ b/tests/packageArticles.test.ts @@ -1,5 +1,6 @@ import { describe, expect, it } from 'vitest'; import { + getArticleByPath, linuxPackagesGuideContent, linuxPackagesOperationsContent, } from '../app/services/articleService'; @@ -58,6 +59,64 @@ describe('Linux package articles', () => { ); }); + it('uses the current release package guide and artifact version', () => { + const offlineGuide = getArticleByPath('linux-packages', ['offline']); + + expect(linuxPackagesGuideContent).toContain( + 'documentdb/blob/v0.117-0/packaging/README.md', + ); + expect(linuxPackagesGuideContent).toContain( + '`--load-sample-data` to the setup command to seed the `StoreData` database', + ); + expect(offlineGuide?.content).toContain( + 'ubuntu24.04-postgresql-18-documentdb_0.117-0_amd64.deb', + ); + expect(linuxPackagesOperationsContent).not.toContain( + '## Known issues in 0.116', + ); + }); + + it('does not list the fixed setup core-version update as a current issue', () => { + expect(linuxPackagesOperationsContent).not.toContain( + 'does not run `ALTER EXTENSION documentdb_core UPDATE`', + ); + expect(linuxPackagesOperationsContent).toContain( + 'ALTER EXTENSION documentdb_core UPDATE;', + ); + }); + + it('documents the current opt-in StoreData sample', async () => { + const dockerGuide = getArticleByPath('getting-started', ['docker']); + expect(dockerGuide?.content).toContain('use StoreData'); + expect(dockerGuide?.content).toContain( + '41,505 documents in `stores` and 2 documents in `ratings`', + ); + expect(dockerGuide?.content).toContain( + 'Existing volumes are not migrated automatically', + ); + expect(dockerGuide?.content).not.toContain('use sampledb'); + + const { readFile } = await import('node:fs/promises'); + const { fileURLToPath } = await import('node:url'); + const source = await readFile( + fileURLToPath(new URL('../app/services/articleService.ts', import.meta.url)), + 'utf8', + ); + + expect(source).toContain( + '41,505 store documents and 2 rating documents', + ); + expect(source).toContain( + 'documentdb-local:pg18-0.117.0', + ); + expect(source).toContain( + 'Currently identical to \\`pg17-0.117.0\\`', + ); + expect(source).not.toContain( + '5 users, 5 products, 4 orders, and 2', + ); + }); + it('keeps Package Finder advanced hints linked and version-agnostic', async () => { const { readFile } = await import('node:fs/promises'); const { fileURLToPath } = await import('node:url'); @@ -67,6 +126,7 @@ describe('Linux package articles', () => { ); expect(source).toContain('href="/docs/linux-packages#unattended-setup"'); + expect(source).toContain('--load-sample-data to seed the{" "}'); expect(source).toContain('individual subpackages can carry'); expect(source).not.toContain('and the gateway are'); }); diff --git a/tests/packageInstall.test.ts b/tests/packageInstall.test.ts index 82468d1..fb0fb85 100644 --- a/tests/packageInstall.test.ts +++ b/tests/packageInstall.test.ts @@ -16,6 +16,10 @@ import type { RpmDistro, RpmPgVersion, } from '../app/lib/packageInstall'; +import { + FALLBACK_RELEASE, + parseReleaseInfo, +} from '../app/lib/releaseInfo'; /** * These commands are published on /packages for users to copy and paste, so a @@ -70,6 +74,38 @@ describe('package metadata', () => { }); }); +describe('release metadata', () => { + it('uses v0.117-0 for the first paint and feed fallback', () => { + expect(FALLBACK_RELEASE).toMatchObject({ + tagName: 'v0.117-0', + aptVersion: '0.117-0', + rpmVersion: '0.117.0-1.el9', + metaVersion: '0.117.0', + metaRpmVersion: '0.117.0-1', + releaseUrl: 'https://github.com/documentdb/documentdb/releases/tag/v0.117-0', + }); + }); + + it('derives v0.117 package versions from the published asset shapes', () => { + expect(parseReleaseInfo({ + tag_name: 'v0.117-0', + html_url: 'https://github.com/documentdb/documentdb/releases/tag/v0.117-0', + assets: [ + { name: 'ubuntu24.04-documentdb_0.117.0_all.deb' }, + { name: 'ubuntu24.04-postgresql-18-documentdb_0.117-0_amd64.deb' }, + { name: 'documentdb-0.117.0-1.noarch.rpm' }, + { name: 'rhel9-postgresql18-documentdb-0.117.0-1.el9.x86_64.rpm' }, + ], + })).toMatchObject({ + tagName: 'v0.117-0', + aptVersion: '0.117-0', + rpmVersion: '0.117.0-1.el9', + metaVersion: '0.117.0', + metaRpmVersion: '0.117.0-1', + }); + }); +}); + describe('buildAptInstallCommand', () => { it.each(aptMatrix)('produces a complete command for $distro/$arch/pg$pg', ({ distro, arch, pg }) => { const command = buildAptInstallCommand(distro, arch, pg); @@ -104,7 +140,7 @@ describe('buildAptInstallCommand', () => { it.each(aptMatrix)('installs the right package for $distro/$arch/pg$pg', ({ distro, arch, pg }) => { const command = buildAptInstallCommand(distro, arch, pg); - // v0.116-0 ships the full package set for Tier-1 targets only. There the + // Since v0.116-0, Tier-1 targets ship the full package set. There the // per-major stand-alone pulls the whole stack; everywhere else the // repository still serves the extension alone, and offering `documentdb-N` // would be an install command that cannot resolve.