Show the v0.116-0 package layout across the site - #151
Conversation
The package repository now serves the multi-package layout, but the site still described the world before it. /packages hardcoded 0.114-0 (and 0.113-0 for the repository examples), generated an extension-only install command for every target, and stated that "the published package repository does not currently include a gateway package, setup helper, or systemd service" -- which stopped being true for Ubuntu 24.04 and RHEL 9. The Linux Packages Quick Start presented building the gateway from Rust source as the only route to an endpoint. Read the version from the release feed instead of repeating it. The deployment already publishes packages/release-info.json describing the release it mirrors, and nothing consumed it; that is why the page went stale in the first place. The new module derives the DEB, RPM and meta-package versions from real asset filenames, so the page cannot advertise a shape the release does not contain, and falls back to a compiled-in release when the feed is unreachable so the install commands are never blank. Generate the install command per target. Tier-1 targets resolve the per-major stand-alone, which pulls the extension, gateway, tools and documentdb-common; everywhere else keeps the extension command, because offering `documentdb-N` there would be an install command that cannot resolve. PostgreSQL 16 stays on the extension command even on Tier-1, since v0.116-0 narrowed the stack to PostgreSQL 17 and 18 and 16 resolves the older build. Default the selector to Ubuntu 24.04 + PostgreSQL 18. It is the target the release is built and end-to-end tested against; defaulting to Ubuntu 22.04 and PostgreSQL 16 showed first-time visitors the extension-only experience. Document what the packages actually do: the five package roles, the documentdb-setup wizard (including that it prompts for a password, so servers need --admin-password-stdin --yes), connecting with mongosh, verification, the per-major systemd unit names, logs and ports, upgrading, and removal. Also warn that the gateway binds all interfaces by default while the connect example says 127.0.0.1, and how to restrict it. Add a drift check so this cannot silently rot again: when a deployment mirrors a release, the fallback compiled into the bundle must name the same one. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8df9084a-ccaf-432c-b015-2ccd8893a9d8
A cold read-the-site-and-install run surfaced two things the earlier pass missed. `apt remove documentdb` does not remove DocumentDB. The meta package only owns the dependency on the per-major package, so removing it leaves documentdb-18, documentdb-common, documentdb-gateway and documentdb-postgresql-tools installed -- verified: 5 packages before, 4 after. Remove the per-major package too and let autoremove reap the shared payload. The /packages hero and package catalog still taught the old model. The hero offered ""Linux packages for PostgreSQL extension installs"" and said the generated command installs ""the DocumentDB extension package"", and the catalog listed only the `postgresql-<pg>-documentdb` naming against a flat distribution list. A visitor who read only the static part of that page would conclude the extension package is all there is, which is exactly the misunderstanding the release needs to clear up. Both now distinguish the full-stack targets from the extension-only ones. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8df9084a-ccaf-432c-b015-2ccd8893a9d8
…source build A second cold read-the-site-and-install run found three things. The documented uninstall left a running, network-exposed database behind. Verified on a clean container: after `apt remove --autoremove documentdb documentdb-18`, apt reports `Package 'documentdb' is not installed` (the meta is never pulled by installing `documentdb-18`), `postgresql-18-documentdb` is still `ii` installed with its .so and .control files on disk, the other four packages are left in `rc` state with their config, and -- because package removal does not stop a service -- the gateway is still listening on 0.0.0.0:10260 and still answering queries. `apt purge --autoremove documentdb-18 postgresql-18-documentdb` leaves nothing behind, so document that, and tell people to stop the stack first. The landing page told full-stack users to build the gateway from source: ""Linux packages install the PostgreSQL extension; the Linux package guide adds the extra source-gateway steps needed when you want a host install that still exposes a MongoDB-compatible endpoint."" On Ubuntu 24.04 and RHEL 9 the gateway is packaged and `documentdb-setup` starts it, so that sends people off to build a Rust project they do not need. The connection URI had no note about percent-encoding, so a password containing `@` silently misparses. Add the note and the flag-based form that avoids the problem entirely. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8df9084a-ccaf-432c-b015-2ccd8893a9d8
Validation: two cold read-the-site-and-install runsThis branch was validated twice by a tester with no prior DocumentDB knowledge, allowed to use only the pages this PR builds, installing from the real Round 1 — 3/5. Installed and queried successfully on both distributions, and every runtime claim verified: versions, the
Round 2 — 4/5. The tester could now correctly answer, before installing, what the five packages are, that
Remaining known gap, not addressed here: without JavaScript |
Problem
The package repository now serves the v0.116-0 multi-package layout (#149), but the site still described the world before it.
/packageswas stale and, in one place, wrong.0.114-0for the download examples and0.113-0for the repository examples. Both were wrong — the repository serves0.116-0.apt install postgresql-N-documentdbfor every target, so the new stack was unreachable from the page.The Linux Packages Quick Start presented building the gateway from Rust source as the only route to a
mongoshendpoint.The underlying cause:
packages/release-info.jsonis already published on every deployment and describes exactly which release is mirrored — and nothing read it.Changes
Read the version instead of repeating it
New
app/lib/releaseInfo.tsderives the DEB, RPM and meta-package versions from real asset filenames in the release feed, so the page cannot advertise a package shape the release does not contain. Each field falls back independently, and a compiled-in release covers the first paint and any fetch failure, so install commands are never blank.Generate the right command per target
buildAptInstallCommand/buildRpmInstallCommandnow resolve the per-major stand-alone (documentdb-18) on targets where v0.116-0 published the full set, and keeppostgresql-N-documentdbeverywhere else — offeringdocumentdb-Non an extension-only target would be an install command that cannot resolve. PostgreSQL 16 stays on the extension command even on Tier-1, because v0.116-0 narrowed the stack to 17/18 and 16 resolves the older build.Explain the packages
documentdb-setupwizard, including that it prompts for a password — so servers and CI need--admin-password-stdin --yes.mongosh, and that it is not shipped by the packages.0.0.0.0:10260) while the connect example says127.0.0.1.documentdb-local@18.target), ports, logs, upgrading and removal in the quick start.Stop it rotting again
check_release_drift.jsfails the deployment when the fallback compiled into the bundle names a different release than the one being mirrored, or declares a version the release's assets contradict. It skips cleanly when there is norelease-info.json(site-only builds, forks without packaging secrets).Verification
tsc --noEmitclean,eslint app testsclean,next buildprerenders/packagessuccessfully./packagescontains only0.116-0/0.116.0— no0.113/0.114remain — and the false "does not include a gateway package" sentence is gone.documentdb-setup,documentdb-postgresql-tools, the package table, the exposure warning) and thepackages/release-info.jsonfetch are present in the client bundle.The drift guard was verified to fail, not just to pass. Against the live feed it reports
Release fallback matches the mirrored release (v0.116-0); simulating a mirror bump tov0.117-0and, separately, anaptVersionof0.114-0each exit non-zero with a specific message.8 pre-existing tests failed on the first run — exactly the Tier-1 combinations (
ubuntu24/rhel9× PG 17/18), which is the intended behaviour change. They now assert the correct package per target, plus a new case pinning full-stack vs extension-only.Notes for reviewers
app/data/samples.tsandtsconfig.jsonare deliberately not in this diff:npm run buildrewrites both (the samples compiler pulls the gallery, Next patches tsconfig), and neither is part of this change.documentdb/docsrepository has its own stale package page; that is handled separately in Document the v0.116-0 package layout docs#67.build:blogs) is untested locally — it needs Ruby/bundler, which CI provides.