Skip to content

fix(postgres-operator): align CNPG operator and CRDs to 1.28.2 for PVC resize-deadlock fix - #3510

Merged
myasnikovdaniil merged 1 commit into
mainfrom
feat/bump-cnpg-version
Aug 4, 2026
Merged

fix(postgres-operator): align CNPG operator and CRDs to 1.28.2 for PVC resize-deadlock fix#3510
myasnikovdaniil merged 1 commit into
mainfrom
feat/bump-cnpg-version

Conversation

@scooby87

@scooby87 scooby87 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What this PR does

Raises the CloudNativePG operator image and its CRDs together to 1.28.2, which carries the PVC resize-deadlock fix (cloudnative-pg#9980 / cloudnative-pg#9981). Symptom: after a simultaneous resources + size change on a single-instance Postgres, the operator deletes the sole primary Pod, classifies the PVC as resizing, and never recreates the Pod — the cluster wedges with zero instances and the disk FS resize never completes.

Upstream publishes a CloudNativePG chart only per minor (.0/.1), so there is no 1.28.2 chart on the 1.28 line. Following the pattern of #3526 / #3528, patches/cloudnative-pg-1.28.2.patch (applied by make update) raises the vendored chart's appVersion and CRDs from 1.28.1 to 1.28.2 in lockstep. The operator image follows appVersion, so there is no image.tag pin (keeping operator and CRDs aligned and avoiding #3479).

Verified #3479-safe: there are no CRD status field changes between 1.28.1 and 1.28.2 — only the extensions spec grows. Backportable to release-1.6 as-is (same 0.27.1 base chart).

Release note

fix(postgres-operator): align CloudNativePG operator and CRDs to 1.28.2, fixing the PVC resize-deadlock that wedged single-instance PostgreSQL clusters after a simultaneous resources+size change

Summary by CodeRabbit

  • New Features

    • Added support for PostgreSQL extension configuration in catalog and cluster schemas.
    • Made extension image settings optional where appropriate.
  • Bug Fixes

    • Updated CloudNativePG to version 1.28.2, including the PVC resize deadlock fix.
    • Kept the operator image and CRDs aligned at the same version.
  • Documentation

    • Clarified versioning and chart update guidance.
  • Tests

    • Added checks confirming operator image and CRD version alignment.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@github-actions github-actions Bot added area/database Issues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse) kind/cleanup Categorizes issue or PR as related to cleanup of code, process, or technical debt size/XS This PR changes 0-9 lines, ignoring generated files labels Aug 3, 2026
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The PostgreSQL operator upgrades to CloudNativePG 1.28.2. Cluster and catalog CRD schemas now support optional extension configuration with executable paths, library paths, environment variables, and OCI image settings. A patch file automates these schema changes and is applied during chart builds. The Chart version advances to 1.28.2, values.yaml documents the patch-based approach, and a new test verifies that the operator image and CRDs remain aligned.

Changes

CloudNativePG 1.28.2 extension configuration and build integration

Layer / File(s) Summary
Cluster and catalog extension configuration schemas
packages/system/postgres-operator/charts/cloudnative-pg/templates/crds/crds.yaml
Cluster extension configuration adds bin_path and env fields. Image reference is no longer required. Catalog image extensions gain the same optional configuration structure with path, environment, and image settings. All CRD controller-gen annotations update to v0.20.1.
Patch definition and build integration
packages/system/postgres-operator/patches/cloudnative-pg-1.28.2.patch, packages/system/postgres-operator/Makefile, packages/system/postgres-operator/charts/cloudnative-pg/Chart.yaml, packages/system/postgres-operator/values.yaml
A patch file encodes all CRD schema changes and controller-gen updates for 1.28.2. The Makefile applies this patch after pulling the CloudNativePG chart. Chart.yaml advances to 1.28.2. values.yaml documents the patch-based delivery and version pinning approach, directing version changes through the patch or chart update.
Operator and CRD alignment verification
packages/system/postgres-operator/tests/cnpg-version_test.yaml
A new Helm test suite validates that the CNPG 1.28.2 operator image and CRDs remain synchronized. Tests check deployment image correctness, environment variable values, version labels, and CRD controller-gen v0.20.1 annotations.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related issues: #3479 — Addresses the same operator image and CRD version-skew alignment problem for CloudNativePG 1.28.2.

Suggested reviewers: lexfrei, ivanhunters, myasnikovdaniil, sircthulhu

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: aligning the CNPG operator and CRDs to 1.28.2 for the PVC resize-deadlock fix.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/bump-cnpg-version

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/system/postgres-operator/charts/cloudnative-pg/README.md`:
- Line 163: Restore the documentation warning that the webhook Service name is
fixed, or remove service.name from the supported configuration table; update the
generator, upstream source, or repository-owned wrapper documentation rather
than the vendored chart file, and keep the readiness hook’s fixed Service
contract accurately represented.

In `@packages/system/postgres-operator/Makefile`:
- Line 13: Update the appVersion reference comment in values.yaml to 1.29.1,
matching the CloudNativePG chart version pulled by the Makefile target and
documenting the image and CRD synchronization contract.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1f4e3f43-e8ed-41b8-8bfa-e0472a912a33

📥 Commits

Reviewing files that changed from the base of the PR and between 04b7426 and dae5cde.

📒 Files selected for processing (7)
  • packages/system/postgres-operator/Makefile
  • packages/system/postgres-operator/charts/cloudnative-pg/Chart.yaml
  • packages/system/postgres-operator/charts/cloudnative-pg/README.md
  • packages/system/postgres-operator/charts/cloudnative-pg/README.md.gotmpl
  • packages/system/postgres-operator/charts/cloudnative-pg/templates/crds/crds.yaml
  • packages/system/postgres-operator/charts/cloudnative-pg/values.schema.json
  • packages/system/postgres-operator/charts/cloudnative-pg/values.yaml

| service.ipFamilies | list | `[]` | Sets the families that should be supported and the order in which they should be applied to ClusterIP as well. Can be IPv4 and/or IPv6. |
| service.ipFamilyPolicy | string | `""` | Set the ip family policy to configure dual-stack see [Configure dual-stack](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services) |
| service.name | string | `"cnpg-webhook-service"` | DO NOT CHANGE THE SERVICE NAME as it is currently used to generate the certificate and can not be configured |
| service.name | string | `"cnpg-webhook-service"` | The name of the Webhook Service. |

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.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Keep the fixed webhook Service contract visible.

packages/system/postgres-operator/templates/webhook-ready-hook.yaml:17-26 still uses the fixed webhook Service contract. This table now presents service.name without the previous warning. If a user changes service.name, the readiness hook can target a different Service and the install or upgrade can fail. Restore the non-configurable warning, or stop presenting this value as a supported override.

As per coding guidelines, files under packages/**/charts/** are vendored upstream files and must remain verbatim; apply this documentation fix in the generator, upstream source, or repository-owned wrapper documentation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/system/postgres-operator/charts/cloudnative-pg/README.md` at line
163, Restore the documentation warning that the webhook Service name is fixed,
or remove service.name from the supported configuration table; update the
generator, upstream source, or repository-owned wrapper documentation rather
than the vendored chart file, and keep the readiness hook’s fixed Service
contract accurately represented.

Source: Coding guidelines

helm repo add cnpg https://cloudnative-pg.github.io/charts
helm repo update cnpg
helm pull cnpg/cloudnative-pg --untar --untardir charts --version 0.27.1
helm pull cnpg/cloudnative-pg --untar --untardir charts --version 0.28.3

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.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Refresh the appVersion reference in the parent values comment.

This target now pulls chart 0.28.3, whose appVersion is 1.29.1. However, packages/system/postgres-operator/values.yaml:1-10 still says that the chart appVersion is 1.28.1. Update that comment so it documents the actual image and CRD synchronization contract.

Proposed documentation fix
-  # Image tag intentionally left to the chart's appVersion (1.28.1). Do NOT pin
+  # Image tag intentionally left to the chart's appVersion (1.29.1). Do NOT pin
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/system/postgres-operator/Makefile` at line 13, Update the appVersion
reference comment in values.yaml to 1.29.1, matching the CloudNativePG chart
version pulled by the Makefile target and documenting the image and CRD
synchronization contract.

@scooby87
scooby87 force-pushed the feat/bump-cnpg-version branch from dae5cde to 443df4b Compare August 3, 2026 13:29
@github-actions github-actions Bot added size/S This PR changes 10-29 lines, ignoring generated files and removed size/XS This PR changes 0-9 lines, ignoring generated files labels Aug 3, 2026
@scooby87 scooby87 changed the title chore(postgres-operator): bump cloudnative-pg chart 0.27.1 -> 0.28.3 (CNPG 1.28.1 -> 1.29.1) fix(postgres-operator): pin CNPG operator image to 1.28.2 for PVC resize-deadlock fix Aug 3, 2026

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/system/postgres-operator/values.yaml`:
- Around line 4-16: Update the vendored CloudNativePG chart metadata to chart
version 0.28.3 with appVersion 1.29.1, then remove the cloudnative-pg.image.tag
override and its associated same-minor compatibility comments from values.yaml.
Ensure the deployment uses the chart’s appVersion without introducing a
mismatched image tag.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c51b00c7-93ac-4e84-ae57-8f36ead05002

📥 Commits

Reviewing files that changed from the base of the PR and between dae5cde and 443df4b.

📒 Files selected for processing (1)
  • packages/system/postgres-operator/values.yaml

Comment on lines +4 to +16
# Pinned to 1.28.2 (same minor as the vendored chart's appVersion 1.28.1) to pick up
# the PVC resize-deadlock fix (cloudnative-pg#9980 / #9981), which landed in the operator
# binary in 1.28.2 and needs no CRD change. Upstream publishes a chart only per minor
# .0/.1, so 1.28.2 has no chart and the fix is unreachable via a chart bump on the 1.28 line.
#
# A same-minor pin is #3479-safe: an operator newer than its CRDs is dangerous only when
# it writes status fields the CRD prunes (e.g. status.instanceID.sessionID, added in CNPG
# 1.27.3 over 1.27.1 CRDs). Across the 1.28 patch line the backups CRD schema is unchanged
# (only the controller-gen annotation differs) and the clusters CRD only gains additive
# spec fields - no new status fields to prune. Any CROSS-minor bump must instead raise the
# chart version in the Makefile so the operator and CRDs advance together.
image:
tag: "1.28.2"

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.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

chart="packages/system/postgres-operator/charts/cloudnative-pg/Chart.yaml"
values="packages/system/postgres-operator/values.yaml"
chart_dir="packages/system/postgres-operator/charts/cloudnative-pg"

chart_version="$(sed -nE 's/^version:[[:space:]]*"?([^"]+)"?$/\1/p' "$chart" | head -n1)"
app_version="$(sed -nE 's/^appVersion:[[:space:]]*"?([^"]+)"?$/\1/p' "$chart" | head -n1)"

printf 'chart=%s appVersion=%s\n' "$chart_version" "$app_version"
rg -n -A14 '^cloudnative-pg:' "$values"

test "$chart_version" = "0.28.3"
test "$app_version" = "1.29.1"

if rg -n '^[[:space:]]+tag:[[:space:]]*"1\.28\.2"' "$values"; then
  echo "unexpected CloudNativePG 1.28.2 image override" >&2
  exit 1
fi

rg -n 'instanceID|sessionID|FileSystemResizePending' "$chart_dir" || true

Repository: cozystack/cozystack

Length of output: 1177


🌐 Web query:

cloudnative-pg charts v0.28.3 Chart.yaml appVersion

💡 Result:

In the cloudnative-pg Helm chart version 0.28.3, the appVersion defined in Chart.yaml is 1.29.1 [1]. This is confirmed by external technical documentation tracking the relationship between CNPG chart versions and their corresponding operator versions [1].

Citations:


🌐 Web query:

raw.githubusercontent.com cloudnative-pg charts cloudnative-pg-v0.28.3 Chart.yaml imageTag appVersion

💡 Result:

In the CloudNativePG Helm chart version 0.28.3, the appVersion defined in Chart.yaml is 1.29.0 [1]. By default, the Helm chart uses this appVersion as the image tag for the CloudNativePG operator container [2]. If a custom image tag is required, it can be overridden in the values.yaml file by setting the image.tag field, which defaults to an empty string (meaning it follows the appVersion) [2].

Citations:


🌐 Web query:

raw.githubusercontent.com cloudnative-pg/charts cloudnative-pg-v0.28.3 Chart.yaml cloudnative-pg Chart.yaml 0.28.3

💡 Result:

The CloudNativePG Helm chart version 0.28.3 was officially released on June 10, 2026 [1][2][3]. This release is part of the cloudnative-pg/charts repository [1][4]. The Chart.yaml file for this specific version defines the Helm chart metadata for the CloudNativePG operator [1][3]. Key details for the 0.28.3 release include: - Release Date: June 10, 2026 [1][2][3]. - Chart Version: 0.28.3 [1][3]. - Repository: https://github.com/cloudnative-pg/charts [1][4]. - Requirements: The chart requires Kubernetes version >=1.29.0-0 [5][3]. - Purpose: It is used to install the CloudNativePG operator, which manages PostgreSQL workloads on Kubernetes [3][6]. The Chart.yaml file typically contains fields such as apiVersion (v2), name (cloudnative-pg), description (CloudNativePG Operator Helm Chart), and appVersion (which tracks the operator application version) [5]. This release can be found in the official CloudNativePG Helm repository [6] and is mirrored by various third-party platforms [3][7][8].

Citations:


🏁 Script executed:

#!/usr/bin/env bash
set -u

chart="packages/system/postgres-operator/charts/cloudnative-pg/Chart.yaml"
values="packages/system/postgres-operator/values.yaml"

printf 'Chart metadata:\n'
sed -n '1,40p' "$chart"
printf '\nRelevant values.yaml section:\n'
sed -n '1,40p' "$values"
printf '\nSearch chart override template references:\n'
rg -n "image\.tag|AppVersion|cloudnative-pg" packages/system/postgres-operator -g '*.yaml' -g '*.yml' -g 'templates/**'

Repository: cozystack/cozystack

Length of output: 15772


Keep the CloudNativePG operator image aligned with the vendored CRDs.

values.yaml sets cloudnative-pg.image.tag to 1.28.2, but the local chart is still 0.27.1 with appVersion: 1.28.1. That deploys the 1.28.2 operator image with the 1.28.1 CRD set and does not satisfy the target chart/image pair.

Bring the vendored chart to 0.28.3 with appVersion: 1.29.1, then remove the image.tag override and its same-minor compatibility comments. If this intermediate stack must stay, add a guard that prevents deployment while cloudnative-pg.image.tag differs from charts/cloudnative-pg/Chart.yaml.appVersion.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/system/postgres-operator/values.yaml` around lines 4 - 16, Update
the vendored CloudNativePG chart metadata to chart version 0.28.3 with
appVersion 1.29.1, then remove the cloudnative-pg.image.tag override and its
associated same-minor compatibility comments from values.yaml. Ensure the
deployment uses the chart’s appVersion without introducing a mismatched image
tag.

Source: MCP tools

…C resize-deadlock fix

Raises the CloudNativePG operator image and its CRDs together to 1.28.2, which carries the PVC resize-deadlock fix (cloudnative-pg#9980 / #9981): after a simultaneous resources+size change the operator deletes the sole primary Pod, leaves the PVC in the resizing class, and never recreates the Pod, wedging the cluster.

Upstream publishes a chart only per minor .0/.1, so there is no 1.28.2 chart on the 1.28 line. Following #3526/#3528, patches/cloudnative-pg-1.28.2.patch (applied by make update) raises the vendored chart's appVersion and CRDs from 1.28.1 to 1.28.2 in lockstep; the operator image follows appVersion, so no image.tag pin. Verified #3479-safe: no CRD status field changes between 1.28.1 and 1.28.2 (only the extensions spec grows). Backportable to release-1.6.

Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
@scooby87
scooby87 force-pushed the feat/bump-cnpg-version branch from 443df4b to bcb3626 Compare August 4, 2026 14:31
@scooby87 scooby87 changed the title fix(postgres-operator): pin CNPG operator image to 1.28.2 for PVC resize-deadlock fix fix(postgres-operator): align CNPG operator and CRDs to 1.28.2 for PVC resize-deadlock fix Aug 4, 2026
@github-actions github-actions Bot added kind/bug Categorizes issue or PR as related to a bug size/L This PR changes 100-499 lines, ignoring generated files and removed size/S This PR changes 10-29 lines, ignoring generated files labels Aug 4, 2026

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/system/postgres-operator/Makefile`:
- Line 15: Remove the local patch application from the Makefile update workflow,
specifically the command applying cloudnative-pg-1.28.2.patch, so vendored chart
files remain verbatim. Use a supported upstream chart instead, or relocate
locally generated chart changes outside packages/**/charts/**; retain the
current workflow only after obtaining an explicit exception.

In `@packages/system/postgres-operator/tests/cnpg-version_test.yaml`:
- Around line 31-38: Update the CRD assertions in the test to select Cluster,
ImageCatalog, and ClusterImageCatalog by metadata.name rather than relying on
documentIndex. For each resource, assert a schema field added by the extensions,
including extensions, bin_path, or env, and verify that the extension image
field is not required where the patch removes that requirement; remove the
unchanged Backup status assertion.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 96617017-3143-4fdb-b376-9e63c4ee1c60

📥 Commits

Reviewing files that changed from the base of the PR and between 443df4b and bcb3626.

📒 Files selected for processing (6)
  • packages/system/postgres-operator/Makefile
  • packages/system/postgres-operator/charts/cloudnative-pg/Chart.yaml
  • packages/system/postgres-operator/charts/cloudnative-pg/templates/crds/crds.yaml
  • packages/system/postgres-operator/patches/cloudnative-pg-1.28.2.patch
  • packages/system/postgres-operator/tests/cnpg-version_test.yaml
  • packages/system/postgres-operator/values.yaml

helm repo update cnpg
helm pull cnpg/cloudnative-pg --untar --untardir charts --version 0.27.1
rm -rf charts/cloudnative-pg/charts
patch --no-backup-if-mismatch -p4 < patches/cloudnative-pg-1.28.2.patch

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.

📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift

Do not rewrite the vendored chart during make update.

Line 15 applies a local patch that changes charts/cloudnative-pg/Chart.yaml and charts/cloudnative-pg/templates/crds/crds.yaml. The vendored tree will no longer remain verbatim after make update.

Use an upstream chart or move locally owned chart generation outside packages/**/charts/**. If no supported alternative exists, obtain an explicit exception before retaining this workflow.

As per coding guidelines, files under packages/**/charts/** must remain verbatim and must not be edited directly.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/system/postgres-operator/Makefile` at line 15, Remove the local
patch application from the Makefile update workflow, specifically the command
applying cloudnative-pg-1.28.2.patch, so vendored chart files remain verbatim.
Use a supported upstream chart instead, or relocate locally generated chart
changes outside packages/**/charts/**; retain the current workflow only after
obtaining an explicit exception.

Source: Coding guidelines

Comment on lines +31 to +38
- documentIndex: 0
equal:
path: metadata.annotations["controller-gen.kubebuilder.io/version"]
value: v0.20.1
- documentIndex: 0
equal:
path: spec.versions[0].schema.openAPIV3Schema.properties.status.properties.instanceID.properties.sessionID.type
value: string

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.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Assert the extension schemas that this patch adds.

documentIndex: 0 selects the Backup CRD. This patch changes that document only through its controller-gen annotation. The assertion at Line 37 checks an unchanged status field. It does not inspect any new extensions, bin_path, env, or optional image schema.

Select Cluster, ImageCatalog, and ClusterImageCatalog by name. Assert at least one added schema field in each. Also assert that the extension image field is optional where this patch removes that requirement.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/system/postgres-operator/tests/cnpg-version_test.yaml` around lines
31 - 38, Update the CRD assertions in the test to select Cluster, ImageCatalog,
and ClusterImageCatalog by metadata.name rather than relying on documentIndex.
For each resource, assert a schema field added by the extensions, including
extensions, bin_path, or env, and verify that the extension image field is not
required where the patch removes that requirement; remove the unchanged Backup
status assertion.

@myasnikovdaniil myasnikovdaniil 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.

LGTM — the patch reproduces upstream 1.28.2 exactly, with no CRD/status skew.

Business context: single-instance Postgres clusters wedge with zero instances after a simultaneous resources+size change, because CNPG ≤1.28.1 classifies a FileSystemResizePending PVC as resizing even with no pod attached and so never recreates the primary.

What I checked: replaying make update (pristine chart 0.27.1 + the patch) yields a vendored tree byte-identical to this branch, and the result matches the official cnpg-1.28.2.yaml release manifest across all 10 CRDs, controller-gen v0.20.1 included. The #3479-safety claim holds — zero status field deltas 1.28.1 → 1.28.2, and every schema change is additive or relaxing (extensions.items.required drops image, bin_path/env added, extensions added to both ImageCatalog CRDs). Nothing else needed porting: the only non-CRD delta between the two upstream manifests is the image tag and the OPERATOR_IMAGE_NAME env that mirrors it — no RBAC, webhook or ConfigMap changes — so the 0.27.1 chart templates stay sufficient. The premise holds too: chart line 0.27.x ends at 0.27.1 (appVersion 1.28.1) and the next chart, 0.28.0, jumps to 1.29.0. tests/cnpg-version_test.yaml is mutation-proven in both directions: reverting only the CRDs fails it, and so does reverting only appVersion.

One aside — 1.28.2 also changes the operator's default PostgreSQL image to 18.3. Inert here, since every Cluster the platform renders pins imageName explicitly.

Two non-blocking follow-ups:

  1. values.yaml:17 still says native barmanObjectStore is "removed in 1.29", and this is the release that invalidates it — 1.28.2's own notes move the removal to 1.30.0 (cloudnative-pg#10167). The same claim sits in seven other files, so a repo-wide sweep can be separate, but the line in the file you are already touching is worth correcting.
  2. The CRD half of the new test asserts the controller-gen annotation as a proxy for the 1.28.2 schema, so a regenerated patch that got the annotation right and the schema wrong would still pass. One direct assertion — e.g. spec.postgresql.extensions.items.properties.bin_path on the clusters CRD — closes that. Keep the status.instanceID.sessionID assertion; it is the #3479 skew canary.

@myasnikovdaniil myasnikovdaniil added the backport Should change be backported on previous release label Aug 4, 2026
@myasnikovdaniil
myasnikovdaniil merged commit ee26a50 into main Aug 4, 2026
18 of 19 checks passed
@myasnikovdaniil
myasnikovdaniil deleted the feat/bump-cnpg-version branch August 4, 2026 15:09
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

@myasnikovdaniil myasnikovdaniil added the backport-previous Backport target — previous release line label Aug 17, 2026
@github-actions

Copy link
Copy Markdown

Created backport PR for release-1.5:

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-3510-to-release-1.5
git worktree add --checkout .worktree/backport-3510-to-release-1.5 backport-3510-to-release-1.5
cd .worktree/backport-3510-to-release-1.5
git reset --hard HEAD^
git cherry-pick -x bcb36262efa9f32e472d063871cf1e8af17f88e9
git push --force-with-lease

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/database Issues or PRs related to managed databases (postgres, mariadb, redis, etcd, kafka, clickhouse) backport Should change be backported on previous release backport-previous Backport target — previous release line kind/bug Categorizes issue or PR as related to a bug kind/cleanup Categorizes issue or PR as related to cleanup of code, process, or technical debt size/L This PR changes 100-499 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants