fix(sdk): preserve idempotencyKeyOptions on batch.triggerBy* paths - #4422
fix(sdk): preserve idempotencyKeyOptions on batch.triggerBy* paths#4422Ayush7614 wants to merge 1 commit into
Conversation
Array and stream builders for triggerById/ByTask (and related stream transforms) hashed keys but dropped scope/original-key metadata. Match the existing batchTrigger paths so dashboard/API show the real key.
🦋 Changeset detectedLatest commit: e00ea88 The changes in this PR will be included in the next version bump. This PR includes changesets to release 28 packages
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 |
|
Hi @Ayush7614, 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. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
WalkthroughBatch trigger array mappings and NDJSON stream transforms now compute per-item idempotency keys once, select item or indexed batch keys, preserve TTL precedence, and conditionally attach ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary
batch.triggerById/ByIdAndWait/ByTask/ByTaskAndWait(array + stream) hashed idempotency keys but never attachedidempotencyKeyOptions. Same gap intransformSingleTaskBatchItemsStream. Aligns these paths with the existingbatchTrigger/batchTriggerAndWaitbuilders so original key + scope are stored for API/dashboard.✅ Checklist
Testing
task.batchTrigger/batchTriggerAndWait, which already attachidempotencyKeyOptionstriggerBy*array + stream builders now callgetIdempotencyKeyOptionsand sendidempotencyKeyOptionsin the NDJSON item options@trigger.dev/sdk(patch)Changelog
SDK batch
triggerBy*APIs now preserve idempotency key scope and original key metadata instead of only sending the hash.