Repository navigation
python(feat): keep a run open across file imports - #848
Merged
Merged
Conversation
Contributor
|
Python docs preview: https://sift-stack.github.io/sift/python/pr-848/ Deployed from |
Several files can land in one run before run-stop automations fire. The Python upload helpers take leave_run_open, and sift-cli import commands take --leave-run-open.
The sync DataImportAPI type comes from the generated stub. Without leave_run_open there, mypy rejects the argument at the Run.import_data call site.
ian-sift
force-pushed
the
file-upload-leave-run-open-flag
branch
from
November 12, 2026 19:31
341d776 to
e886247
Compare
…-open-flag # Conflicts: # rust/crates/sift_cli/CHANGELOG.md
Callers can pass several paths to one import so those files share a run.
Both import paths resolved the run the same way. The batch tests asserted on the typed client methods, which pyright rejects.
Callers who already have the files were told to upload them one at a time. Pass the paths together instead.
A list of paths still uploads as one zip. A mapping of path to config overrides detection for the files it names. The batch upload also drops the manual temp-directory cleanup and the data-type cast.
Python and the CLI release separately. The flag ships in a pull request stacked on this one.
Config matching and the zip live with the other import helpers, so tests call them without a client. One file and several files share config, asset, and run resolution, and differ only at the upload.
alexluck-sift
approved these changes
Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
leave_run_opentoCreateDataImportFromUrlandCreateDataImportFromUpload. Omitting it keeps the current behavior: a finished import stops its run and fires run-stop automations.import_from_pathandRun.import_datatakeleave_run_open(default false). Set it when more files are still coming, then callrun.stop()after the last import.Test plan
import_from_pathcall to the local backendBackend verification
Uploaded
a.csvandb.csvtogether withimport_from_pathagainst the local backend (localhost:50051/localhost:8080). The client created one import, the upload returned HTTP 200, and the worker read both files (voltage_aandvoltage_b) and created the run.