Files
triggerdotdev--trigger.dev/package.json
T
Eric Allam b1b9321ad2 Job run performance improvements and adding "worker only" mode (#360)
* WIP job run performance improvements

- Added a `perf` tool to better measure job run performance under heavy load
- Removed `runFinished` job (not really needed)
- startQueuedRuns now uses a jobKey with replace
- Fixed an issue with ZodWorker when using jobKey

* Publish improvement docker images

* fixed the improvement docker publishing

* Downgrade back to prisma 4.16.0 because 5.1.x broke docker builds

* Changes to how queued runs work

- Split the worker into two different workers, one dedicated to performRunExecution
- Schedule performRunExecution in a single place, with a queue and using a round robin manually controlled concurrency
- Remove startQueuedRuns
- All runs are queued before they are started
- Setting the worker maxPoolSize to the same as the worker concurrency
- Starting to be able to split the docker image

* Remove queue name from startRun graphile job

* Make the prisma connection pool stuff configurable through env vars

* Hardcode (for now) the max concurrent runs limit

* Rewrite performRunExecution to be more performant

PerformRunExecutionV2:

- Does not create and manage jobRunExecution records
- Does not reimplement retrying, uses graphile worker retrying instead

I’ve kept around PerformRunExecutionV1 so this works when deploying. Definitely needs LOTS of testing

* Fix issues with cached tasks

- Limit the size of the cached tasks sent when executing a run, using the knapsack problem dynamic programming approach
- Actually USE the cached tasks in IO by using the idempotencyKey instead of the task ID
- Remove output from all logs
- Added a stress test job catalog

* Forgot to commit the logger updates

* Never log connectionString

* Login to docker hub to get around rate limits

* Add additional logging to the graphile workers

* Fix the *_ENABLED  env vars

* Allow adding and removing jobs to be done from the webapp

* Don’t set the job to failed if it’s being retried

* Deprecated queue options in the job and removed startPosition. Now using the job/env combo as the job queue name

* Dequeung jobs doesn’t check if the runner is initialized

* Fixed issues with retrying a run getting stuck on a cancelled task, and errors from parsing the results of dequeing a job

* Remove queued round robin thing that isn’t used anymore

* Added slack to job catalog

* Better forwards compat

* Added long delay

* Fixed lock file
2023-08-18 15:25:26 +01:00

69 lines
2.5 KiB
JSON

{
"name": "triggerdotdev",
"private": true,
"workspaces": [
"apps/*",
"packages/*",
"integrations/*"
],
"version": "0.0.1",
"scripts": {
"build": "turbo run build",
"build:force": "turbo run build --force",
"build:db:seed": "turbo run build:db:seed",
"db:migrate": "turbo run db:migrate:deploy generate",
"db:seed": "turbo run db:seed",
"db:studio": "turbo run db:studio",
"dev": "turbo run dev --parallel",
"i:dev": "infisical run -- turbo run dev --parallel",
"format": "prettier . --write --config prettier.config.js",
"generate": "turbo run generate",
"lint": "turbo run lint",
"docker": "docker-compose -p triggerdotdev-docker -f docker/docker-compose.yml up -d",
"docker:stop": "docker-compose -p triggerdotdev-docker -f docker/docker-compose.yml stop",
"dev:docker": "docker-compose -p triggerdotdev-dev-docker -f docker/dev-compose.yml up -d",
"dev:docker:stop": "docker-compose -p triggerdotdev-dev-docker -f docker/dev-compose.yml stop",
"test": "turbo run test",
"test:dev": "turbo run test:dev",
"start": "turbo run start",
"clean": "turbo run clean",
"clean:node_modules": "find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +",
"typecheck": "turbo run typecheck",
"test:e2e": "playwright test",
"test:e2e:dev": "turbo run test:e2e:dev",
"test:e2e:ci": "turbo run test:e2e:ci",
"setup": "turbo run generate db:migrate:force db:seed",
"env:pull": "turbo run env:pull",
"changeset:add": "changeset",
"changeset:version": "changeset version",
"changeset:release": "pnpm run build --filter \"@trigger.dev/*\" && changeset publish",
"changeset:next": "changeset pre enter next",
"changeset:normal": "changeset pre exit",
"clean:sourcemaps": "turbo run clean:sourcemaps",
"storybook": "turbo run storybook"
},
"devDependencies": {
"@manypkg/cli": "^0.19.2",
"@playwright/test": "^1.36.2",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.8",
"@trigger.dev/cli": "workspace:*",
"@trigger.dev/database": "workspace:*",
"@types/node": "18.17.1",
"autoprefixer": "^10.4.12",
"eslint-config-custom": "workspace:*",
"postcss": "^8.4.17",
"prettier": "^3.0.0",
"tailwindcss": "3.1.8",
"tsx": "^3.7.1",
"turbo": "^1.10.3",
"vite": "^4.1.1",
"vite-tsconfig-paths": "^4.0.5",
"vitest": "^0.28.4"
},
"packageManager": "pnpm@7.18.1",
"dependencies": {
"@changesets/cli": "^2.26.0",
"node-fetch": "2.6.x"
}
}