Skip to content

APP-17380 Export single sequence - #6355

Closed
Katie Peters (katiepeters) wants to merge 2 commits into
viamrobotics:mainfrom
katiepeters:APP-17380
Closed

APP-17380 Export single sequence#6355
Katie Peters (katiepeters) wants to merge 2 commits into
viamrobotics:mainfrom
katiepeters:APP-17380

Conversation

@katiepeters

Copy link
Copy Markdown
Member

No description provided.

@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Aug 13, 2026
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Aug 17, 2026
Three independent fixes to commands that already exist, split out of the
`data export sequence` work that surfaced them.

--parallel=0 hung. The flag is a uint with no validation, so 0 was accepted;
with zero workers the ID producer blocks forever on a send nobody reads and
the command hangs instead of failing. `data export binary filter` and the
binary `dataset export` both did this. Rejected at the flag now, via a
Validator on all three --parallel flags, which urfave runs only on values
the user actually set. downloadSequenceBinaryBlobs' ad-hoc `if parallel ==
0` fallback goes with it, and the five literal 100s collapse into
defaultParallelBinaryDownloads.

A failing download hung too, by a different route: getMatchingBinaryIDs sent
into the id channel bare, so when an action failed and the workers cancelled
and returned, the producer blocked forever on a full buffer. It selects on
ctx now.

actionOnBinaryData took only an id, so the driver's cancellable context
could not reach it: on first error the in-flight action ran to completion
against whatever context its closure had captured. Two of the six call sites
were passing context.Background() outright. performActionOnBinaryDataFromFilter
takes a ctx and threads it through.

Adds pluralize and uses it for the "%d files" style messages, which said
"1 files" throughout.

Both hangs have regression tests that time out if the fix is removed.
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Aug 18, 2026
cli tests are named for the function under test -- TestDownloadBinarySkipsExisting
drives downloadBinary, TestDataQuerySQLAction drives dataQuerySQLAction, and so on
for twelve straight tests in client_test.go. The two added here were the only ones
named for a command they never reached.

Rather than rename them down, TestDataExportBinaryAction now drives
dataExportBinaryAction, so it also covers --part-id becoming the filter. The
producer-deadlock case folds in as a second subtest and gets a more realistic
trigger: the download itself fails via BinaryDataByIDs, instead of a stubbed action
that always errored. binaryFilterFake grows `repeat` and `byIDsErr` for it.
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Aug 18, 2026
@katiepeters

Copy link
Copy Markdown
Member Author

Should not have been opened from fork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test This pull request is marked safe to test from a trusted zone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants