nspcc-dev / nspcc-dev/neofs-node

Require `--file` flag in CLI GET/RANGE commands by default

Open
#3,062 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement I3 neofs-cli S4 U4
Dominant language
Go
Stars
38
Forks
51
Avg merge
1d 20h
Merged PRs (30d)
38

Description

Is your feature request related to a problem? Please describe.

currently, neofs-cli get|range commands writes received payload into stdout. User can specify --file to write payload by this path. But it is very easy to forget, im doing this again and again. If object is big, or big range is requsted, the terminal turns into a mess

Describe the solution you'd like

require --file flag by default. Treat stdout|stderr|? as corresponding streams

Describe alternatives you've considered

  1. default to ./<OID> path
  2. if data is under some limit, go as now. If bigger, print partially with abc...def up to the limit
  3. combine 1 and 2

Additional context

just got caught and was reviewing 65M of data

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the neofs-cli get and range command entry points and inspect how the existing --file option and stdout/stderr output are handled. Clarify the intended default behavior for payloads and the stdout, stderr, and ? stream values; done means both commands no longer unexpectedly write large payloads to the terminal.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.