Skip to content

fix(helm-prereqs): make Patroni synchronous mode values-driven - #5096

Merged
jabdulvahid merged 1 commit into
NVIDIA:mainfrom
jabdulvahid:fix-single-instance-postgres
Aug 18, 2026
Merged

fix(helm-prereqs): make Patroni synchronous mode values-driven#5096
jabdulvahid merged 1 commit into
NVIDIA:mainfrom
jabdulvahid:fix-single-instance-postgres

Conversation

@jabdulvahid

Copy link
Copy Markdown
Contributor

Hardcoded synchronous_mode_strict deadlocks single-instance postgres clusters: with no standby to acknowledge commits, all writes block -- including the operator's own CREATE DATABASE, so the chart's databases are never created. Expose it as postgresql.synchronousMode (default true, production behavior unchanged).

The default lives in values.yaml rather than '| default true' in the template: Go templates treat an explicit false as empty, which would silently coerce it back to true.

Fixes #5095

Related issues

Type of Change

  • Add - New feature or capability
  • Change - Changes in existing functionality
  • Fix - Bug fixes
  • Remove - Removed features or deprecated functionality
  • Internal - Internal changes (refactoring, tests, docs, etc.)

Breaking Changes

  • This PR contains breaking changes

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Hardcoded synchronous_mode_strict deadlocks single-instance postgres
clusters: with no standby to acknowledge commits, all writes block --
including the operator's own CREATE DATABASE, so the chart's databases
are never created. Expose it as postgresql.synchronousMode (default
true, production behavior unchanged).

The default lives in values.yaml rather than '| default true' in the
template: Go templates treat an explicit false as empty, which would
silently coerce it back to true.

Fixes NVIDIA#5095
@jabdulvahid
jabdulvahid requested a review from shayan1995 August 18, 2026 13:59
@jabdulvahid
jabdulvahid requested a review from a team as a code owner August 18, 2026 13:59
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: cc568ec6-096d-4edf-8ac1-9356c4ddfc04

📥 Commits

Reviewing files that changed from the base of the PR and between 1ec08ca and 412652b.

📒 Files selected for processing (2)
  • helm-prereqs/templates/postgresql.yaml
  • helm-prereqs/values.yaml

Included review availability: Your plan includes up to 12 reviews per rolling hour; 11 remain after this review.


Summary by CodeRabbit

  • New Features
    • PostgreSQL synchronous replication can now be configured through deployment values.
    • Synchronous replication is enabled by default, with settings documented for single-instance development environments.

Walkthrough

The Helm chart adds postgresql.synchronousMode, defaults it to true, and uses it for Patroni synchronous replication settings. Deployments with one PostgreSQL instance can set it to false.

Changes

Patroni synchronous mode configuration

Layer / File(s) Summary
Values-driven synchronous mode
helm-prereqs/values.yaml, helm-prereqs/templates/postgresql.yaml
The chart defines postgresql.synchronousMode as true. The Patroni synchronous_mode and synchronous_mode_strict settings use this value. The comments document setting it to false for single-instance clusters.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 41265

The change makes Patroni synchronous mode configurable while preserving the existing production default, with no actionable merge-blocking risk remaining after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the chart fix: making Patroni synchronous mode values-driven.
Description check ✅ Passed The description explains the single-instance deadlock, configuration change, default behavior, and linked issue.
Linked Issues check ✅ Passed The changes satisfy issue #5095 by templating both Patroni synchronous settings and defining the default in values.yaml.
Out of Scope Changes check ✅ Passed All changes are limited to the requested Patroni configuration and its chart values documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@shayan1995 shayan1995 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

@jabdulvahid
jabdulvahid merged commit 2b33742 into NVIDIA:main Aug 18, 2026
65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: helm-prereqs/templates/postgresql.yaml hardcodes Patroni synchronous replication

2 participants