diff --git a/.changeset/redis-worker-oldest-message-age.md b/.changeset/redis-worker-oldest-message-age.md deleted file mode 100644 index f5f86f76e7f..00000000000 --- a/.changeset/redis-worker-oldest-message-age.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@trigger.dev/redis-worker": patch ---- - -Add a `redis_worker.queue.oldest_message_age` observable gauge (unit `ms`, labeled `worker_name`) reporting the age of the oldest overdue message in each queue. This is a generic queue-stall signal: it stays at 0 while a queue drains healthily and rises only when due work sits undrained (e.g. a blocked dequeue, a dead consumer, or backpressure), even when no items are being processed. Orphaned queue entries are resolved against the items hash so they don't report a phantom stall. Also exposes `SimpleQueue.oldestMessageAge()`. diff --git a/.changeset/tidy-exec-arg-logging.md b/.changeset/tidy-exec-arg-logging.md deleted file mode 100644 index 6f96d23ff13..00000000000 --- a/.changeset/tidy-exec-arg-logging.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@trigger.dev/core": patch ---- - -Redact credential-bearing flag values (e.g. `--password`, `--token`) from `Exec` command debug logs diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index 6fd2f73b4ab..2e6fc8ab38e 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -8,7 +8,7 @@ permissions: jobs: code-quality: - runs-on: ubuntu-latest + runs-on: blacksmith-2vcpu-ubuntu-2404 steps: - name: ⬇️ Checkout repo diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0cac7c8595f..a150833d508 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -20,7 +20,7 @@ permissions: jobs: check-broken-links: - runs-on: ubuntu-latest + runs-on: blacksmith-2vcpu-ubuntu-2404 defaults: run: working-directory: ./docs diff --git a/.github/workflows/e2e-webapp-auth-full.yml b/.github/workflows/e2e-webapp-auth-full.yml index de9d66c07e9..f92d6a78865 100644 --- a/.github/workflows/e2e-webapp-auth-full.yml +++ b/.github/workflows/e2e-webapp-auth-full.yml @@ -37,7 +37,7 @@ on: jobs: e2eAuthFull: name: "🛡️ E2E Auth Tests (full)" - runs-on: ubuntu-latest + runs-on: blacksmith-8vcpu-ubuntu-2404 timeout-minutes: 30 env: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} diff --git a/.github/workflows/e2e-webapp.yml b/.github/workflows/e2e-webapp.yml index f306a86cd28..f5eafe5e380 100644 --- a/.github/workflows/e2e-webapp.yml +++ b/.github/workflows/e2e-webapp.yml @@ -14,7 +14,7 @@ on: jobs: e2eTests: name: "🧪 E2E Tests: Webapp" - runs-on: ubuntu-latest + runs-on: blacksmith-8vcpu-ubuntu-2404 timeout-minutes: 20 env: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index a70f0400e0a..95ee9368d9c 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest] + os: [blacksmith-4vcpu-ubuntu-2404, blacksmith-4vcpu-windows-2025] package-manager: ["npm", "pnpm"] steps: - name: ⬇️ Checkout repo diff --git a/.github/workflows/helm-prerelease.yml b/.github/workflows/helm-prerelease.yml index afdb26fb6a2..b806d9396e5 100644 --- a/.github/workflows/helm-prerelease.yml +++ b/.github/workflows/helm-prerelease.yml @@ -28,7 +28,7 @@ env: jobs: lint-and-test: - runs-on: ubuntu-latest + runs-on: blacksmith-2vcpu-ubuntu-2404 permissions: contents: read steps: @@ -77,7 +77,7 @@ jobs: ((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || github.event_name == 'push' || github.event_name == 'workflow_dispatch') - runs-on: ubuntu-latest + runs-on: blacksmith-4vcpu-ubuntu-2404 permissions: contents: read packages: write diff --git a/.github/workflows/publish-webapp.yml b/.github/workflows/publish-webapp.yml index 5a604e26082..b3d0ac4f0e9 100644 --- a/.github/workflows/publish-webapp.yml +++ b/.github/workflows/publish-webapp.yml @@ -38,7 +38,7 @@ on: jobs: publish: - runs-on: ubuntu-latest + runs-on: blacksmith-8vcpu-ubuntu-2404 env: PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING: 1 outputs: diff --git a/.github/workflows/publish-worker-v4.yml b/.github/workflows/publish-worker-v4.yml index 85ca903a8d6..5fbe7cc2cec 100644 --- a/.github/workflows/publish-worker-v4.yml +++ b/.github/workflows/publish-worker-v4.yml @@ -37,7 +37,7 @@ jobs: strategy: matrix: package: [supervisor] - runs-on: ubuntu-latest + runs-on: blacksmith-8vcpu-ubuntu-2404 env: DOCKER_BUILDKIT: "1" steps: diff --git a/.github/workflows/publish-worker.yml b/.github/workflows/publish-worker.yml index f443e5dab1e..bff01652d1f 100644 --- a/.github/workflows/publish-worker.yml +++ b/.github/workflows/publish-worker.yml @@ -33,7 +33,7 @@ jobs: strategy: matrix: package: [coordinator, docker-provider, kubernetes-provider] - runs-on: ubuntu-latest + runs-on: blacksmith-8vcpu-ubuntu-2404 env: DOCKER_BUILDKIT: "1" DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} diff --git a/.github/workflows/sdk-compat.yml b/.github/workflows/sdk-compat.yml index 1510af23181..e8cd6659d66 100644 --- a/.github/workflows/sdk-compat.yml +++ b/.github/workflows/sdk-compat.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest] + os: [blacksmith-4vcpu-ubuntu-2404] node: ["20.20", "22.12"] steps: @@ -54,7 +54,7 @@ jobs: bun-compat: name: "Bun Runtime" - runs-on: ubuntu-latest + runs-on: blacksmith-4vcpu-ubuntu-2404 steps: - name: ⬇️ Checkout repo uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -96,7 +96,7 @@ jobs: deno-compat: name: "Deno Runtime" - runs-on: ubuntu-latest + runs-on: blacksmith-4vcpu-ubuntu-2404 steps: - name: ⬇️ Checkout repo uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -142,7 +142,7 @@ jobs: cloudflare-compat: name: "Cloudflare Workers" - runs-on: ubuntu-latest + runs-on: blacksmith-4vcpu-ubuntu-2404 steps: - name: ⬇️ Checkout repo uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/.github/workflows/trivy-image-webapp.yml b/.github/workflows/trivy-image-webapp.yml index 7dae65ef2bf..8198919af95 100644 --- a/.github/workflows/trivy-image-webapp.yml +++ b/.github/workflows/trivy-image-webapp.yml @@ -33,7 +33,7 @@ concurrency: jobs: scan: name: Scan - runs-on: ubuntu-latest + runs-on: blacksmith-2vcpu-ubuntu-2404 permissions: contents: read packages: read # pull the image from GHCR diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index 91ec46f3a9a..63a9144bac9 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -8,7 +8,7 @@ permissions: jobs: typecheck: - runs-on: ubuntu-latest + runs-on: blacksmith-8vcpu-ubuntu-2404 steps: - name: ⬇️ Checkout repo diff --git a/.github/workflows/unit-tests-internal.yml b/.github/workflows/unit-tests-internal.yml index 5a0e5622159..b31cc08ba06 100644 --- a/.github/workflows/unit-tests-internal.yml +++ b/.github/workflows/unit-tests-internal.yml @@ -14,7 +14,7 @@ on: jobs: unitTests: name: "🧪 Unit Tests: Internal" - runs-on: ubuntu-latest + runs-on: blacksmith-8vcpu-ubuntu-2404 strategy: # one flaky shard shouldn't cancel its siblings - lets us re-run only the failed shard fail-fast: false @@ -130,7 +130,7 @@ jobs: name: "📊 Merge Reports" if: ${{ !cancelled() }} needs: [unitTests] - runs-on: ubuntu-latest + runs-on: blacksmith-2vcpu-ubuntu-2404 steps: - name: ⬇️ Checkout repo uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/.github/workflows/unit-tests-packages.yml b/.github/workflows/unit-tests-packages.yml index 1102864c454..8ffb72af237 100644 --- a/.github/workflows/unit-tests-packages.yml +++ b/.github/workflows/unit-tests-packages.yml @@ -14,7 +14,7 @@ on: jobs: unitTests: name: "🧪 Unit Tests: Packages" - runs-on: ubuntu-latest + runs-on: blacksmith-4vcpu-ubuntu-2404 strategy: # one flaky shard shouldn't cancel its siblings - lets us re-run only the failed shard fail-fast: false @@ -130,7 +130,7 @@ jobs: name: "📊 Merge Reports" if: ${{ !cancelled() }} needs: [unitTests] - runs-on: ubuntu-latest + runs-on: blacksmith-2vcpu-ubuntu-2404 steps: - name: ⬇️ Checkout repo uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/.github/workflows/unit-tests-webapp.yml b/.github/workflows/unit-tests-webapp.yml index 8566014c49d..b0e9b0fb4dc 100644 --- a/.github/workflows/unit-tests-webapp.yml +++ b/.github/workflows/unit-tests-webapp.yml @@ -14,7 +14,7 @@ on: jobs: unitTests: name: "🧪 Unit Tests: Webapp" - runs-on: ubuntu-latest + runs-on: blacksmith-8vcpu-ubuntu-2404 strategy: # one flaky shard shouldn't cancel its siblings - lets us re-run only the failed shard fail-fast: false @@ -139,7 +139,7 @@ jobs: name: "📊 Merge Reports" if: ${{ !cancelled() }} needs: [unitTests] - runs-on: ubuntu-latest + runs-on: blacksmith-2vcpu-ubuntu-2404 steps: - name: ⬇️ Checkout repo uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/.github/workflows/workflow-checks.yml b/.github/workflows/workflow-checks.yml index 797320a3138..ebd963497ce 100644 --- a/.github/workflows/workflow-checks.yml +++ b/.github/workflows/workflow-checks.yml @@ -24,7 +24,7 @@ concurrency: jobs: actionlint: name: Actionlint - runs-on: ubuntu-latest + runs-on: blacksmith-2vcpu-ubuntu-2404 permissions: contents: read steps: @@ -43,7 +43,7 @@ jobs: # variable to 'false' to skip this job where code scanning isn't available; # leave it unset (the default) to run the scan. if: ${{ vars.ENABLE_WORKFLOW_SECURITY_SCAN != 'false' }} - runs-on: ubuntu-latest + runs-on: blacksmith-2vcpu-ubuntu-2404 permissions: security-events: write # Upload SARIF to GitHub Security tab contents: read # Read workflow files for analysis diff --git a/.oxlintrc.json b/.oxlintrc.json index 6992bd7b8e5..f142ff1e7f9 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -11,13 +11,23 @@ "internal-packages/tsql/src/grammar/" ], "rules": { - "no-unused-vars": "off", + "no-unused-vars": [ + "error", + { + "args": "all", + "argsIgnorePattern": "^_", + "varsIgnorePattern": "^_", + "caughtErrors": "all", + "caughtErrorsIgnorePattern": "^_", + "destructuredArrayIgnorePattern": "^_" + } + ], "no-empty-pattern": "off", "no-control-regex": "off", "typescript/no-non-null-asserted-optional-chain": "off", "no-unused-expressions": ["warn", { "allowShortCircuit": true, "allowTernary": true }], - "typescript/consistent-type-imports": "off", - "import/no-duplicates": "off", + "typescript/consistent-type-imports": "error", + "import/no-duplicates": "error", "import/namespace": "off", "react-hooks/exhaustive-deps": "off", "react-hooks/rules-of-hooks": "off" diff --git a/.server-changes/conform-v1.md b/.server-changes/conform-v1.md deleted file mode 100644 index 5e187829460..00000000000 --- a/.server-changes/conform-v1.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -area: webapp -type: improvement ---- - -Upgrade the dashboard form layer from `@conform-to` 0.9 to 1.x. conform 1.x supports both zod 3 and zod 4, which unblocks the upcoming zod 4 upgrade. diff --git a/apps/coordinator/src/checkpointer.ts b/apps/coordinator/src/checkpointer.ts index 11b961c37f1..b864d78095d 100644 --- a/apps/coordinator/src/checkpointer.ts +++ b/apps/coordinator/src/checkpointer.ts @@ -334,7 +334,7 @@ export class Checkpointer { try { await setTimeout(delayMs, undefined, { signal }); - } catch (error) { + } catch (_error) { this.#logger.log("Checkpoint canceled during initial delay", { runId }); return { success: false, reason: "CANCELED" }; } @@ -364,7 +364,7 @@ export class Checkpointer { try { await setTimeout(delay.milliseconds, undefined, { signal }); - } catch (error) { + } catch (_error) { this.#logger.log("Checkpoint canceled during retry delay", { runId }); return { success: false, reason: "CANCELED" }; } diff --git a/apps/coordinator/src/exec.ts b/apps/coordinator/src/exec.ts index b905723c0f8..ca6d3dcd101 100644 --- a/apps/coordinator/src/exec.ts +++ b/apps/coordinator/src/exec.ts @@ -208,7 +208,7 @@ export class Buildah { try { await x("buildah", ["login", "--get-login", registryHost], { throwOnError: true }); return true; - } catch (error) { + } catch (_error) { return false; } } diff --git a/apps/coordinator/src/index.ts b/apps/coordinator/src/index.ts index 815012fe048..7ffc7dcafb0 100644 --- a/apps/coordinator/src/index.ts +++ b/apps/coordinator/src/index.ts @@ -1,5 +1,6 @@ import { createServer } from "node:http"; import { Server } from "socket.io"; +import type { WaitReason } from "@trigger.dev/core/v3"; import { CoordinatorToPlatformMessages, CoordinatorToProdWorkerMessages, @@ -7,7 +8,6 @@ import { PlatformToCoordinatorMessages, ProdWorkerSocketData, ProdWorkerToCoordinatorMessages, - WaitReason, } from "@trigger.dev/core/v3"; import { ZodNamespace } from "@trigger.dev/core/v3/zodNamespace"; import { ZodSocketConnection } from "@trigger.dev/core/v3/zodSocket"; @@ -423,7 +423,7 @@ class TaskCoordinator { next(); }, - onConnection: async (socket, handler, sender) => { + onConnection: async (socket, _handler, _sender) => { const logger = new SimpleStructuredLogger("ns-prod-worker", undefined, { namespace: "prod-worker", socketId: socket.id, @@ -1456,7 +1456,7 @@ class TaskCoordinator { } }); }, - onDisconnect: async (socket, handler, sender, logger) => { + onDisconnect: async (socket, _handler, _sender, logger) => { try { this.#platformSocket?.send("LOG", { metadata: socket.data, @@ -1529,7 +1529,7 @@ class TaskCoordinator { } }); - httpServer.on("clientError", (err, socket) => { + httpServer.on("clientError", (_err, socket) => { socket.end("HTTP/1.1 400 Bad Request\r\n\r\n"); }); @@ -1760,7 +1760,7 @@ class TaskCoordinator { } }); - httpServer.on("clientError", (err, socket) => { + httpServer.on("clientError", (_err, socket) => { socket.end("HTTP/1.1 400 Bad Request\r\n\r\n"); }); diff --git a/apps/coordinator/src/util.ts b/apps/coordinator/src/util.ts index 18464f230b6..649eb3000af 100644 --- a/apps/coordinator/src/util.ts +++ b/apps/coordinator/src/util.ts @@ -25,7 +25,7 @@ export function safeJsonParse(json?: string): unknown { try { return JSON.parse(json); - } catch (e) { + } catch (_e) { return null; } } diff --git a/apps/docker-provider/src/index.ts b/apps/docker-provider/src/index.ts index a0b0554fb23..65b41a8520a 100644 --- a/apps/docker-provider/src/index.ts +++ b/apps/docker-provider/src/index.ts @@ -1,16 +1,14 @@ import { $, type ExecaChildProcess, execa } from "execa"; -import { - ProviderShell, +import type { TaskOperations, TaskOperationsCreateOptions, TaskOperationsIndexOptions, TaskOperationsRestoreOptions, } from "@trigger.dev/core/v3/apps"; -import { SimpleLogger } from "@trigger.dev/core/v3/apps"; -import { isExecaChildProcess } from "@trigger.dev/core/v3/apps"; +import { ProviderShell, SimpleLogger, isExecaChildProcess } from "@trigger.dev/core/v3/apps"; import { testDockerCheckpoint } from "@trigger.dev/core/v3/serverOnly"; import { setTimeout } from "node:timers/promises"; -import { PostStartCauses, PreStopCauses } from "@trigger.dev/core/v3"; +import type { PostStartCauses, PreStopCauses } from "@trigger.dev/core/v3"; const MACHINE_NAME = process.env.MACHINE_NAME || "local"; const COORDINATOR_PORT = process.env.COORDINATOR_PORT || 8020; @@ -192,7 +190,7 @@ class DockerTaskOperations implements TaskOperations { logger.log("noop: delete"); } - async get(opts: { runId: string }) { + async get(_opts: { runId: string }) { await this.init(); logger.log("noop: get"); diff --git a/apps/kubernetes-provider/src/index.ts b/apps/kubernetes-provider/src/index.ts index 23a6ad56ce3..82c1b026282 100644 --- a/apps/kubernetes-provider/src/index.ts +++ b/apps/kubernetes-provider/src/index.ts @@ -1,19 +1,18 @@ import * as k8s from "@kubernetes/client-node"; -import { +import type { EnvironmentType, MachinePreset, PostStartCauses, PreStopCauses, } from "@trigger.dev/core/v3"; -import { - ProviderShell, - SimpleLogger, +import type { TaskOperations, TaskOperationsCreateOptions, TaskOperationsIndexOptions, TaskOperationsPrePullDeploymentOptions, TaskOperationsRestoreOptions, } from "@trigger.dev/core/v3/apps"; +import { ProviderShell, SimpleLogger } from "@trigger.dev/core/v3/apps"; import { PodCleaner } from "./podCleaner"; import { TaskMonitor } from "./taskMonitor"; import { UptimeHeartbeat } from "./uptimeHeartbeat"; diff --git a/apps/kubernetes-provider/src/labelHelper.ts b/apps/kubernetes-provider/src/labelHelper.ts index 98cd3d68be4..487ab143a31 100644 --- a/apps/kubernetes-provider/src/labelHelper.ts +++ b/apps/kubernetes-provider/src/labelHelper.ts @@ -40,7 +40,7 @@ export class CustomLabelHelper { return key.toLowerCase().startsWith(prefix) && !this.isLabelSampleRateEnvVar(key); } - private getSampleRateEnvVarKey(type: OperationType, envKey: string) { + private getSampleRateEnvVarKey(_type: OperationType, envKey: string) { return `${envKey.toLowerCase()}${this.getLabelSampleRatePostfix()}`; } diff --git a/apps/kubernetes-provider/src/taskMonitor.ts b/apps/kubernetes-provider/src/taskMonitor.ts index 3fefc04a2ed..1b9a93b4624 100644 --- a/apps/kubernetes-provider/src/taskMonitor.ts +++ b/apps/kubernetes-provider/src/taskMonitor.ts @@ -1,6 +1,9 @@ import * as k8s from "@kubernetes/client-node"; -import { SimpleLogger } from "@trigger.dev/core/v3/apps"; -import { EXIT_CODE_ALREADY_HANDLED, EXIT_CODE_CHILD_NONZERO } from "@trigger.dev/core/v3/apps"; +import { + SimpleLogger, + EXIT_CODE_ALREADY_HANDLED, + EXIT_CODE_CHILD_NONZERO, +} from "@trigger.dev/core/v3/apps"; import { setTimeout } from "timers/promises"; import PQueue from "p-queue"; import { TaskRunErrorCodes, type Prettify, type TaskRunInternalError } from "@trigger.dev/core/v3"; diff --git a/apps/supervisor/src/clients/kubernetes.ts b/apps/supervisor/src/clients/kubernetes.ts index 129ff32b6ec..f4f4a2384ca 100644 --- a/apps/supervisor/src/clients/kubernetes.ts +++ b/apps/supervisor/src/clients/kubernetes.ts @@ -1,8 +1,6 @@ import * as https from "node:https"; import * as k8s from "@kubernetes/client-node"; -import { Informer } from "@kubernetes/client-node"; -import { ListPromise } from "@kubernetes/client-node"; -import { KubernetesObject } from "@kubernetes/client-node"; +import type { Informer, ListPromise, KubernetesObject } from "@kubernetes/client-node"; import { assertExhaustive } from "@trigger.dev/core/utils"; import { SimpleStructuredLogger } from "@trigger.dev/core/v3/utils/structuredLogger"; diff --git a/apps/supervisor/src/index.ts b/apps/supervisor/src/index.ts index 833448ad873..285cffe79d8 100644 --- a/apps/supervisor/src/index.ts +++ b/apps/supervisor/src/index.ts @@ -90,11 +90,11 @@ class ManagedSupervisor { // Strip secret-like env vars before debug-logging the rest. Add any new // secret env var here so it never lands in the DEBUG "Starting up" log. const { - TRIGGER_WORKER_TOKEN, - MANAGED_WORKER_SECRET, - COMPUTE_GATEWAY_AUTH_TOKEN, - DOCKER_REGISTRY_PASSWORD, - TRIGGER_DEQUEUE_BACKPRESSURE_REDIS_PASSWORD, + TRIGGER_WORKER_TOKEN: _TRIGGER_WORKER_TOKEN, + MANAGED_WORKER_SECRET: _MANAGED_WORKER_SECRET, + COMPUTE_GATEWAY_AUTH_TOKEN: _COMPUTE_GATEWAY_AUTH_TOKEN, + DOCKER_REGISTRY_PASSWORD: _DOCKER_REGISTRY_PASSWORD, + TRIGGER_DEQUEUE_BACKPRESSURE_REDIS_PASSWORD: _TRIGGER_DEQUEUE_BACKPRESSURE_REDIS_PASSWORD, ...envWithoutSecrets } = env; diff --git a/apps/supervisor/src/services/failedPodHandler.test.ts b/apps/supervisor/src/services/failedPodHandler.test.ts index 4dbfda16f43..110e5806442 100644 --- a/apps/supervisor/src/services/failedPodHandler.test.ts +++ b/apps/supervisor/src/services/failedPodHandler.test.ts @@ -14,7 +14,7 @@ describe.skipIf(!process.env.K8S_INTEGRATION_TESTS)("FailedPodHandler Integratio // Create the test namespace if it doesn't exist try { await k8s.core.readNamespace({ name: namespace }); - } catch (error) { + } catch (_error) { await k8s.core.createNamespace({ body: { metadata: { diff --git a/apps/supervisor/src/services/failedPodHandler.ts b/apps/supervisor/src/services/failedPodHandler.ts index 3d56c92b213..af48ecda713 100644 --- a/apps/supervisor/src/services/failedPodHandler.ts +++ b/apps/supervisor/src/services/failedPodHandler.ts @@ -1,8 +1,9 @@ import { LogLevel, SimpleStructuredLogger } from "@trigger.dev/core/v3/utils/structuredLogger"; -import { K8sApi } from "../clients/kubernetes.js"; +import type { K8sApi } from "../clients/kubernetes.js"; import { createK8sApi } from "../clients/kubernetes.js"; -import { Informer, V1Pod } from "@kubernetes/client-node"; -import { Counter, Registry, Histogram } from "prom-client"; +import type { Informer, V1Pod } from "@kubernetes/client-node"; +import type { Registry } from "prom-client"; +import { Counter, Histogram } from "prom-client"; import { register } from "../metrics.js"; import { setTimeout } from "timers/promises"; diff --git a/apps/supervisor/src/services/podCleaner.test.ts b/apps/supervisor/src/services/podCleaner.test.ts index d6ed2bb737f..827f12600e6 100644 --- a/apps/supervisor/src/services/podCleaner.test.ts +++ b/apps/supervisor/src/services/podCleaner.test.ts @@ -14,7 +14,7 @@ describe.skipIf(!process.env.K8S_INTEGRATION_TESTS)("PodCleaner Integration Test // Create the test namespace, only if it doesn't exist try { await k8s.core.readNamespace({ name: namespace }); - } catch (error) { + } catch (_error) { await k8s.core.createNamespace({ body: { metadata: { @@ -325,7 +325,7 @@ async function waitForPodDeletion({ name: podName, }); await setTimeout(waitMs); - } catch (error) { + } catch (_error) { // Pod was deleted return; } diff --git a/apps/supervisor/src/services/podCleaner.ts b/apps/supervisor/src/services/podCleaner.ts index 3ac5da293df..1a4980f79e8 100644 --- a/apps/supervisor/src/services/podCleaner.ts +++ b/apps/supervisor/src/services/podCleaner.ts @@ -1,8 +1,9 @@ import { SimpleStructuredLogger } from "@trigger.dev/core/v3/utils/structuredLogger"; -import { K8sApi } from "../clients/kubernetes.js"; +import type { K8sApi } from "../clients/kubernetes.js"; import { createK8sApi } from "../clients/kubernetes.js"; import { IntervalService } from "@trigger.dev/core/v3"; -import { Counter, Gauge, Registry } from "prom-client"; +import type { Registry } from "prom-client"; +import { Counter, Gauge } from "prom-client"; import { register } from "../metrics.js"; export type PodCleanerOptions = { diff --git a/apps/supervisor/src/workloadManager/ecrAuth.ts b/apps/supervisor/src/workloadManager/ecrAuth.ts index 33e98f63195..851249898b4 100644 --- a/apps/supervisor/src/workloadManager/ecrAuth.ts +++ b/apps/supervisor/src/workloadManager/ecrAuth.ts @@ -1,7 +1,7 @@ import { ECRClient, GetAuthorizationTokenCommand } from "@aws-sdk/client-ecr"; import { SimpleStructuredLogger } from "@trigger.dev/core/v3/utils/structuredLogger"; import { tryCatch } from "@trigger.dev/core"; -import Docker from "dockerode"; +import type Docker from "dockerode"; interface ECRTokenCache { token: string; diff --git a/apps/supervisor/src/workloadServer/index.ts b/apps/supervisor/src/workloadServer/index.ts index 7397313080a..04f319e09a7 100644 --- a/apps/supervisor/src/workloadServer/index.ts +++ b/apps/supervisor/src/workloadServer/index.ts @@ -3,25 +3,25 @@ import { SimpleStructuredLogger } from "@trigger.dev/core/v3/utils/structuredLog import EventEmitter from "node:events"; import { z } from "zod"; import { - type SupervisorHttpClient, WORKLOAD_HEADERS, + WorkloadDebugLogRequestBody, + WorkloadHeartbeatRequestBody, + WorkloadRunAttemptCompleteRequestBody, + WorkloadRunAttemptStartRequestBody, + type WorkloadRunSnapshotsSinceResponseBody, + type SupervisorHttpClient, type WorkloadClientSocketData, type WorkloadClientToServerEvents, type WorkloadContinueRunExecutionResponseBody, - WorkloadDebugLogRequestBody, type WorkloadDequeueFromVersionResponseBody, - WorkloadHeartbeatRequestBody, type WorkloadHeartbeatResponseBody, - WorkloadRunAttemptCompleteRequestBody, type WorkloadRunAttemptCompleteResponseBody, - WorkloadRunAttemptStartRequestBody, type WorkloadRunAttemptStartResponseBody, - WorkloadRunSnapshotsSinceResponseBody, type WorkloadServerToClientEvents, type WorkloadSuspendRunResponseBody, } from "@trigger.dev/core/v3/workers"; import { HttpServer, type CheckpointClient } from "@trigger.dev/core/v3/serverOnly"; -import { type IncomingMessage } from "node:http"; +import { type IncomingMessage, type ServerResponse } from "node:http"; import { register } from "../metrics.js"; import { env } from "../env.js"; import { SnapshotCallbackPayloadSchema } from "@internal/compute"; @@ -31,7 +31,6 @@ import { } from "../services/computeSnapshotService.js"; import type { ComputeWorkloadManager } from "../workloadManager/compute.js"; import type { OtlpTraceService } from "../services/otlpTraceService.js"; -import type { ServerResponse } from "node:http"; import { emitOneShot, runWideEvent, diff --git a/apps/webapp/app/components/BlankStatePanels.tsx b/apps/webapp/app/components/BlankStatePanels.tsx index 7b5bdc63109..b8811b039bc 100644 --- a/apps/webapp/app/components/BlankStatePanels.tsx +++ b/apps/webapp/app/components/BlankStatePanels.tsx @@ -100,7 +100,11 @@ export function HasNoTasksDev() { ); } -export function HasNoTasksDeployed({ environment }: { environment: MinimumEnvironment }) { +export function HasNoTasksDeployed({ + environment: _environment, +}: { + environment: MinimumEnvironment; +}) { return ; } diff --git a/apps/webapp/app/components/BulkActionFilterSummary.tsx b/apps/webapp/app/components/BulkActionFilterSummary.tsx index a2eabc879de..3c6871a23cd 100644 --- a/apps/webapp/app/components/BulkActionFilterSummary.tsx +++ b/apps/webapp/app/components/BulkActionFilterSummary.tsx @@ -44,7 +44,11 @@ export function BulkActionFilterSummary({ ); case "filter": { - const { label, valueLabel, rangeType } = timeFilterRenderValues({ + const { + label, + valueLabel, + rangeType: _rangeType, + } = timeFilterRenderValues({ from: filters.from ? dateFromString(`${filters.from}`) : undefined, to: filters.to ? dateFromString(`${filters.to}`) : undefined, period: filters.period, diff --git a/apps/webapp/app/components/Feedback.tsx b/apps/webapp/app/components/Feedback.tsx index 683f39d34ab..0848359e219 100644 --- a/apps/webapp/app/components/Feedback.tsx +++ b/apps/webapp/app/components/Feedback.tsx @@ -1,11 +1,5 @@ -import { - getFormProps, - getSelectProps, - getInputProps, - getTextareaProps, - useForm, -} from "@conform-to/react"; -import { parseWithZod } from "@conform-to/zod"; +import { conform, useForm } from "@conform-to/react"; +import { parse } from "@conform-to/zod"; import { InformationCircleIcon, ArrowUpCircleIcon } from "@heroicons/react/20/solid"; import { EnvelopeIcon, ShieldCheckIcon } from "@heroicons/react/24/solid"; import { Form, useActionData, useLocation, useNavigation, useSearchParams } from "@remix-run/react"; @@ -40,11 +34,11 @@ export function Feedback({ button, defaultValue = "bug", onOpenChange }: Feedbac const navigation = useNavigation(); const [type, setType] = useState(defaultValue); - const [form, fields] = useForm({ + const [form, { path, feedbackType, message }] = useForm({ id: "accept-invite", - lastResult: lastSubmission as any, + lastSubmission: lastSubmission as any, onValidate({ formData }) { - return parseWithZod(formData, { schema }); + return parse(formData, { schema }); }, shouldRevalidate: "onInput", }); @@ -53,11 +47,12 @@ export function Feedback({ button, defaultValue = "bug", onOpenChange }: Feedbac if ( navigation.formAction === "/resources/feedback" && navigation.state === "loading" && - Object.keys(form.allErrors).length === 0 + form.error === undefined && + form.errors.length === 0 ) { setOpen(false); } - }, [navigation.formAction, navigation.state, form.allErrors]); + }, [navigation, form]); // Handle URL param functionality useEffect(() => { @@ -95,17 +90,9 @@ export function Feedback({ button, defaultValue = "bug", onOpenChange }: Feedbac type === "concurrency" || type === "hipaa" ) &&
} -
+
- + {type === "feature" && ( )} - {fields.feedbackType.errors} + {feedbackType.error} -