Skip to content

Commit 2fdac4c

Browse files
Marfuenclaude
andauthored
Mariano/fix strip sslmode from connection string (#2439)
* fix: strip sslmode from DATABASE_URL to avoid conflict with explicit ssl option PrismaPg receives both `sslmode=require` in the connection string and an explicit `ssl` option. This double-SSL configuration can cause intermittent connection failures on staging (ECS + RDS). Uses the URL API to safely remove the sslmode param instead of the old buggy regex approach. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: exclude test files from tsc compilation in packages/db The bun:test import in strip-ssl-mode.test.ts breaks the Docker build which uses tsc (not bun) to compile packages/db. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: remove redundant prisma generate from Docker build The @prisma/client is already generated by packages/db build step (generate-prisma-client-js.js). The second prisma generate in the API build step was redundant and failing with an empty error in Docker. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: update Trigger.dev extensions to copy entire schema directory Both customPrismaExtension.ts files (api + app) now copy the full multi-file schema directory instead of a single file. This ensures prisma generate sees all model files, not just the generator/datasource. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: update Trigger.dev CI workflows for Prisma v7 - App workflows: run generate-prisma-client-js.js first to populate @prisma/client before the app's prisma generate - API workflows: remove redundant prisma generate (already done by packages/db build step via generate-prisma-client-js.js) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0e4f4f2 commit 2fdac4c

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

.github/workflows/trigger-api-tasks-deploy-main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,10 @@ jobs:
3737
- name: Build DB package
3838
working-directory: ./packages/db
3939
run: bun run build
40-
- name: Copy model files to api schema dir and generate client
40+
- name: Copy model files to api schema dir
4141
working-directory: ./apps/api
4242
run: |
4343
find ../../packages/db/prisma/schema -name '*.prisma' ! -name 'schema.prisma' -exec cp {} prisma/schema/ \;
44-
bunx prisma generate --schema=prisma/schema
4544
- name: 🚀 Deploy Trigger.dev
4645
working-directory: ./apps/api
4746
timeout-minutes: 20

.github/workflows/trigger-api-tasks-deploy-release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,10 @@ jobs:
4343
working-directory: ./packages/db
4444
run: bun run build
4545

46-
- name: Copy model files to api schema dir and generate client
46+
- name: Copy model files to api schema dir
4747
working-directory: ./apps/api
4848
run: |
4949
find ../../packages/db/prisma/schema -name '*.prisma' ! -name 'schema.prisma' -exec cp {} prisma/schema/ \;
50-
bunx prisma generate --schema=prisma/schema
5150
5251
- name: 🚀 Deploy Trigger.dev
5352
working-directory: ./apps/api

.github/workflows/trigger-tasks-deploy-main.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ jobs:
3333
- name: Build Integration Platform package
3434
working-directory: ./packages/integration-platform
3535
run: bun run build
36-
- name: Copy schema to app and generate client
37-
working-directory: ./apps/app
36+
- name: Generate Prisma clients
3837
run: |
39-
mkdir -p prisma/schema
38+
cd packages/db && node scripts/generate-prisma-client-js.js
39+
cd ../..
40+
cd apps/app && mkdir -p prisma/schema
4041
find ../../packages/db/prisma/schema -name '*.prisma' ! -name 'schema.prisma' -exec cp {} prisma/schema/ \;
4142
bunx prisma generate --schema=prisma/schema
4243
- name: 🚀 Deploy Trigger.dev

.github/workflows/trigger-tasks-deploy-release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ jobs:
3939
working-directory: ./packages/integration-platform
4040
run: bun run build
4141

42-
- name: Copy schema to app and generate client
43-
working-directory: ./apps/app
42+
- name: Generate Prisma clients
4443
run: |
45-
mkdir -p prisma/schema
44+
cd packages/db && node scripts/generate-prisma-client-js.js
45+
cd ../..
46+
cd apps/app && mkdir -p prisma/schema
4647
find ../../packages/db/prisma/schema -name '*.prisma' ! -name 'schema.prisma' -exec cp {} prisma/schema/ \;
4748
bunx prisma generate --schema=prisma/schema
4849

0 commit comments

Comments
 (0)