Skip to content

cli/object: stream payload without buffering#3535

Merged
cthulhu-rider merged 4 commits intomasterfrom
1932-use-streams-to-marshalunmarshal-objects-payload
Aug 21, 2025
Merged

cli/object: stream payload without buffering#3535
cthulhu-rider merged 4 commits intomasterfrom
1932-use-streams-to-marshalunmarshal-objects-payload

Conversation

@End-rey
Copy link
Contributor

@End-rey End-rey commented Aug 18, 2025

Closes #1932.

I was also thinking about making functions in SDK that I made in the helper package.

@End-rey End-rey force-pushed the 1932-use-streams-to-marshalunmarshal-objects-payload branch from 2932d0e to f891c08 Compare August 19, 2025 15:31
@codecov
Copy link

codecov bot commented Aug 19, 2025

Codecov Report

❌ Patch coverage is 58.33333% with 40 lines in your changes missing coverage. Please review.
✅ Project coverage is 24.86%. Comparing base (22f0daa) to head (3001dbc).
⚠️ Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
internal/object/wire.go 75.00% 14 Missing and 4 partials ⚠️
cmd/neofs-cli/modules/object/get.go 0.00% 13 Missing ⚠️
cmd/neofs-cli/modules/object/put.go 0.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3535      +/-   ##
==========================================
+ Coverage   24.68%   24.86%   +0.17%     
==========================================
  Files         672      675       +3     
  Lines       50052    50129      +77     
==========================================
+ Hits        12357    12466     +109     
+ Misses      36698    36669      -29     
+ Partials      997      994       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@End-rey End-rey force-pushed the 1932-use-streams-to-marshalunmarshal-objects-payload branch from f891c08 to 8c30d4c Compare August 19, 2025 16:30
@End-rey End-rey force-pushed the 1932-use-streams-to-marshalunmarshal-objects-payload branch from 8c30d4c to 68bf563 Compare August 20, 2025 13:30
Do not store the entire payload in memory. For `--binary` input, parse the
header prefix to extract metadata and stream the payload directly from the file
reader to the client writer (progress proxies only payload).
Add shared protobuf wire helpers in `internal/object`, took the code from
the fstree logic head, so I also refactored it there.

Closes #1932.

Signed-off-by: Andrey Butusov <andrey@nspcc.io>
@End-rey End-rey force-pushed the 1932-use-streams-to-marshalunmarshal-objects-payload branch from 68bf563 to 3001dbc Compare August 20, 2025 14:09
Do not store the entire payload in memory, but stream data directly from the
client reader to the output writer.

Refs #1932.

Signed-off-by: Andrey Butusov <andrey@nspcc.io>
Defer Close warnings silenced. Refactor progress bar creation. Error string
should not be capitalized.

Signed-off-by: Andrey Butusov <andrey@nspcc.io>
Signed-off-by: Andrey Butusov <andrey@nspcc.io>
@End-rey End-rey requested a review from cthulhu-rider August 20, 2025 14:11
@cthulhu-rider cthulhu-rider merged commit e7cf1c2 into master Aug 21, 2025
22 checks passed
@cthulhu-rider cthulhu-rider deleted the 1932-use-streams-to-marshalunmarshal-objects-payload branch August 21, 2025 10:17
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.

Use streams to marshal/unmarshal object's payload

3 participants