Skip to content

[comp] Production Deploy#2776

Merged
Marfuen merged 2 commits intoreleasefrom
main
May 6, 2026
Merged

[comp] Production Deploy#2776
Marfuen merged 2 commits intoreleasefrom
main

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 6, 2026

This is an automated pull request to release the candidate branch into production, which will trigger a deployment.
It was created by the [Production PR] action.


Summary by cubic

Fixes Prisma TLS failures (P1011) by dropping the inlined RDS CA bundle and using Node’s default trust store, restoring DB connectivity through RDS Proxy in production. Also removes the bundle files and bumps @trycompai/db to 2.3.0.

  • Bug Fixes

    • Use Node trust store for Prisma TLS (no ssl.ca); keep hostname check skipped; resolves RDS Proxy chain validation errors.
    • Update Prisma clients in apps/app, apps/portal, and apps/framework-editor; PRISMA_ALLOW_INSECURE_TLS=1 remains an explicit opt-out.
    • Remove inlined RDS CA bundle and generation script; update tests to match.
  • Dependencies

    • Bump @trycompai/db to 2.3.0 and drop certs from published files.

Written for commit cd5046c. Summary will update on new commits.

github-actions Bot and others added 2 commits May 6, 2026 21:42
)

URGENT: production runtime fix. Staging is hitting:

  Error [PrismaClientKnownRequestError]
  Invalid `prisma.member.findFirst()` invocation
  Error opening a TLS connection: unable to get local issuer certificate
  code: 'P1011', driverAdapterError: TlsConnectionError

Cause: PR #2772 set `ssl.ca = RDS_CA_BUNDLE` in the prisma adapter, which
*replaces* Node's trust store rather than augmenting it. Our bundle only
contains the 108 RDS-specific regional self-signed CAs — it does NOT
contain Amazon Root CA 1, which is where AWS RDS Proxy chains terminate
(and which lives in Node's default Mozilla bundle). So the chain failed
to validate at runtime under the strict-TLS branch.

Why apps/app and apps/portal didn't trip this in earlier checks:
- The /auth route returned 200 because that codepath doesn't query the
  DB; it talks to apps/api over HTTP, and apps/api uses a different
  prisma client (Docker, NODE_EXTRA_CA_CERTS at OS level).
- DB-touching SSR routes (e.g., /[orgId]/overview) are exactly what the
  reported staging failure exercises.

Fix: drop the `ca:` field. Node's default trust store includes Amazon
Root CA 1, which is sufficient for chain validation against RDS Proxy.
Hostname check is still skipped (NLB topology — chain check still
rejects forged or wrong-CA certs). PRISMA_ALLOW_INSECURE_TLS=1 remains
the explicit insecure opt-out — the original Cubic finding fix is
preserved.

Files:
- packages/db/src/ssl-config.ts: drop RDS_CA_BUNDLE import + usage
- packages/db/src/client.test.ts: rewrite tests for new behavior (6 pass)
- apps/{app,portal,framework-editor}/prisma/client.ts: drop the ca: branch
- Delete: packages/db/{certs/rds-global-bundle.pem,src/rds-ca-bundle.ts,
  scripts/generate-ca-bundle-ts.mjs} and the inlined rds-ca-bundle.ts
  copies in apps/{app,portal,framework-editor}/prisma/ (~660KB removed)
- packages/db: 2.2.0 → 2.3.0 (also drops `certs` from `files` array)
- apps/api/prisma/client.ts: unchanged — Docker still uses
  NODE_EXTRA_CA_CERTS at OS level and that path is fine.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app (staging) Ready Ready Preview, Comment May 6, 2026 9:53pm
comp-framework-editor (staging) Ready Ready Preview, Comment May 6, 2026 9:53pm
portal (staging) Ready Ready Preview, Comment May 6, 2026 9:53pm

Request Review

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 12 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@Marfuen Marfuen merged commit 434c02c into release May 6, 2026
13 checks passed
@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.44.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants