Skip to content

Conversation

nicktrn
Copy link
Collaborator

@nicktrn nicktrn commented Oct 8, 2025

Fixes a bug where SIGTERM signals during warm start polling would kill child processes but still accept new runs, causing the controller to attempt execution with dead processes. The fix ensures warm start polling is immediately aborted when SIGTERM is received.

Copy link

changeset-bot bot commented Oct 8, 2025

🦋 Changeset detected

Latest commit: 2f51c2f

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

This PR includes changesets to release 23 packages
Name Type
trigger.dev Patch
@trigger.dev/core Patch
d3-chat Patch
references-d3-openai-agents Patch
references-nextjs-realtime Patch
@trigger.dev/build 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/redis Patch
@internal/replication Patch
@internal/run-engine Patch
@internal/schedule-engine Patch
@internal/testcontainers Patch
@internal/tracing Patch
@internal/zod-worker 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

Copy link
Contributor

coderabbitai bot commented Oct 8, 2025

Walkthrough

The change adds a changeset marking a patch release for trigger.dev packages documenting a SIGTERM handling fix. In the CLI managed controller, the SIGTERM handler is updated to immediately abort any in-flight warm-start long poll and then wait for active runs to complete. In core, WarmStartClient gains an abortController, a public abort() method, and a withAbort helper to ensure single in-flight warm start. longPoll now accepts an AbortSignal, composes timeout and external signals, and returns explicit abort-aware results.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The current pull request description summarizes the bug and fix but does not follow the repository’s required template. It omits the issue reference, checklist, testing steps, changelog entry, and screenshots sections, making it difficult to verify that all review criteria and testing have been addressed. Providing these elements is necessary to ensure consistency and completeness. Please update the description to include a “Closes #” reference, complete the checklist, outline your testing steps, add a changelog summary, and attach any relevant screenshots to adhere to the repository template.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title “fix(runner): SIGTERM handling during warm start long poll” concisely and accurately describes the core change by indicating the affected component and the specific improvement to SIGTERM handling during warm start polling. It follows the repository’s conventional commit style and directly matches the modifications in both the controller and warmStartClient code. This clarity ensures that reviewers and team members immediately understand the primary purpose of the pull request.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/sigterm-handling

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f5caa66 and 2f51c2f.

📒 Files selected for processing (3)
  • .changeset/poor-files-taste.md (1 hunks)
  • packages/cli-v3/src/entryPoints/managed/controller.ts (1 hunks)
  • packages/core/src/v3/workers/warmStartClient.ts (6 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{ts,tsx}: Always prefer using isomorphic code like fetch, ReadableStream, etc. instead of Node.js specific code
For TypeScript, we usually use types over interfaces
Avoid enums
No default exports, use function declarations

Files:

  • packages/cli-v3/src/entryPoints/managed/controller.ts
  • packages/core/src/v3/workers/warmStartClient.ts
{packages/core,apps/webapp}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

We use zod a lot in packages/core and in the webapp

Files:

  • packages/core/src/v3/workers/warmStartClient.ts
🧬 Code graph analysis (1)
packages/core/src/v3/workers/warmStartClient.ts (2)
apps/coordinator/src/checkpointer.ts (1)
  • abortSignal (616-661)
packages/cli-v3/src/entryPoints/managed/controller.ts (1)
  • workerInstanceName (150-152)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (21)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
  • GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
  • GitHub Check: typecheck / typecheck

@nicktrn nicktrn merged commit 8917478 into main Oct 8, 2025
31 checks passed
@nicktrn nicktrn deleted the fix/sigterm-handling branch October 8, 2025 11:51
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.

2 participants