Skip to content

Create a subprocess for uploading the report as it goes#533

Closed
ian-sift wants to merge 3 commits into
mainfrom
test-result-delayed-upload-subproc
Closed

Create a subprocess for uploading the report as it goes#533
ian-sift wants to merge 3 commits into
mainfrom
test-result-delayed-upload-subproc

Conversation

@ian-sift
Copy link
Copy Markdown
Contributor

No description provided.

…vents that, when used, defer calls to Sift to the end of the test where the log is then replayed and uploaded.
@ian-sift ian-sift requested a review from alexluck-sift April 10, 2026 01:02
Comment thread python/lib/sift_client/util/test_results/context_manager.py Outdated
simulated_steps_order: list[str] = []
simulated_measurements_by_id: dict[str, TestMeasurement] = {}
simulated_measurements_order: list[str] = []
if incremental:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Base automatically changed from test-result-delayed-upload to main April 13, 2026 18:23
@ian-sift ian-sift force-pushed the test-result-delayed-upload-subproc branch from 0e5693c to f48ff36 Compare May 14, 2026 20:36
@github-actions
Copy link
Copy Markdown
Contributor

Python docs preview: https://sift-stack.github.io/sift/python/pr-533/

Deployed from 16f0785. The link may take up to a minute to become live as GitHub Pages propagates.

@ian-sift ian-sift closed this May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants