@bitfab/sdk 0.64.11 → 0.64.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-DOKCUGYF.js → chunk-42RXX24H.js} +6 -6
- package/dist/chunk-42RXX24H.js.map +1 -0
- package/dist/{chunk-3H3QMZBN.js → chunk-JN3C4PIV.js} +2 -2
- package/dist/{chunk-3H3QMZBN.js.map → chunk-JN3C4PIV.js.map} +1 -1
- package/dist/{chunk-TRI76PWA.js → chunk-NEQA2IBO.js} +3 -3
- package/dist/chunk-NEQA2IBO.js.map +1 -0
- package/dist/{chunk-ZCT6YKKG.js → chunk-QCPTN2U6.js} +30 -11
- package/dist/{chunk-ZCT6YKKG.js.map → chunk-QCPTN2U6.js.map} +1 -1
- package/dist/{chunk-A6RYFTIX.js → chunk-YOM2DADY.js} +2 -2
- package/dist/{chunk-A6RYFTIX.js.map → chunk-YOM2DADY.js.map} +1 -1
- package/dist/{http-PXJMOXSK.js → http-4DPVYNI3.js} +2 -2
- package/dist/{http-QCQPXTCA.js → http-IFJ4TUVR.js} +2 -2
- package/dist/index.cjs +29 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -3
- package/dist/node.cjs +29 -10
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +3 -3
- package/dist/{replay-G265AWTA.js → replay-TAZXZYWL.js} +3 -3
- package/dist/replayCli.js +2 -2
- package/dist/seedCli.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-DOKCUGYF.js.map +0 -1
- package/dist/chunk-TRI76PWA.js.map +0 -1
- /package/dist/{http-PXJMOXSK.js.map → http-4DPVYNI3.js.map} +0 -0
- /package/dist/{http-QCQPXTCA.js.map → http-IFJ4TUVR.js.map} +0 -0
- /package/dist/{replay-G265AWTA.js.map → replay-TAZXZYWL.js.map} +0 -0
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
flushTraces,
|
|
8
8
|
parseRetryAfterMs,
|
|
9
9
|
serializePayloadBody
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JN3C4PIV.js";
|
|
11
11
|
export {
|
|
12
12
|
BitfabError,
|
|
13
13
|
HttpClient,
|
|
@@ -18,4 +18,4 @@ export {
|
|
|
18
18
|
parseRetryAfterMs,
|
|
19
19
|
serializePayloadBody
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=http-
|
|
21
|
+
//# sourceMappingURL=http-4DPVYNI3.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
flushTraces,
|
|
8
8
|
parseRetryAfterMs,
|
|
9
9
|
serializePayloadBody
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YOM2DADY.js";
|
|
11
11
|
import "./chunk-MT36GJMW.js";
|
|
12
12
|
export {
|
|
13
13
|
BitfabError,
|
|
@@ -19,4 +19,4 @@ export {
|
|
|
19
19
|
parseRetryAfterMs,
|
|
20
20
|
serializePayloadBody
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=http-
|
|
22
|
+
//# sourceMappingURL=http-IFJ4TUVR.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -42,7 +42,7 @@ var __version__, __packageName__;
|
|
|
42
42
|
var init_version_generated = __esm({
|
|
43
43
|
"src/version.generated.ts"() {
|
|
44
44
|
"use strict";
|
|
45
|
-
__version__ = "0.64.
|
|
45
|
+
__version__ = "0.64.13";
|
|
46
46
|
__packageName__ = "@bitfab/sdk";
|
|
47
47
|
}
|
|
48
48
|
});
|
|
@@ -4641,7 +4641,7 @@ async function processItem(httpClient, serverItem, fn, experimentId, mockStrateg
|
|
|
4641
4641
|
dbBranchTimings: dbBranchTimings ?? null
|
|
4642
4642
|
};
|
|
4643
4643
|
}
|
|
4644
|
-
async function waitForReplayPersistence(httpClient, experimentId, replayedTraceIds) {
|
|
4644
|
+
async function waitForReplayPersistence(httpClient, experimentId, replayedTraceIds, replayLabels = {}, warn2 = console.warn) {
|
|
4645
4645
|
const deferredSettled = await httpClient.settleDeferredWork(
|
|
4646
4646
|
REPLAY_PERSISTENCE_TIMEOUT_MS
|
|
4647
4647
|
);
|
|
@@ -4674,7 +4674,7 @@ async function waitForReplayPersistence(httpClient, experimentId, replayedTraceI
|
|
|
4674
4674
|
return readBackTraceIds;
|
|
4675
4675
|
}
|
|
4676
4676
|
const deadline = Date.now() + REPLAY_PERSISTENCE_TIMEOUT_MS;
|
|
4677
|
-
let missing = Object.keys(expectedSpanCounts)
|
|
4677
|
+
let missing = Object.keys(expectedSpanCounts);
|
|
4678
4678
|
while (true) {
|
|
4679
4679
|
const status = await httpClient.getReplayStatus(
|
|
4680
4680
|
experimentId,
|
|
@@ -4684,8 +4684,8 @@ async function waitForReplayPersistence(httpClient, experimentId, replayedTraceI
|
|
|
4684
4684
|
Object.assign(readBackTraceIds, ready);
|
|
4685
4685
|
missing = Object.keys(expectedSpanCounts).filter(
|
|
4686
4686
|
(traceId) => ready[traceId] === void 0
|
|
4687
|
-
)
|
|
4688
|
-
if (missing === 0) {
|
|
4687
|
+
);
|
|
4688
|
+
if (missing.length === 0) {
|
|
4689
4689
|
return readBackTraceIds;
|
|
4690
4690
|
}
|
|
4691
4691
|
if (Date.now() >= deadline) {
|
|
@@ -4695,10 +4695,19 @@ async function waitForReplayPersistence(httpClient, experimentId, replayedTraceI
|
|
|
4695
4695
|
Math.min(100, Math.max(0, deadline - Date.now()))
|
|
4696
4696
|
);
|
|
4697
4697
|
}
|
|
4698
|
-
const
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4698
|
+
for (const traceId of missing) {
|
|
4699
|
+
warn2(
|
|
4700
|
+
unconfirmedReplayWarning(
|
|
4701
|
+
replayLabels[traceId] ?? traceId,
|
|
4702
|
+
REPLAY_PERSISTENCE_TIMEOUT_MS / 1e3,
|
|
4703
|
+
flushed
|
|
4704
|
+
)
|
|
4705
|
+
);
|
|
4706
|
+
}
|
|
4707
|
+
return readBackTraceIds;
|
|
4708
|
+
}
|
|
4709
|
+
function unconfirmedReplayWarning(label, seconds, flushed) {
|
|
4710
|
+
return `[bitfab] replay ${label} could not confirm all spans reached Bitfab within ${seconds}s. The run continues; Bitfab will show this replay as capture incomplete.${flushed ? "" : " Some spans likely never left this process."}`;
|
|
4702
4711
|
}
|
|
4703
4712
|
function sleepForReplayPersistence(ms) {
|
|
4704
4713
|
return new Promise((resolve) => {
|
|
@@ -5101,7 +5110,17 @@ async function runReplaySession(httpClient, fn, session, fullExperimentUrl, maxC
|
|
|
5101
5110
|
}
|
|
5102
5111
|
throwIfInterrupted(interrupted, resultItems, experimentId, fullExperimentUrl);
|
|
5103
5112
|
const deliveredTraceIds = await preserveReplayFailure(
|
|
5104
|
-
() => waitForReplayPersistence(
|
|
5113
|
+
() => waitForReplayPersistence(
|
|
5114
|
+
httpClient,
|
|
5115
|
+
experimentId,
|
|
5116
|
+
replayedTraceIds,
|
|
5117
|
+
Object.fromEntries(
|
|
5118
|
+
workItems.map(({ serverItem, attempt }, index) => [
|
|
5119
|
+
replayedTraceIds[index],
|
|
5120
|
+
`${serverItem.originalTraceId ?? serverItem.sourceTraceId}#${attempt}`
|
|
5121
|
+
])
|
|
5122
|
+
)
|
|
5123
|
+
),
|
|
5105
5124
|
resultItems,
|
|
5106
5125
|
experimentId,
|
|
5107
5126
|
fullExperimentUrl
|