Skip to content

Commit 33a9778

Browse files
committed
Initial work on upgrading to 6.14.0
Set the output to node_modules still to make it easier
1 parent 96243ef commit 33a9778

File tree

6 files changed

+151
-97
lines changed

6 files changed

+151
-97
lines changed

.cursor/rules/webapp.mdc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ alwaysApply: false
66

77
The main trigger.dev webapp, which powers it's API and dashboard and makes up the docker image that is produced as an OSS image, is a Remix 2.1.0 app that uses an express server, written in TypeScript. The following subsystems are either included in the webapp or are used by the webapp in another part of the monorepo:
88

9-
- `@trigger.dev/database` exports a Prisma 5.4.1 client that is used extensively in the webapp to access a PostgreSQL instance. The schema file is [schema.prisma](mdc:internal-packages/database/prisma/schema.prisma)
9+
- `@trigger.dev/database` exports a Prisma 6.14.0 client that is used extensively in the webapp to access a PostgreSQL instance. The schema file is [schema.prisma](mdc:internal-packages/database/prisma/schema.prisma)
1010
- `@trigger.dev/core` is a published package and is used to share code between the `@trigger.dev/sdk` and the webapp. It includes functionality but also a load of Zod schemas for data validation. When importing from `@trigger.dev/core` in the webapp, we never import the root `@trigger.dev/core` path, instead we favor one of the subpath exports that you can find in [package.json](mdc:packages/core/package.json)
1111
- `@internal/run-engine` has all the code needed to trigger a run and take it through it's lifecycle to completion.
1212
- `@trigger.dev/redis-worker` is a custom redis based background job/worker system that's used in the webapp and also used inside the run engine.
@@ -31,7 +31,10 @@ We originally the Trigger.dev "Run Engine" not as a single system, but just spre
3131
- The batch trigger API endpoint is [api.v1.tasks.batch.ts](mdc:apps/webapp/app/routes/api.v1.tasks.batch.ts)
3232
- Setup code for the prisma client is in [db.server.ts](mdc:apps/webapp/app/db.server.ts)
3333
- The run engine is configured in [runEngine.server.ts](mdc:apps/webapp/app/v3/runEngine.server.ts)
34-
- All the "services" that are found in app/v3/services/**/*.server.ts
34+
- All the "services" that are found in app/v3/services/\*_/_.server.ts
3535
- The code for the TaskEvent data, which is the otel data sent from tasks to our servers, is in both the [eventRepository.server.ts](mdc:apps/webapp/app/v3/eventRepository.server.ts) and also the [otlpExporter.server.ts](mdc:apps/webapp/app/v3/otlpExporter.server.ts). The otel endpoints which are hit from production and development otel exporters is [otel.v1.logs.ts](mdc:apps/webapp/app/routes/otel.v1.logs.ts) and [otel.v1.traces.ts](mdc:apps/webapp/app/routes/otel.v1.traces.ts)
36-
- We use "presenters" to move more complex loader code into a class, and you can find those are app/v3/presenters/**/*.server.ts
36+
- We use "presenters" to move more complex loader code into a class, and you can find those are app/v3/presenters/\*_/_.server.ts
3737

38+
- All the "services" that are found in app/v3/services/\*_/_.server.ts
39+
- The code for the TaskEvent data, which is the otel data sent from tasks to our servers, is in both the [eventRepository.server.ts](mdc:apps/webapp/app/v3/eventRepository.server.ts) and also the [otlpExporter.server.ts](mdc:apps/webapp/app/v3/otlpExporter.server.ts). The otel endpoints which are hit from production and development otel exporters is [otel.v1.logs.ts](mdc:apps/webapp/app/routes/otel.v1.logs.ts) and [otel.v1.traces.ts](mdc:apps/webapp/app/routes/otel.v1.traces.ts)
40+
- We use "presenters" to move more complex loader code into a class, and you can find those are app/v3/presenters/\*_/_.server.ts

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpm install
3838
COPY --from=pruner --chown=node:node /triggerdotdev/internal-packages/database/prisma/schema.prisma /triggerdotdev/internal-packages/database/prisma/schema.prisma
3939
# RUN pnpm add @prisma/client@5.1.1 -w
4040
ENV NPM_CONFIG_IGNORE_WORKSPACE_ROOT_CHECK true
41-
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpx prisma@5.4.1 generate --schema /triggerdotdev/internal-packages/database/prisma/schema.prisma
41+
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store pnpx prisma@6.14.0 generate --schema /triggerdotdev/internal-packages/database/prisma/schema.prisma
4242

4343
## Builder (builds the webapp)
4444
FROM base AS builder

internal-packages/database/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",
77
"dependencies": {
8-
"@prisma/client": "5.4.1"
8+
"@prisma/client": "6.14.0"
99
},
1010
"devDependencies": {
11-
"prisma": "5.4.1",
11+
"prisma": "6.14.0",
1212
"rimraf": "6.0.1"
1313
},
1414
"scripts": {

internal-packages/database/prisma/schema.prisma

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ datasource db {
66

77
generator client {
88
provider = "prisma-client-js"
9+
output = "../node_modules/.prisma/client"
910
binaryTargets = ["native", "debian-openssl-1.1.x"]
10-
previewFeatures = ["tracing", "metrics"]
11+
previewFeatures = ["metrics"]
1112
}
1213

1314
model User {

0 commit comments

Comments
 (0)