Skip to content

rust(feat): keep a run open across file imports - #889

Merged
ian-sift merged 2 commits into
mainfrom
file-upload-leave-run-open-cli
Nov 16, 2026
Merged

ian-sift merged 2 commits into
mainfrom
file-upload-leave-run-open-cli

Conversation

@ian-sift

@ian-sift ian-sift commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • sift-cli import accepts --leave-run-open for CSV, TDMS, HDF5, ULog, MCAP, and Parquet. A finished import marks its run stopped unless the flag is set. Stop the run after the last import. The flag does nothing when the import has no run.
  • import csv accepts --run-id. --run creates a new run each time, because run names are not unique. Use --run-id to add a file to a run left open by --leave-run-open.
  • The import docs say to pass several files in one Python call when they share a run. The CLI still imports one file per command. The second CLI command uses --run-id, not a repeated --run.
  • The Python side merged in python(feat): keep a run open across file imports #848. This pull request is the CLI only, rebased onto main.

Test plan

  • cargo test -p sift_cli --bin sift-cli import:: passed 183 tests, covering CSV, Parquet, TDMS, HDF5, ULog, and MCAP
  • Each format asserts leave_run_open on the built upload request. The CSV test also asserts --run-id lands on the request and leaves the run name empty.
  • Manual sift-cli import csv of one CSV and of two CSVs against the local backend

Local verification

Built sift-cli from this branch and imported against the local backend (localhost:50051 / localhost:8080) with --disable-tls --wait.

  • One CSV, asset rust-cli-one-c0ae6f7c, run rust-cli-one-c0ae6f7c: the command exited 0. The import status is SUCCEEDED. The run is stopped. The asset has channel voltage.
  • Two CSVs, asset rust-cli-pair-81777058, both commands using --run rust-cli-pair-81777058: both commands exited 0 and both imports are SUCCEEDED.
    • a.csv with --leave-run-open left its run open (780d905b-0a2a-429d-81b2-bdbeba93a4af, channel voltage_a).
    • b.csv without the flag created a second run of the same name and stopped it (bacb03ac-8e6c-4dea-8196-118438022a38, channel voltage_b). The CSV importer gives each --run name a new client key, so the second file does not attach to the open run.

The docs now tell the second command to pass --run-id of that open run. A multi-file CLI upload is still the Python client's job.

Base automatically changed from file-upload-leave-run-open-flag to main November 16, 2026 23:05
`import` accepts `--leave-run-open`. A finished import marks its run
stopped unless the flag is set. The import docs point at one Python
call when several files share a run.
--run creates a new run each time, because run names are not unique.
--run-id adds a file to the run left open by --leave-run-open. The
other import builders read that flag from the shared args.
@ian-sift
ian-sift force-pushed the file-upload-leave-run-open-cli branch from 02a6ec9 to e058e61 Compare November 16, 2026 23:08
@ian-sift
ian-sift enabled auto-merge (squash) November 16, 2026 23:08
@ian-sift
ian-sift merged commit fffd3ec into main Nov 16, 2026
22 checks passed
@ian-sift
ian-sift deleted the file-upload-leave-run-open-cli branch November 16, 2026 23:23
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