Skip to content

feat: Add POSTGRES_SSL_MODE support for Postgres connection - #554

Merged
thesujai merged 3 commits into
mainfrom
feat/postgres-ssl-mode
Sep 3, 2026
Merged

feat: Add POSTGRES_SSL_MODE support for Postgres connection#554
thesujai merged 3 commits into
mainfrom
feat/postgres-ssl-mode

Conversation

@thesujai

@thesujai thesujai commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

feat: Add POSTGRES_SSL_MODE support for Postgres connection

Changes

feat: Add POSTGRES_SSL_MODE support for Postgres connection

How was this tested?

NA

Checklist

  • I have read the contributing guidelines
  • pnpm build, pnpm test, pnpm typecheck, pnpm lint:ci, and pnpm format:check pass locally
  • Tests added/updated where it makes sense
  • No hand-edits to generated code (packages/trueforge-sdk, .github/fern/openapi/openapi.json, docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge
  • Docs / .env.example updated if configuration or behavior changed

Note

Medium Risk
Changes how external/managed Postgres connections are established when SSL is enabled; misconfigured sslmode can prevent startup or DB connectivity, though the default remains unchanged.

Overview
Adds optional POSTGRES_SSL_MODE so distributed deployments can set Postgres TLS via the standard sslmode query parameter when the app builds the URL from POSTGRES_* (unset leaves behavior unchanged—no sslmode on the connection string). DATABASE_URL is still used as-is when set; this knob applies to the composed postgres://… path.

The server validates allowed modes (disable, prefer, require, verify-ca, verify-full, no-verify) at boot and fails fast on invalid values. Helm gains externalPostgres.sslMode, which sets POSTGRES_SSL_MODE for external Postgres only; docs are updated in .env.example, values.yaml, and a patch changeset.

Reviewed by Cursor Bugbot for commit 58aaff3. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 58aaff3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@truefoundry/trueforge Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8acb9cf. Configure here.

Comment thread packages/trueforge/src/db/postgres/ssl.ts Outdated
Comment thread packages/trueforge/src/config.ts Outdated
Comment thread packages/trueforge/src/db/postgres/ssl.ts Outdated
@thesujai
thesujai enabled auto-merge (squash) September 3, 2026 16:34
@thesujai
thesujai merged commit c65b813 into main Sep 3, 2026
9 checks passed
@thesujai
thesujai deleted the feat/postgres-ssl-mode branch September 3, 2026 16:39
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.

2 participants