-
Notifications
You must be signed in to change notification settings - Fork 282
[comp] Production Deploy #2406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
[comp] Production Deploy #2406
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
8b8e2fc
chore: merge release v3.13.1 back to main [skip ci]
github-actions[bot] 90283b6
chore: update error logs for GCP
github-actions[bot] f461c4d
fix(company): make Access Request form options in Documents (#2369)
github-actions[bot] 0586dfe
fix(app): comment button gets disabled with numbered formatting (#2368)
github-actions[bot] b824384
chore(email): remove unused next dependency (#2407)
Marfuen 645dd48
chore(deps-dev): bump electron (#2345)
dependabot[bot] 12e5e3a
fix: Enable 'Ready for Review' menu for client on Document Finding (#…
github-actions[bot] a04c486
feat: remove Ramp integration entirely
tofikwest 3d6d1d4
fix: handle stale Ramp sync provider in legacy orgs
tofikwest a3313cd
fix: scope stale provider cleanup to ramp only
tofikwest da6ab06
Merge pull request #2408 from trycompai/tofik/remove-ramp-integration
tofikwest 67aacf5
fix(portal): remove getJwtToken and use session-cookie auth directly
chasprowebdev 52d5288
Merge pull request #2413 from trycompai/chas/portal-submit-error
tofikwest ffb260b
fix(auth): make Microsoft OAuth tenantId configurable via env var (#2…
paradoxbound 30516d4
feat(app, api, framework-editor): restructure compliance app and add …
github-actions[bot] 59e0db9
feat: migrate prisma from v6 to v7
github-actions[bot] 3e29382
fix(db): use process.env fallback for DATABASE_URL in prisma.config.t…
github-actions[bot] 977a705
fix: use process.env fallback for DATABASE_URL in all prisma.config.t…
github-actions[bot] 451c6a1
fix: add SSL support to PrismaPg adapter for RDS/staging (rejectUnaut…
github-actions[bot] f688334
fix: set trigger.dev runtime to node-22 (Prisma v7 requires node >=20…
github-actions[bot] 00e6f13
fix: strip sslmode from connection string before passing to pg (preve…
github-actions[bot] 8a05e29
fix(db): point prisma.config.ts to schema directory for multi-file sc…
Marfuen 13a7b77
fix(api): pin prisma@7.6.0 in Dockerfile generate step (prevents stal…
github-actions[bot] dc9351c
fix(api): upgrade Dockerfile base images for Prisma v7 Node.js requir…
Marfuen a98cf93
fix(db): remove dotenv/config import from prisma.config.ts (not avail…
Marfuen fab6693
fix: use installed prisma binary instead of bunx (fixes prisma/config…
Marfuen c58045f
refactor: simplify prisma schema sharing using native v7 multi-file s…
github-actions[bot] 98213f8
fix: default to SSL for non-localhost connections, remove buggy clean…
github-actions[bot] 863f14b
fix: use AWS RDS CA bundle for proper SSL verification, simplify clie…
Marfuen 772ac48
fix: install ca-certificates before wget, clean apt after download (#…
Marfuen b7b7944
fix: install ca-certificates before wget, clean apt after download (#…
github-actions[bot] 335dcd2
fix: strip sslmode from DATABASE_URL to avoid conflict with explicit …
Marfuen 64e7e0a
[dev] [Marfuen] mariano/fix-strip-sslmode-from-connection-string (#2436)
github-actions[bot] cf9990b
[dev] [Marfuen] mariano/fix-strip-sslmode-from-connection-string (#2437)
github-actions[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,27 @@ | ||
| import { PrismaClient } from '@prisma/client'; | ||
| import { PrismaPg } from '@prisma/adapter-pg'; | ||
|
|
||
| const globalForPrisma = global as unknown as { prisma: PrismaClient }; | ||
|
|
||
| export const db = globalForPrisma.prisma || new PrismaClient(); | ||
| function stripSslMode(connectionString: string): string { | ||
| const url = new URL(connectionString); | ||
| url.searchParams.delete('sslmode'); | ||
| return url.toString(); | ||
| } | ||
|
|
||
| function createPrismaClient(): PrismaClient { | ||
| const rawUrl = process.env.DATABASE_URL!; | ||
| const isLocalhost = /localhost|127\.0\.0\.1|::1/.test(rawUrl); | ||
| // Use verified SSL when NODE_EXTRA_CA_CERTS is set (Docker with RDS CA bundle), | ||
| // otherwise fall back to unverified SSL (Trigger.dev, Vercel, other environments). | ||
| const hasCABundle = !!process.env.NODE_EXTRA_CA_CERTS; | ||
| const ssl = isLocalhost ? undefined : hasCABundle ? true : { rejectUnauthorized: false }; | ||
| // Strip sslmode from the connection string to avoid conflicts with the explicit ssl option | ||
| const url = ssl !== undefined ? stripSslMode(rawUrl) : rawUrl; | ||
| const adapter = new PrismaPg({ connectionString: url, ssl }); | ||
| return new PrismaClient({ adapter }); | ||
| } | ||
cursor[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| export const db = globalForPrisma.prisma || createPrismaClient(); | ||
|
|
||
| if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = db; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| generator client { | ||
| provider = "prisma-client-js" | ||
| previewFeatures = ["postgresqlExtensions"] | ||
| } | ||
|
|
||
| datasource db { | ||
| provider = "postgresql" | ||
| extensions = [pgcrypto] | ||
| } | ||
cursor[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.