Cancel runs, rerun from step, and event listener panic recovery
v1.39.0 adds REST API and CLI support for canceling runs and rerunning from a specific step, improves CLI timestamp handling, fixes race conditions in queue and workflow checkpointing, and adds panic recovery for event lifecycle listeners to prevent cascading failures.
Release Notes
-
#4638 feat(api): v2 api cancel run
Adds cancel run to the v2 rest api and cli.
POST /api/v2/runs/{run_id}/cancelinngest api POST /api/v2/runs/{run_id}/cancel -
#4645 feat(api): rest v2 rerun from step
POST /v2/runs/{run_id}/rerunwith payload:
{ "fromStep": { "stepId": "fetch-user", "input": [ { "userId": "user_123" } ] } }CLI equivalent:
inngest api --prod rerun <run_id> \ --from-step "step 2" \ --input '[{"foo":"bar"}]'
Migration Notes
-
#4655 refactor(queue): add shard scanner boundary
None
Validation
- go test -count=1 ./pkg/execution/queue
- go test -run '^$' ./pkg/execution/state/redis_state
-
#4665 refactor(queue): add scanner runtime
Out-of-tree queue scanner implementations must update
Run(ctx, dispatch)toRun(ctx, runtime), useruntime.Dispatchto submit leased work, and may inspectruntime.WorkerSemaphorebefore scanning. Implementations that callDispatchFuncmust handle the returnedDispatchedItem; callers may ignore it, or wait onDone()with context cancellation or a timeout.Callers of
LeaseItemmust stop passing queue partitions and instead provide item metadata onLeaseItemRequest. Callers ofProcessItemmust handle the new(ProcessItemResult, error)return shape.Validation
go test ./pkg/execution/queuego test ./tests/execution/queuemake lint
-
#4672 fix(executor): recover from panics in event lifecycle listeners
Test Plan
Added
TestRunEventLifecyclesRecoversFromListenerPanicwhich verifies that:- A panicking listener is called and its panic is recovered
- Subsequent listeners are still called despite the panic
- Multiple invocations of
runEventLifecycleswork correctly even after a panic
Changelog
🚀 Features
- (api) Rest v2 rerun from step (#4645)
- (metadata) Augment incoming ai metadata with cost estimates (#4661)
- (api) V2 api cancel run (#4638)
🐛 Bug Fixes
- (cli) Improve cli timestamp arg handling (#4650)
- Use snapshots to handle map race access (#4653)
- (queue) Skip constraint lease on missing account (#4604)
- Race creating workflow and checkpointing durable endpoint step (#4668)
- (executor) Recover from panics in event lifecycle listeners (#4672)
🚜 Refactor
- (queue) Add shard scanner boundary (#4655)
- (queue) Add scanner runtime (#4665)
- (queue) Expose available worker count (#4666)
⚙️ Miscellaneous Tasks
Source: original entry ↗
More from Inngest
Follow Inngest to get its new changes in your feed and email digest.
v1.46.0 Release
Inngest v1.46.0 introduces sandbox secret management, fine-grained API key permissions, cloud sandboxes from local development, improved queue processing with dynamic partition limits, enhanced tracing with custom concurrency expressions, and multiple bug fixes including realtime streaming and queue backlog metrics corrections.
Drop permanently unroutable items
Fixed queue behavior to drop permanently unroutable items when WithPermanentConstraintErrorHandler is explicitly configured. Existing behavior remains unchanged unless explicitly enabled.
Release v1.45.0
Inngest v1.45.0 adds OAuth cloud login support to the CLI and MCP clients, introduces CEL filtering and sandbox lifecycle APIs, and fixes multiple issues in debounce, queue migration, API serialization, and semaphore performance.