Skip to content

Commit 4b612ee

Browse files
committed
We don't need these sdk changes anymore because of the different way we are doing failed runs
1 parent 471bf19 commit 4b612ee

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

packages/core/src/v3/schemas/api.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,6 @@ export const StreamBatchItemsResponse = z.object({
409409
itemsAccepted: z.number(),
410410
/** Number of items that were deduplicated (already enqueued) */
411411
itemsDeduplicated: z.number(),
412-
/** Number of items skipped due to queue size limits */
413-
itemsSkipped: z.number().optional(),
414412
/** Whether the batch was sealed and is ready for processing.
415413
* If false, the batch needs more items before processing can start.
416414
* Clients should check this field and retry with missing items if needed. */
@@ -419,9 +417,6 @@ export const StreamBatchItemsResponse = z.object({
419417
enqueuedCount: z.number().optional(),
420418
/** Expected total item count (only present when sealed=false to help with retries) */
421419
expectedCount: z.number().optional(),
422-
/** Actual run count after processing (may differ from original if items were skipped).
423-
* SDK should use this value for waitForBatch. */
424-
runCount: z.number().optional(),
425420
});
426421

427422
export type StreamBatchItemsResponse = z.infer<typeof StreamBatchItemsResponse>;

packages/trigger-sdk/src/v3/shared.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,15 +1571,10 @@ async function executeBatchTwoPhase(
15711571
}
15721572

15731573
// If the batch was cached (idempotent replay), skip streaming items
1574-
let actualRunCount = batch.runCount;
15751574
if (!batch.isCached) {
15761575
try {
15771576
// Phase 2: Stream items
1578-
const streamResult = await apiClient.streamBatchItems(batch.id, items, requestOptions);
1579-
// Use the runCount from Phase 2 if provided (may differ if items were skipped)
1580-
if (streamResult.runCount !== undefined) {
1581-
actualRunCount = streamResult.runCount;
1582-
}
1577+
await apiClient.streamBatchItems(batch.id, items, requestOptions);
15831578
} catch (error) {
15841579
// Wrap with context about which phase failed and include batch ID
15851580
throw new BatchTriggerError(
@@ -1591,7 +1586,7 @@ async function executeBatchTwoPhase(
15911586

15921587
return {
15931588
id: batch.id,
1594-
runCount: actualRunCount,
1589+
runCount: batch.runCount,
15951590
publicAccessToken: batch.publicAccessToken,
15961591
};
15971592
}

0 commit comments

Comments
 (0)