Skip to content

Make Java SDK context signal-aware #72680

Closed

Description

@jason810496
┌──────────────────────┬───────────────────────────────────────────────────────┬───────────────────────────────────────────────────────┬───────────────────────────────────────────┐
│                      │                          Go                           │                          TS                           │                    JVM                    │
├──────────────────────┼───────────────────────────────────────────────────────┼───────────────────────────────────────────────────────┼───────────────────────────────────────────┤
│ context object       │ sdk.TIRunContext embeds context.Context               │ TaskContext with readonly signal: AbortSignal         │ data class Context(dagRun, ti) — nothing  │
│                      │                                                       │                                                       │ else                                      │
├──────────────────────┼───────────────────────────────────────────────────────┼───────────────────────────────────────────────────────┼───────────────────────────────────────────┤
│ cancellation source  │ signal.NotifyContext(ctx, SIGINT, SIGTERM) —          │ AbortController over ["SIGTERM","SIGINT"] —           │ none found in the whole sdk module        │
│                      │ server.go:89                                          │ runtime.ts:149                                        │                                           │
├──────────────────────┼───────────────────────────────────────────────────────┼───────────────────────────────────────────────────────┼───────────────────────────────────────────┤
│ reaches the task     │ yes — task.Execute(ctx, …)                            │ yes — ctx.signal                                      │ no                                        │
│ body?                │                                                       │                                                       │                                           │
└──────────────────────┴───────────────────────────────────────────────────────┴───────────────────────────────────────────────────────┴───────────────────────────────────────────┘

Activity

  1. self-assigned this
    on Sep 8, 2026
  2. garvit-arora commented on Sep 29, 2026

    @garvit-arora
    Contributor

    Hi, I'd like to work on this issue. Plan: trap SIGINT/SIGTERM in the Java task runner (matching Go/TS SDK behavior), expose cancellation through Context so task code can cooperatively stop, and add regression tests. I'll open a PR shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:java-sdktype:improvement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions