CLI binary download: always use HTTP file handler instead of IncludeBinary#5887
Open
n0nick wants to merge 5 commits intoviamrobotics:mainfrom
Open
CLI binary download: always use HTTP file handler instead of IncludeBinary#5887n0nick wants to merge 5 commits intoviamrobotics:mainfrom
n0nick wants to merge 5 commits intoviamrobotics:mainfrom
Conversation
…inary The API service rejects large binary payloads when IncludeBinary=true, causing the CLI to make a wasted round-trip before falling back to HTTP. This removes the IncludeBinary path entirely and always downloads binary files via the HTTP file handler URL from metadata, eliminating the rejected-request overhead. Key changes: - Replace downloadBinary() with downloadSingleBinaryFile() (HTTP-only) - Extract getMatchingBinaryData() to return full BinaryData with URIs - Add downloadBinaryDataFromFilter() parallel worker pool - Refactor dataset download to use metadata already in hand - Remove isLargeFileError and IncludeBinary codepaths Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…taset JSONL Clone the BinaryMetadata proto before setting the resolved FileName, so that downstream consumers (binaryDataToJSONLinesFromMetadata) see the original metadata and don't double-prepend the timestamp. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
IncludeBinary=truegRPC path from binary data export entirely. The API service rejects large binary payloads, causing a wasted round-trip before falling back to HTTP download. Now we always fetch metadata only and download files via the HTTP file handler URL.BinaryDataobjects through the worker pool instead of re-fetching by ID.downloadBinary()withdownloadSingleBinaryFile()(HTTP-only) and addsdownloadBinaryDataFromFilter()parallel worker pool.This is a redo of #5587 except verified this time :)
Manual verification
viam data export binary filterwith small files (< gRPC limit)viam data export binary filterwith large files (> gRPC limit)viam data export binary idswith specific binary data IDsviam data export binary filterwith gzipped filesviam dataset exportwith--only-jsonlflagviam dataset exportwithout--only-jsonl(full download + jsonl)--parallelflag works (try with 1 and with default 100)--timeoutflag works🤖 Generated with Claude Code