Skip to content

fix(v3): remove executing tasks waiting to deploy - #4432

Closed
deepshekhardas wants to merge 2 commits into
triggerdotdev:mainfrom
deepshekhardas:pr-3310-fix
Closed

fix(v3): remove executing tasks waiting to deploy#4432
deepshekhardas wants to merge 2 commits into
triggerdotdev:mainfrom
deepshekhardas:pr-3310-fix

Conversation

@deepshekhardas

@deepshekhardas deepshekhardas commented Jul 31, 2026

Copy link
Copy Markdown

Removes deprecated ExecuteTasksWaitingForDeployService.

@changeset-bot

changeset-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 634ec91

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 27 packages
Name Type
@trigger.dev/core Patch
@trigger.dev/build Patch
trigger.dev Patch
@trigger.dev/python Patch
@trigger.dev/redis-worker Patch
@trigger.dev/schema-to-json Patch
@trigger.dev/sdk Patch
@internal/cache Patch
@internal/clickhouse Patch
@internal/llm-model-catalog Patch
@trigger.dev/rbac Patch
@internal/redis Patch
@internal/replication Patch
@internal/run-engine Patch
@internal/run-store Patch
@internal/schedule-engine Patch
@trigger.dev/sso Patch
@internal/testcontainers Patch
@internal/tracing Patch
@internal/tsql Patch
@internal/zod-worker Patch
@internal/dashboard-agent Patch
@internal/sdk-compat-tests Patch
@trigger.dev/react-hooks Patch
@trigger.dev/rsc Patch
@trigger.dev/database Patch
@trigger.dev/otlp-importer Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

Hi @deepshekhardas, thanks for your interest in contributing!

This project requires that pull request authors are vouched, and you are not in the list of vouched users.

This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details.

@github-actions github-actions Bot closed this Jul 31, 2026
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e736eaa3-0c9e-4489-9ac8-b34e17033486

📥 Commits

Reviewing files that changed from the base of the PR and between debfa2b and 634ec91.

📒 Files selected for processing (6)
  • .changeset/fix-v3-executing-tasks.md
  • apps/webapp/app/services/worker.server.ts
  • apps/webapp/app/v3/commonWorker.server.ts
  • apps/webapp/app/v3/services/changeCurrentDeployment.server.ts
  • apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV3.server.ts
  • apps/webapp/app/v3/services/executeTasksWaitingForDeploy.ts

Walkthrough

Removed ExecuteTasksWaitingForDeployService and its worker handlers. Removed deployment-time enqueue calls that drained WAITING_FOR_DEPLOY tasks. Kept the v3.executeTasksWaitingForDeploy catalog entry without a registered handler. Added a changeset describing the task-list behavior change.

✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch pr-3310-fix
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 3 potential issues.

Open in Devin Review

Comment on lines 253 to 254
"v3.executeTasksWaitingForDeploy": async ({ payload }) => {
const service = new ExecuteTasksWaitingForDeployService();
await service.call(payload.backgroundWorkerId);
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Runs held back until a deploy exists are never started again

The step that releases runs waiting on a deployment has been emptied out ("v3.executeTasksWaitingForDeploy" handler at apps/webapp/app/v3/commonWorker.server.ts:253-254) while runs are still being put into that waiting state, so those runs sit there forever and never execute.
Impact: On legacy-engine projects, any run triggered before its task was deployed stays stuck in "waiting for deploy" indefinitely, even after a successful deploy or promotion.

How waiting runs lose their only drain path

apps/webapp/app/v3/marqs/sharedQueueConsumer.server.ts:1435-1446 still transitions runs to WAITING_FOR_DEPLOY. Previously, ExecuteTasksWaitingForDeployService flipped those runs back to PENDING and re-enqueued them in MarQS, and it was triggered from three places:

  • deploy completion (ExecuteTasksWaitingForDeployService.enqueue(backgroundWorker.id) removed at apps/webapp/app/v3/services/createDeploymentBackgroundWorkerV3.server.ts:211),
  • promotion/rollback (removed at apps/webapp/app/v3/services/changeCurrentDeployment.server.ts:176),
  • the worker jobs in commonWorker.server.ts / apps/webapp/app/services/worker.server.ts:218-223.

This PR deletes the service file and empties all three, so nothing transitions WAITING_FOR_DEPLOY runs out of that state. Any jobs already enqueued in Redis for v3.executeTasksWaitingForDeploy also become no-ops.

Prompt for agents
The PR deletes apps/webapp/app/v3/services/executeTasksWaitingForDeploy.ts and empties the v3.executeTasksWaitingForDeploy handlers in commonWorker.server.ts and services/worker.server.ts, and removes the enqueue calls in createDeploymentBackgroundWorkerV3.server.ts and changeCurrentDeployment.server.ts. However SharedQueueConsumer (#markRunAsWaitingForDeploy in apps/webapp/app/v3/marqs/sharedQueueConsumer.server.ts) still sets legacy V1 runs to WAITING_FOR_DEPLOY, and no other code transitions them out. Either restore the drain service and its enqueue call sites, or remove the code path that puts runs into WAITING_FOR_DEPLOY in the first place so no run can become permanently stuck.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +1 to +7
---
"@trigger.dev/core": patch
---

fix(v3): remove executing tasks waiting to deploy

Removes the executing tasks that are waiting to deploy from the task list. This fixes an issue where tasks in EXECUTING state but waiting for deployment were incorrectly displayed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Release-notes entry claims a published package changed when only server code did

A changeset targeting the published core package was added ("@trigger.dev/core": patch in .changeset/fix-v3-executing-tasks.md:2) even though the PR only touches server code, so an unrelated package gets a version bump and a misleading release note.
Impact: Users see a package release describing a change that isn't in that package, and the note is written in internal implementation terms rather than user-facing behaviour.

Repository rule for server-only changes

AGENTS.md and CONTRIBUTING.md state: when modifying only server components (apps/webapp/, apps/supervisor/, etc.) with no package changes, add a .server-changes/ file (with area/type frontmatter) instead of a changeset. They also require the description be written for users, not maintainers, and never name internal tooling/infra — the current text ("fix(v3): remove executing tasks waiting to deploy", "tasks in EXECUTING state but waiting for deployment") is implementation-oriented and inaccurate.

Prompt for agents
This PR changes only apps/webapp. Per AGENTS.md and CONTRIBUTING.md, delete .changeset/fix-v3-executing-tasks.md and add a .server-changes/ markdown file instead, with frontmatter `area: webapp` and `type: fix`, and a single plain user-facing sentence describing the behaviour change (no internal service names).
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

priority: 0,
maxAttempts: 3,
handler: async (payload, job) => {}, // This is now handled by redisWorker
handler: async (payload, job) => { }, // This is now handled by redisWorker

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Formatting change would fail the automated code-quality check

An empty function body was reformatted with a space inside the braces (async (payload, job) => { } at apps/webapp/app/services/worker.server.ts:287), which the repository's auto-formatter would rewrite, so the CI formatting check fails.
Impact: The pull request cannot pass CI until formatting is re-run.

Rule reference

AGENTS.md / CONTRIBUTING.md require running pnpm run format (oxfmt) before pushing; the code-quality CI check fails if it produces a diff. The unrelated whitespace change from {} to { } reverts formatter output.

Suggested change
handler: async (payload, job) => { }, // This is now handled by redisWorker
handler: async (payload, job) => {}, // This is now handled by redisWorker
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@deepshekhardas deepshekhardas changed the title test: check block fix(v3): remove executing tasks waiting to deploy Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant