-
-
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
1cc4c7d
8d9b644
21468dd
e4c7e92
a2a10a8
1a85c2f
c2c6d7e
009d3c6
01298e9
2913e11
4fa84f2
13e41b4
017dbe5
6acd813
8ceba56
6e6ee57
4f18510
c9ae913
bebc1de
4906967
826236f
3ef63ef
0e5e47a
1bc8710
8609d0a
aa0ed21
0195c39
363f033
218d393
545d26c
944ff03
f389672
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.
Member
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. @ericallam thoughts on this one? |
||
| // 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