Repository navigation
feat: bump default DocumentDB version to 0.117.0 and unpin postgres image - #459
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Stale release/build and E2E version references must be synchronized before approval.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This PR bumps DocumentDB defaults to 0.116.0 and restores the floating PostgreSQL 18 image tag.
Changes:
- Updated compiled, Helm, and sidecar image defaults.
- Regenerated CRDs and refreshed tests.
- Updated version documentation.
Open findings remain around stale workflow, Dockerfile, E2E, and checklist version references.
File summaries
| File | Summary |
|---|---|
operator/src/internal/utils/constants.go |
Updated compiled image defaults. |
operator/src/config/crd/bases/documentdb.io_dbs.yaml |
Regenerated CRD schema. |
operator/src/api/preview/documentdb_types.go |
Restored the floating PostgreSQL default. |
operator/documentdb-helm-chart/values.yaml |
Updated chart version; moderate finding (1 vote) notes stale 0.113.0 workflow and gateway fallbacks. |
operator/documentdb-helm-chart/tests/09_operator_deployment_test.yaml |
Updated version assertions. |
operator/documentdb-helm-chart/tests/02_sidecar_injector_test.yaml |
Updated version assertions. |
operator/documentdb-helm-chart/crds/documentdb.io_dbs.yaml |
Regenerated Helm CRD. |
operator/cnpg-plugins/sidecar-injector/internal/config/config.go |
Updated gateway default. |
operator/cnpg-plugins/sidecar-injector/internal/config/config_test.go |
Updated gateway default test. |
docs/designs/image-management.md |
Moderate finding (2 votes): stale workflow, gateway Dockerfile, and schema-upgrade E2E references remain. Nit (1 vote): checklist references outdated versions and removed workflows. |
AGENTS.md |
Updated database version reference. |
Review details
Suppressed comments (2)
docs/designs/image-management.md:70
- The synchronization checklist below still contains 0.113.0 examples and references the removed
test-backup-and-restore.ymlandtest-upgrade-and-rollback.ymlworkflows, while this table now declares 0.116.0 as current. Please refresh that checklist to the active workflow/Dockerfile/E2E locations so this documentation does not direct the next version bump to stale or nonexistent files.
| **Current version** | `0.2.0` | `0.116.0` |
| **Build workflow** | `build_operator_images.yml` | `build_documentdb_images.yml` |
| **Release workflow** | `release_operator.yml` | `release_documentdb_images.yml` |
| **Tag example** | `ghcr.io/.../operator:0.2.0` | `ghcr.io/.../documentdb:0.116.0` |
operator/documentdb-helm-chart/values.yaml:9
- This bump leaves the release/build fallbacks on 0.113.0:
build_documentdb_images.ymluses that value when no version is supplied, andrelease_documentdb_images.ymlpre-fills its release input with it. A manual run can therefore rebuild or promote the old database images despite 0.116.0 being the chart default; update those workflow defaults (and the gateway Dockerfile fallback) or derive them from the canonical version.
documentDbVersion: "0.116.0"
- Files reviewed: 11/11 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| | `operator/src/internal/utils/constants.go` | `DEFAULT_GATEWAY_IMAGE` | `...gateway:0.116.0` | | ||
| | `operator/cnpg-plugins/sidecar-injector/internal/config/config.go` | Default gateway image | `...gateway:0.116.0` | | ||
| | `operator/cnpg-plugins/sidecar-injector/internal/config/config_test.go` | Expected gateway image | `...gateway:0.116.0` | | ||
| | `operator/documentdb-helm-chart/values.yaml` | `documentDbVersion` | `"0.116.0"` | |
bdbd71d to
529c40f
Compare
…mage Bump the database-track default documentDbVersion from 0.113.0 to 0.116.0 and revert the temporary PostgreSQL image pin introduced in documentdb#445 back to the floating "18-minimal-trixie" tag. documentdb#445 pinned CNPG's postgres image to 18.4-minimal-trixie because the shipped DocumentDB 0.113.0 extension segfaulted on PG 18.6 (unguarded list_nth on fdwPrivLists in ExecInitModifyTable). That was fixed upstream in documentdb/documentdb 3555c7d, which ships in 0.116.0, so the pin is no longer needed and the default can float within PG major 18 again. - values.yaml, constants.go (DEFAULT_DOCUMENTDB_IMAGE/DEFAULT_GATEWAY_IMAGE), sidecar-injector config.go: 0.113.0 -> 0.116.0 - documentdb_types.go: postgres kubebuilder default -> 18-minimal-trixie; regenerated CRDs - updated literal-asserting tests (config_test.go, helm 02/09 suites) - refreshed image-management.md and AGENTS.md version references Co-authored-by: Copilot <[email protected]> Copilot-Session: d53b8fec-0585-4888-89da-d9a6847597a5 Signed-off-by: Wenting Wu <[email protected]>
529c40f to
aa1967b
Compare
Signed-off-by: Wenting Wu <[email protected]>
| // The default floats within PostgreSQL major 18 via CNPG's | ||
| // "18-minimal-trixie" tag, so deployments pick up new 18.x minors and | ||
| // Debian/PGDG security rebuilds automatically. | ||
| // +kubebuilder:default="ghcr.io/cloudnative-pg/postgresql:18-minimal-trixie" |
There was a problem hiding this comment.
This un-pin needs the e2e version pair bumped in the same PR, or it reintroduces the #445 crash.
test/e2e/tests/upgrade/helpers_test.go:57-58 is still 0.109.0 / 0.110.0 — both predate the fix. Those specs do get this new default: the base manifest declares spec.image as a present object, so defaulting descends and stamps 18-minimal-trixie (PG 18.6) onto the CR. upgrade_schema_test.go:154 then inserts on the 0.109.0 extension — the segfaulting path.
CI won't catch it: those specs need SkipUnlessLevel(High) and TEST_DEPTH defaults to Medium, so this PR goes green regardless.
Please bump the pair to >=0.116.0, and note the >=0.116.0 floor in the comment above — nothing else records that the floating tag is only safe for fixed extensions.
(release_documentdb_images.yml:141-145 normally advances this pair automatically; a hand-authored bump skips it.)
There was a problem hiding this comment.
Fixed. The e2e upgrade pair in test/e2e/tests/upgrade/helpers_test.go now goes 0.116.0 -> 0.117.0 — both endpoints carry the fdwPrivLists fix (first shipped in 0.116.0), so the insert path no longer hits the segfault under the floating 18-minimal-trixie (PG 18.6) default. I also added the >=0.116.0 floor note to the documentdb_types.go comment (and regenerated CRDs) so the version constraint on the floating tag is recorded where the default lives.
| content: | ||
| name: DOCUMENTDB_VERSION | ||
| value: "0.113.0" | ||
| value: "0.116.0" |
There was a problem hiding this comment.
Hand-editing this points at an automation gap. release_documentdb_images.yml:100-145 seds eight files but not this one or 09_operator_deployment_test.yaml:74 — both hardcode the version and assert it matches values.yaml.
So the next auto-generated release PR will bump values.yaml and fail helm unittest. Worth adding a sed step for these two.
There was a problem hiding this comment.
Good catch — you're right, hand-editing these fixtures pointed straight at the sed gap. Rather than defer it, I've closed it in this PR: release_documentdb_images.yml now also seds 02_sidecar_injector_test.yaml and 09_operator_deployment_test.yaml (new step "3b", right after the values.yaml bump), so a future auto-release PR advances values.yaml and these two fixtures together and won't break helm unittest. The PR-body checklist was updated to match.
| | `operator/cnpg-plugins/sidecar-injector/internal/config/config.go` | Default gateway image | `...gateway:0.116.0` | | ||
| | `operator/cnpg-plugins/sidecar-injector/internal/config/config_test.go` | Expected gateway image | `...gateway:0.116.0` | | ||
| | `operator/documentdb-helm-chart/values.yaml` | `documentDbVersion` | `"0.116.0"` | | ||
| | `.github/workflows/test-backup-and-restore.yml` | `DOCUMENTDB_IMAGE`, `GATEWAY_IMAGE` env | `...documentdb:0.113.0` | |
There was a problem hiding this comment.
These two rows stayed at 0.113.0 while the other nine moved, and they point at workflows that no longer exist (consolidated into test-e2e.yml, per release_documentdb_images.yml:113-118).
The table also omits three files this PR did edit: the two Helm unittest fixtures and helpers_test.go. As the "what to update when bumping" checklist, it currently sends you to dead files and misses live ones — plausibly how the stale e2e pair happened.
There was a problem hiding this comment.
Fixed. Dropped the two dead rows (they pointed at test-backup-and-restore.yml / test-upgrade-and-rollback.yml, now consolidated into test-e2e.yml) and added the three live files the PR actually edits — the two Helm unittest fixtures and helpers_test.go. So the "what to update when bumping" table now points only at live files.
Note on scope: per the discussion, this PR bumps only the runtime default (values.yaml / constants.go / config.go + their tests) and the e2e pair to 0.117.0; the database-image build/release-track rows (build_wf, release_wf, gateway Dockerfile) are intentionally left at 0.113.0 since they're driven independently by the release automation.
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningcomponent from path globs (ci, docs, test, controllers, playground, api, manifests); effort from diff stats (54+63 LOC, 16 files); LLM: Bumps the default DocumentDB version to fix a segfault regression on PG 18.6 and un-pins the PostgreSQL image, resolving an active blocker introduced in #445 across multiple files and components. If a label is wrong, remove it manually and ping |
…ade pair Follows up the 0.116.0 bump: 0.117.0 operator images (extension + gateway) are now published, so move the default forward and address review feedback on the postgres un-pin. - Bump default documentDbVersion 0.116.0 -> 0.117.0 (values.yaml, constants.go, sidecar config.go, docs, playground script, cnpg_sync_test fixtures, helm unittest fixtures, Dockerfile SOURCE_IMAGE ARG) - Advance the e2e schema-upgrade pair to 0.116.0 -> 0.117.0 (helpers_test.go). Both sides now carry the PG 18.6 insert-segfault fix (documentdb/documentdb 3555c7d, first released in 0.116.0), so the floating "18-minimal-trixie" default (PG 18.6) no longer reintroduces the documentdb#445 crash under the upgrade specs. - Document the >= 0.116.0 floor in the Postgres field comment / CRD so the floating-tag safety constraint is recorded. - Refresh the image-management.md synchronization table: drop the two dead legacy-workflow rows (consolidated into test-e2e.yml) and add the live files the bump touches (two helm fixtures + the e2e pair). Note: the matching 0.117.0 bump for .github/workflows/{build,release}_documentdb_images.yml (including a new sed step for the two helm fixtures) is applied separately; it requires a token with `workflow` scope. Co-authored-by: Copilot <[email protected]> Copilot-Session: d53b8fec-0585-4888-89da-d9a6847597a5 Signed-off-by: Wenting Wu <[email protected]>
Revert the database-image build/release-track and cosmetic files back to their prior values: the version users deploy is driven solely by the runtime default (values.yaml documentDbVersion + constants.go / sidecar config.go), and only that plus the e2e upgrade pair should advance here. Reverted (not the runtime default): - .github/dockerfiles/Dockerfile_gateway_public_image (build source image) - operator/src/internal/cnpg/cnpg_sync_test.go (arbitrary fixture refs) - documentdb-playground/aks-setup/scripts/create-cluster.sh (comment example) - docs/designs/image-management.md: build-track sync rows back to 0.113.0 (runtime-default rows stay at 0.117.0) The matching revert of the two .github/workflows/*_documentdb_images.yml files (bumped in an earlier commit) is applied separately; it needs a token with `workflow` scope. Co-authored-by: Copilot <[email protected]> Copilot-Session: d53b8fec-0585-4888-89da-d9a6847597a5 Signed-off-by: Wenting Wu <[email protected]>
Signed-off-by: Wenting Wu <[email protected]>
Revert the two database-image workflows to their prior state (no runtime version bump — that is out of scope for this PR), and separately fix the automation gap flagged in review: release_documentdb_images.yml sed'd eight files but not the two Helm unittest fixtures that hardcode DOCUMENTDB_VERSION and assert it matches values.yaml. Add sed steps for 02_sidecar_injector_test.yaml and 09_operator_deployment_test.yaml so a future auto-release PR bumps values.yaml and these fixtures together and does not break `helm unittest`. Co-authored-by: Copilot <[email protected]> Copilot-Session: d53b8fec-0585-4888-89da-d9a6847597a5 Signed-off-by: Wenting Wu <[email protected]>
govulncheck flags grpc v1.82.1 for two advisories reachable from our code: - GO-2026-6443 (server panic via missing authority/Host headers; fixed v1.82.2) - GO-2026-6348 (HTTP/2 DATA-frame heap exhaustion / OOM; fixed v1.83.1) Bump grpc to v1.83.2 across all modules (operator/src, sidecar-injector, test/e2e, test/longhaul, test/shared, documentdb-kubectl-plugin) and `go mod tidy`. govulncheck now reports 0 vulnerabilities affecting code in every module. Co-authored-by: Copilot <[email protected]> Copilot-Session: d53b8fec-0585-4888-89da-d9a6847597a5 Signed-off-by: Wenting Wu <[email protected]>
What
documentDbVersionfrom0.113.0->0.117.0(the version users deploy).18.4-minimal-trixieback to the floating18-minimal-trixietag.Why
#445 pinned CNPG's postgres image to
18.4-minimal-trixieas a stopgap: the shipped DocumentDB0.113.0extension segfaulted on PG 18.6 (an unguardedlist_nthonfdwPrivListsinExecInitModifyTable). That was fixed upstream indocumentdb/documentdb@3555c7d, which first shipped in0.116.0(verified present at tagv0.116-0, absent atv0.114-0).This executes the "un-pin gated on an upstream release" follow-up noted in #445: from
0.116.0on, the insert path is ABI-correct on PG 18.6, so the default can float within PG major 18 again and automatically pick up new minors and Debian/PGDG security rebuilds. The default is set to the latest published release,0.117.0.Scope
Intentionally limited to the runtime default users consume plus testing on the latest version. The database-image build/release track (build/release workflows, gateway build Dockerfile) and cosmetic fixtures are left as-is — they are driven independently by the release automation.
Changes
values.yaml,constants.go(DEFAULT_DOCUMENTDB_IMAGE/DEFAULT_GATEWAY_IMAGE), sidecar-injectorconfig.godocumentdb_types.go+kubebuilder:default->ghcr.io/cloudnative-pg/postgresql:18-minimal-trixie; comment rewritten with a>=0.116.0floor note + short historical note; CRDs regenerated (make manifests generate)config_test.go, helm02_sidecar_injector_test.yaml,09_operator_deployment_test.yaml0.116.0->0.117.0(test/e2e/tests/upgrade/helpers_test.go; both endpoints carry the PG-18.6 fix)docs/designs/image-management.mdandAGENTS.mdValidation
make fmt vet+go test ./...inoperator/src— passgo test ./...inoperator/cnpg-plugins/sidecar-injector— passhelm templaterendersDOCUMENTDB_VERSION: "0.117.0"(matches updated helm unittest assertions)18-minimal-trixie(now 18.6+) with a>=0.116.0upgrade pair must pass the insert path that previously segfaulted.Co-authored-by: Copilot [email protected]