@bitfab/sdk 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
@@ -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/sdk";
186
186
 
187
187
  // src/errors.ts
@@ -2500,4 +2500,4 @@ export {
2500
2500
  HttpClient,
2501
2501
  experimentIdWireFields
2502
2502
  };
2503
- //# sourceMappingURL=chunk-5H6M54DL.js.map
2503
+ //# sourceMappingURL=chunk-6P4TTCPH.js.map