bunqueue v2.8.23
Fixes 2 bugs. updateJobParent corrupted a child's parentQueue (src/application/queueManager.ts).
To install bunqueue v2.8.23
Section titled “To install bunqueue v2.8.23”bun add bunqueue@2.8.23npm install bunqueue@2.8.23To upgrade bunqueue
Section titled “To upgrade bunqueue”bun add bunqueue@latestBugfixes
Section titled “Bugfixes”An adversarial audit of every FlowProducer feature (new suite test/flow-producer-audit.test.ts, 15 tests) confirmed 13 behaviors correct and surfaced two genuine bugs, both fixed RED→GREEN:
-
updateJobParentcorrupted a child’s__parentQueue(src/application/queueManager.ts). It setdata.__parentQueue = childJob.queue, the child’s own queue, instead of the parent’s. For a cross-queue flow (add({ queueName: 'P', children: [{ queueName: 'C' }] })) the child’sQueue.getJob(...).parent.queueQualifiedName,.parentKey,.opts.parent.queue, andtoJSON()/asJSON().parentKeyall reportedCinstead ofP, breaking child→parent navigation. (Execution,getChildrenValues,getFlow, andfailParentOnFailurewere unaffected, they key off the domainparentId, which was already correct, so same-queue flows masked the bug.) Now set fromparentJob.queue.Queue.add({ parent })already did this correctly (add.ts);updateJobParentwas the lone divergence. -
addBulkThenproduced a merge job that could not read its predecessors (src/client/flow.ts). Thefinaljob was pushed viapushJobwithdependsOn = parallelIdsbut nochildrenIds, sogetChildrenValues(finalId)returned{}, incompatible with BullMQ fan-in and withadd(). It now pushes the final job viapushJobWithParent(children = the parallel ids): identicaldependsOnordering (still waits for all parallel jobs), but the merge step can now read their results viagetChildrenValues()/getDependencies(). Note the linkage side effect: the parallel jobs now have the final job as theirparentId, so a parallel step carryingfailParentOnFailure: truewill now fail the merge job (previously a silent no-op, since the parallel jobs had no parent).
Two further audit candidates were investigated and deliberately not changed because they are not bugs: getParentResult returning undefined when a predecessor used removeOnComplete: true is an intentional memory-bounding trade-off (dependents still unblock via depCompletions), and the embedded-vs-TCP customId/deduplication.id fallback difference is not FlowProducer-specific, it mirrors the direct Queue.add paths. Regression-checked across 101 existing flow tests + all three suites (unit 5680, TCP 59/59, embedded 36/36).
Thanks to 1 contributor!
Section titled “Thanks to 1 contributor!”← bunqueue v2.8.22 · Release on GitHub · Commits since v2.8.22 · Full changelog · All posts