bitfab 0.62.6 → 0.62.8
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/cloudReplay.py +501 -82
- package/dist/{chunk-5QT34T7B.js → chunk-3SYFXHKU.js} +2 -2
- package/dist/{chunk-5QT34T7B.js.map → chunk-3SYFXHKU.js.map} +1 -1
- package/dist/{chunk-PIEBUHL2.js → chunk-IZ5ORW4E.js} +2 -2
- package/dist/{chunk-PIEBUHL2.js.map → chunk-IZ5ORW4E.js.map} +1 -1
- package/dist/{chunk-C2R3NEPK.js → chunk-P7IHEJZW.js} +5 -22
- package/dist/{chunk-C2R3NEPK.js.map → chunk-P7IHEJZW.js.map} +1 -1
- package/dist/{chunk-LXTDXWNK.js → chunk-SKJXMGZE.js} +23 -3
- package/dist/{chunk-LXTDXWNK.js.map → chunk-SKJXMGZE.js.map} +1 -1
- package/dist/{chunk-CP7J3VTC.js → chunk-WBEHKLZK.js} +6 -6
- package/dist/{chunk-CP7J3VTC.js.map → chunk-WBEHKLZK.js.map} +1 -1
- package/dist/{http-OF2227WS.js → http-IAQKHQIW.js} +2 -2
- package/dist/{http-DJRQ2SRF.js → http-USSXBYGY.js} +2 -2
- package/dist/index.cjs +5 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/node.cjs +5 -22
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +3 -3
- package/dist/{replay-SVKFFDNU.js → replay-NATYJQWY.js} +3 -3
- package/dist/replayCli.js +3 -3
- package/dist/replayCli.js.map +1 -1
- package/dist/seedCli.js +2 -2
- package/package.json +1 -1
- /package/dist/{http-DJRQ2SRF.js.map → http-IAQKHQIW.js.map} +0 -0
- /package/dist/{http-OF2227WS.js.map → http-USSXBYGY.js.map} +0 -0
- /package/dist/{replay-SVKFFDNU.js.map → replay-NATYJQWY.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BitfabError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IZ5ORW4E.js";
|
|
4
4
|
|
|
5
5
|
// src/codeChange.ts
|
|
6
6
|
var NUL = String.fromCharCode(0);
|
|
@@ -101,6 +101,7 @@ var BOOLEAN_FLAGS = /* @__PURE__ */ new Set([
|
|
|
101
101
|
"--no-db-branch",
|
|
102
102
|
"--no-code-change",
|
|
103
103
|
"--dry-run",
|
|
104
|
+
"--fail-on-error",
|
|
104
105
|
"--force"
|
|
105
106
|
]);
|
|
106
107
|
var HELP_FLAGS = /* @__PURE__ */ new Set(["--help", "-h"]);
|
|
@@ -195,6 +196,7 @@ Options:
|
|
|
195
196
|
--mock none|all|marked
|
|
196
197
|
--db-branch, --no-db-branch
|
|
197
198
|
--dry-run (resolve inputs, run nothing)
|
|
199
|
+
--fail-on-error (exit 1 after printing the result when any replayed item errored; under --dry-run, items whose inputs failed to resolve count)
|
|
198
200
|
--resume EXPERIMENT_ID (finish an experiment that stopped partway, running only the items it did not finish, with the traces, attempts, and graders it started with)
|
|
199
201
|
--force (with --resume, resume even when the experiment may still be running or the code changed since it started)
|
|
200
202
|
--params PATH
|
|
@@ -277,7 +279,7 @@ async function seedFromRegistry(registry, pipeline, cases, options = {}) {
|
|
|
277
279
|
sessionId: seedCase.sessionId
|
|
278
280
|
})
|
|
279
281
|
);
|
|
280
|
-
const { flushTraces: flushTraces2 } = await import("./http-
|
|
282
|
+
const { flushTraces: flushTraces2 } = await import("./http-IAQKHQIW.js");
|
|
281
283
|
await flushTraces2(3e4);
|
|
282
284
|
return { pipeline, traceFunctionKey, traceIds };
|
|
283
285
|
}
|
|
@@ -400,6 +402,9 @@ function parseReplayCliArgs(registry, argv) {
|
|
|
400
402
|
case "--dry-run":
|
|
401
403
|
parsed.dryRun = true;
|
|
402
404
|
break;
|
|
405
|
+
case "--fail-on-error":
|
|
406
|
+
parsed.failOnError = true;
|
|
407
|
+
break;
|
|
403
408
|
case "--force":
|
|
404
409
|
parsed.force = true;
|
|
405
410
|
break;
|
|
@@ -652,6 +657,13 @@ function renderSummary(pipeline, result, stderr) {
|
|
|
652
657
|
stderr(`
|
|
653
658
|
${result.experimentUrl}`);
|
|
654
659
|
}
|
|
660
|
+
function countErroredItems(result) {
|
|
661
|
+
const replayed = result.items.filter((item) => item.carriedOver !== true);
|
|
662
|
+
return {
|
|
663
|
+
errored: replayed.filter((item) => item.error !== null).length,
|
|
664
|
+
replayed: replayed.length
|
|
665
|
+
};
|
|
666
|
+
}
|
|
655
667
|
function renderDryRun(pipeline, result, stderr) {
|
|
656
668
|
stderr("\n\u2500\u2500\u2500 Dry run \u2500\u2500\u2500");
|
|
657
669
|
stderr(` Pipeline: ${pipeline}`);
|
|
@@ -825,6 +837,14 @@ async function runReplayCli(registry, argv = typeof process === "undefined" ? []
|
|
|
825
837
|
`No traces matched "${traceFunctionKey}", so nothing was replayed. Seed cases with --seed, or capture a trace first.`
|
|
826
838
|
);
|
|
827
839
|
}
|
|
840
|
+
if (args.failOnError === true) {
|
|
841
|
+
const { errored, replayed } = countErroredItems(result);
|
|
842
|
+
if (errored > 0) {
|
|
843
|
+
throw new BitfabError(
|
|
844
|
+
`[replay] ${errored} of ${replayed} ${args.dryRun === true ? "resolved" : "replayed"} items errored; exiting 1 because of --fail-on-error`
|
|
845
|
+
);
|
|
846
|
+
}
|
|
847
|
+
}
|
|
828
848
|
return result;
|
|
829
849
|
}
|
|
830
850
|
|
|
@@ -920,4 +940,4 @@ export {
|
|
|
920
940
|
runRegistryMain,
|
|
921
941
|
runIfEntrypoint
|
|
922
942
|
};
|
|
923
|
-
//# sourceMappingURL=chunk-
|
|
943
|
+
//# sourceMappingURL=chunk-SKJXMGZE.js.map
|