-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: multi dev branches #4023
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
base: main
Are you sure you want to change the base?
feat: multi dev branches #4023
Changes from all commits
52d9910
a57f206
de6c9a8
9a0a1a2
0c63420
851b6dc
51b0065
1d9a18b
09e766e
9d1bfdc
ab144c5
346431a
5721646
3967019
775d918
b178629
0c1d6cc
745efa6
f6b427d
e02787a
9b992c8
c3a7529
7b8bdc2
8bbd4c8
d53fcce
8feb4c8
bc15b9b
3d1493c
807ef77
0c10bda
6b97d9c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| "trigger.dev": patch | ||
| "@trigger.dev/core": patch | ||
| --- | ||
|
|
||
| Add support for dev branches to the webapp and CLI. This allows humans (and agents) to run multiple local dev servers simultaneously, with a separate dashboard for each one. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -255,8 +255,11 @@ function getClient() { | |
| queryPerformanceMonitor.onQuery("writer", log); | ||
| }); | ||
|
|
||
| // connect eagerly | ||
| client.$connect(); | ||
| // Connect eagerly, catch any exception and log | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NB change to db.server.tsThis was causing my tests to fail. This eager connect was trying to connect to localhost:5432 which doesn't exist in the CI env. This will still emit the error in prod without unnecessarily crashing processes. |
||
| // Prisma will connect on use anyway | ||
| client.$connect().catch((error) => { | ||
| logger.error("Failed to eagerly connect prisma client (writer)", { error }); | ||
| }); | ||
|
|
||
| console.log(`🔌 prisma client connected`); | ||
|
|
||
|
|
@@ -378,8 +381,11 @@ function getReplicaClient() { | |
| queryPerformanceMonitor.onQuery("replica", log); | ||
| }); | ||
|
|
||
| // connect eagerly | ||
| replicaClient.$connect(); | ||
| // Connect eagerly, catch any exception and log | ||
| // Prisma will connect on use anyway | ||
| replicaClient.$connect().catch((error) => { | ||
| logger.error("Failed to eagerly connect prisma client (replica)", { error }); | ||
| }); | ||
|
|
||
| console.log(`🔌 read replica connected`); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -215,7 +215,9 @@ export async function acceptInvite({ | |
| organization: invite.organization, | ||
| project, | ||
| type: "DEVELOPMENT", | ||
| isBranchableEnvironment: false, | ||
| // We set this true but no backfill (yet!?) so never used | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NB |
||
| // for dev environments | ||
| isBranchableEnvironment: true, | ||
| member, | ||
| prismaClient: tx, | ||
| }); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dev presence is now env-specific