Remove support for provisioning Postgres 16#239
Merged
Conversation
Closes #238. Postgres 16 is deprecated for provisioning across both local (Docker-backed) and cloud (ClickHouse Cloud API) commands; only 17 and 18 may be provisioned, with 18 the default. - cloud: drop "16" from KNOWN_PG_VERSIONS so clap rejects --pg-version 16 on create/update - local: validate_pg_tag accepts only 17/18, with updated error message - api library: drop the _16 variant from PgVersion (Unknown(String) catch-all retains deserialization of existing pg16 services); vendored OpenAPI snapshot is left to the drift tooling once the upstream spec change lands - docs + test fixtures updated off 16 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 787b79c. Configure here.
| "postgres version '{}' is not supported. Use a 16, 17, or 18 image tag \ | ||
| (for example: 16, 16-alpine, 17.0, 18-bookworm).", | ||
| "postgres version '{}' is not supported. Use a 17 or 18 image tag \ | ||
| (for example: 17, 17-alpine, 18.1, 18-bookworm).", |
There was a problem hiding this comment.
PG16 disambiguation blocked locally
High Severity
Rejecting major 16 in validate_pg_tag also runs when stop, remove, client, and dotenv resolve --version. After two majors share a name, --version 16 is required to manage an existing PG16 instance but now errors, so teardown and client access for that instance can fail while PG17 remains.
Reviewed by Cursor Bugbot for commit 787b79c. Configure here.
The edge-case battery still provisioned postgres:16, which is now rejected by validate_pg_tag. Move single-version cases to 18-alpine, switch per_version_isolation to 17+18, drop 16 from the majors loop, and assert 16 is rejected alongside 14/19 in unsupported_majors. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Closes #238.
Deprecates provisioning of Postgres 16 across both local (Docker-backed) and cloud (ClickHouse Cloud API) commands. Going forward only Postgres 17 and 18 may be provisioned; 18 remains the default. Existing pg16 cloud services still deserialize (via the
PgVersion::Unknowncatch-all) — we only remove the ability to provision 16.Changes
Provisioning gates (behavior change)
cloud/postgres.rs:KNOWN_PG_VERSIONS→["18", "17"]; clap now rejects--pg-version 16forcreate/update. Added a rejection test.local/postgres.rs:validate_pg_tagaccepts only17/18; updated error message, doc comments, and accept/reject tests.API library
models.rs: dropped the_16variant fromPgVersion(and itsDisplayarm). The matching OpenAPI spec change (removing16from thepgVersionenum) is being merged upstream, so the library stays aligned. The vendored snapshot is intentionally not hand-edited — it's refreshed by the drift tooling when the spec change lands.Docs & fixtures
README.md: supported-versions text, cloud--pg-versionrow, and local examples updated off 16.local/cli.rshelp text, pluslocal/mod.rs/local/server.rstest fixtures bumped off 16.Out of scope
Verification
cargo buildcargo test— 300 CLI tests + cloud-api unit/spec-coverage tests passcargo clippy --all-targets -- -D warnings— clean🤖 Generated with Claude Code
Note
Low Risk
User-facing version gate only; no auth or data-path changes, though scripts or docs that still target pg16 will fail at CLI validation.
Overview
Postgres 16 can no longer be provisioned through
clickhousectl; only majors 17 and 18 are accepted (18 stays the default for local Docker).Cloud
postgres create/updatenow allow--pg-versiononly17or18viaKNOWN_PG_VERSIONSand clap; a test asserts--pg-version 16fails at parse time. Locallocal postgres startrejects 16.x image tags invalidate_pg_tag, with updated CLI/README help and integration tests shifted to 17/18.The
PgVersionAPI enum drops the explicit16variant (aligned with the OpenAPI change); API responses that still return16should deserialize asUnknown("16")so existing cloud services remain readable without new provisioning paths.Reviewed by Cursor Bugbot for commit e54c5a1. Bugbot is set up for automated code reviews on this repo. Configure here.