Create a subprocess for uploading the report as it goes#533
Conversation
…vents that, when used, defer calls to Sift to the end of the test where the log is then replayed and uploaded.
| simulated_steps_order: list[str] = [] | ||
| simulated_measurements_by_id: dict[str, TestMeasurement] = {} | ||
| simulated_measurements_order: list[str] = [] | ||
| if incremental: |
There was a problem hiding this comment.
Perhaps a bit more error handling?
Any thoughts on how to handle partial writes/killed processes and replaying from those?
jsonl is a good call since at least each line is independent (vs. I've seen json logs/dbs get corrupted very easily) so should be fairly isolated
There was a problem hiding this comment.
Ya i think this only happens if the process is killed. But lines are small and have to be parseable into the request.
replay halts loudly on any unparseable line — this is asserted by test_malformed_log_line_skipped in python/lib/sift_client/_tests/resources/test_test_results.py:713. The ReportContext.exit path catches that, logs replay instructions, and surfaces the failure.
The user gets pointed at import-test-result-log to retry manually, but the bad line stops automated replay until someone trims it.
0e5693c to
f48ff36
Compare
|
Python docs preview: https://sift-stack.github.io/sift/python/pr-533/ Deployed from |
No description provided.