bitfab 0.64.5 → 0.64.6

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 CHANGED
@@ -169,6 +169,9 @@ fullOutput (true) match --cloud-timeout and --cloud-full-output. version and id
169
169
  optional: version names the request format (3 now, 2 still accepted), and id is the
170
170
  execution UUID, which must match an execution_id input when the workflow has one.
171
171
 
172
+ The runner's job exits with the replay's exit code, so the Actions run fails when
173
+ the replay does. Traces that errored fail it only under --fail-on-error.
174
+
172
175
  Follow a replay by the execution UUID it prints:
173
176
  --cloud-watch ID | --cloud-status ID | --cloud-cancel ID | --cloud-cleanup ID
174
177
 
@@ -1727,12 +1730,18 @@ def annotate(result):
1727
1730
  if result.get("stoppedEarly"):
1728
1731
  message = f"Replay stopped early: {result['stoppedEarly']}"
1729
1732
  elif result["exitCode"]:
1730
- message = f"Replay exited {result['exitCode']}; bitfab-replay --cloud reports it as its own exit code"
1733
+ message = f"Replay exited {result['exitCode']}, so this job exits with it too"
1731
1734
  else:
1732
1735
  return
1733
1736
  print(f"::warning title=Bitfab replay::{message}", flush=True)
1734
1737
 
1735
1738
 
1739
+ def runner_exit_code(result):
1740
+ if result.get("stoppedEarly"):
1741
+ return result["exitCode"] or 1
1742
+ return result["exitCode"]
1743
+
1744
+
1736
1745
  def summary_markdown(result):
1737
1746
  summary = result_summary(result["stdout"]) or {}
1738
1747
  counts = summary.get("counts", {})
@@ -2200,8 +2209,9 @@ def main():
2200
2209
  print_json(configure_secrets(argv[1:]))
2201
2210
  return 0
2202
2211
  if argv == ["--cloud-execute"]:
2203
- annotate(execute())
2204
- return 0
2212
+ result = execute()
2213
+ annotate(result)
2214
+ return runner_exit_code(result)
2205
2215
  if "-h" in argv or "--help" in argv:
2206
2216
  print(HELP, end="")
2207
2217
  return 0
@@ -17,7 +17,7 @@ import {
17
17
  serializeValue,
18
18
  toJsonSafe,
19
19
  toJsonSafeReport
20
- } from "./chunk-QF7FLTXB.js";
20
+ } from "./chunk-B363XZTL.js";
21
21
  import {
22
22
  BitfabError,
23
23
  CONTENT_OFF_KEY,
@@ -36,7 +36,7 @@ import {
36
36
  readEnv,
37
37
  recordCallerTraceMetadata,
38
38
  retireTraceMetadata
39
- } from "./chunk-LRY4Y7HE.js";
39
+ } from "./chunk-ROZEHSGO.js";
40
40
  import {
41
41
  __privateAdd,
42
42
  __privateGet,
@@ -6253,7 +6253,7 @@ var Bitfab = class {
6253
6253
  await runWithSeedContext({ traceId }, async () => target(...args));
6254
6254
  } finally {
6255
6255
  try {
6256
- const { flushTraces: flushTraces2 } = await import("./http-6TAXWGVJ.js");
6256
+ const { flushTraces: flushTraces2 } = await import("./http-2UZ6CM3K.js");
6257
6257
  await flushTraces2(3e4);
6258
6258
  } finally {
6259
6259
  unrecorded = activeTraceStates.delete(traceId);
@@ -6312,7 +6312,7 @@ var Bitfab = class {
6312
6312
  `Function is wrapped with trace function key '${wrappedKey}' but replay was called with '${traceFunctionKey}'. Pass matching keys, or pass the unwrapped function to replay it under the explicit key.`
6313
6313
  );
6314
6314
  }
6315
- const { replay: doReplay } = await import("./replay-LOAD2DLO.js");
6315
+ const { replay: doReplay } = await import("./replay-KQCLQRJT.js");
6316
6316
  return doReplay(
6317
6317
  this.httpClient,
6318
6318
  this.serviceUrl,
@@ -6658,7 +6658,7 @@ async function seedFromRegistry(registry, pipeline, cases, options = {}) {
6658
6658
  sessionId: seedCase.sessionId
6659
6659
  })
6660
6660
  );
6661
- const { flushTraces: flushTraces2 } = await import("./http-6TAXWGVJ.js");
6661
+ const { flushTraces: flushTraces2 } = await import("./http-2UZ6CM3K.js");
6662
6662
  await flushTraces2(3e4);
6663
6663
  return { pipeline, traceFunctionKey, traceIds };
6664
6664
  }
@@ -6703,4 +6703,4 @@ export {
6703
6703
  reseedFromRegistry,
6704
6704
  seedFromRegistry
6705
6705
  };
6706
- //# sourceMappingURL=chunk-YT45ZRGM.js.map
6706
+ //# sourceMappingURL=chunk-6NUSTEQ6.js.map
@@ -6,7 +6,7 @@ import {
6
6
  replayContextReady,
7
7
  runWithReplayContext,
8
8
  unrefTimer
9
- } from "./chunk-LRY4Y7HE.js";
9
+ } from "./chunk-ROZEHSGO.js";
10
10
  import {
11
11
  runWithCaptureSuppressed,
12
12
  warnOnce,
@@ -1884,4 +1884,4 @@ export {
1884
1884
  warnJudgeAssertionsDeprecated,
1885
1885
  replay
1886
1886
  };
1887
- //# sourceMappingURL=chunk-QF7FLTXB.js.map
1887
+ //# sourceMappingURL=chunk-B363XZTL.js.map
@@ -2,7 +2,7 @@ import {
2
2
  BitfabError,
3
3
  warnOnce,
4
4
  writeOnce
5
- } from "./chunk-4IRNG6KB.js";
5
+ } from "./chunk-MS3GWCJB.js";
6
6
 
7
7
  // src/codeChange.ts
8
8
  var NUL = String.fromCharCode(0);
@@ -316,7 +316,7 @@ async function seedFromRegistry(registry, pipeline, cases, options = {}) {
316
316
  sessionId: seedCase.sessionId
317
317
  })
318
318
  );
319
- const { flushTraces: flushTraces2 } = await import("./http-OGYWTBEP.js");
319
+ const { flushTraces: flushTraces2 } = await import("./http-BD3WK3FL.js");
320
320
  await flushTraces2(3e4);
321
321
  return { pipeline, traceFunctionKey, traceIds };
322
322
  }
@@ -1007,4 +1007,4 @@ export {
1007
1007
  runRegistryMain,
1008
1008
  runIfEntrypoint
1009
1009
  };
1010
- //# sourceMappingURL=chunk-A3CCZ7Q5.js.map
1010
+ //# sourceMappingURL=chunk-J342BFLH.js.map
@@ -181,7 +181,7 @@ function encodeRequestBody(body) {
181
181
  }
182
182
 
183
183
  // src/version.generated.ts
184
- var __version__ = "0.64.5";
184
+ var __version__ = "0.64.6";
185
185
  var __packageName__ = "bitfab";
186
186
 
187
187
  // src/errors.ts
@@ -2500,4 +2500,4 @@ export {
2500
2500
  HttpClient,
2501
2501
  experimentIdWireFields
2502
2502
  };
2503
- //# sourceMappingURL=chunk-4IRNG6KB.js.map
2503
+ //# sourceMappingURL=chunk-MS3GWCJB.js.map