Skip to content

feat: bump default DocumentDB version to 0.117.0 and unpin postgres image - #459

Merged
WentingWu666666 merged 7 commits into
documentdb:mainfrom
WentingWu666666:wentingwu/bump-documentdb-0.116-unpin-postgres
Sep 15, 2026
Merged

WentingWu666666 merged 7 commits into
documentdb:mainfrom
WentingWu666666:wentingwu/bump-documentdb-0.116-unpin-postgres

Conversation

@WentingWu666666

@WentingWu666666 WentingWu666666 commented Sep 15, 2026 •

Copy link
Copy Markdown
Collaborator

What

Why

#445 pinned CNPG's postgres image to 18.4-minimal-trixie as a stopgap: the shipped DocumentDB 0.113.0 extension segfaulted on PG 18.6 (an unguarded list_nth on fdwPrivLists in ExecInitModifyTable). That was fixed upstream in documentdb/documentdb@3555c7d, which first shipped in 0.116.0 (verified present at tag v0.116-0, absent at v0.114-0).

This executes the "un-pin gated on an upstream release" follow-up noted in #445: from 0.116.0 on, 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

  • Runtime default (0.113.0 -> 0.117.0): values.yaml, constants.go (DEFAULT_DOCUMENTDB_IMAGE / DEFAULT_GATEWAY_IMAGE), sidecar-injector config.go
  • Un-pin postgres: documentdb_types.go +kubebuilder:default -> ghcr.io/cloudnative-pg/postgresql:18-minimal-trixie; comment rewritten with a >=0.116.0 floor note + short historical note; CRDs regenerated (make manifests generate)
  • Literal-asserting tests: sidecar config_test.go, helm 02_sidecar_injector_test.yaml, 09_operator_deployment_test.yaml
  • Test on latest: e2e upgrade pair -> 0.116.0 -> 0.117.0 (test/e2e/tests/upgrade/helpers_test.go; both endpoints carry the PG-18.6 fix)
  • Docs: runtime-default rows in docs/designs/image-management.md and AGENTS.md

Validation

  • make fmt vet + go test ./... in operator/src — pass
  • go test ./... in operator/cnpg-plugins/sidecar-injector — pass
  • helm template renders DOCUMENTDB_VERSION: "0.117.0" (matches updated helm unittest assertions)
  • CI E2E is the real proof: floating 18-minimal-trixie (now 18.6+) with a >=0.116.0 upgrade pair must pass the insert path that previously segfaulted.

Co-authored-by: Copilot [email protected]

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.yml and test-upgrade-and-rollback.yml workflows, 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.yml uses that value when no version is supplied, and release_documentdb_images.yml pre-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.

Comment thread docs/designs/image-management.md Outdated
| `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"` |
@WentingWu666666
WentingWu666666 force-pushed the wentingwu/bump-documentdb-0.116-unpin-postgres branch 2 times, most recently from bdbd71d to 529c40f Compare September 15, 2026 15:42
…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]>
@WentingWu666666
WentingWu666666 force-pushed the wentingwu/bump-documentdb-0.116-unpin-postgres branch from 529c40f to aa1967b Compare September 15, 2026 15:43
// 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"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/designs/image-management.md Outdated
| `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` |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@documentdb-triage-tool documentdb-triage-tool Bot added CI/CD documentation Improvements or additions to documentation ecosystem enhancement New feature or request go Pull requests that update go code test labels Sep 15, 2026
@documentdb-triage-tool

Copy link
Copy Markdown

🤖 Auto-triaged by documentdb-triage-tool.

Applied: CI/CD, documentation, test, go, ecosystem, enhancement
Project fields suggested: Component ci · Priority P1 · Effort L · Status Needs Review
Confidence: 0.82 (mixed)

Reasoning

component 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 @patty-chow so the rules can be tuned. The bot will not re-label items that already have component labels.

wentingwu000 and others added 2 commits September 15, 2026 15:28
…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]>
@WentingWu666666 WentingWu666666 changed the title feat: bump default DocumentDB version to 0.116.0 and unpin postgres image feat: bump default DocumentDB version to 0.117.0 and unpin postgres image Sep 15, 2026
wentingwu000 and others added 3 commits September 15, 2026 15:37
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]>
@WentingWu666666
WentingWu666666 merged commit 86c1c4b into documentdb:main Sep 15, 2026
66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD documentation Improvements or additions to documentation ecosystem enhancement New feature or request go Pull requests that update go code test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants