cli: Make --range flag required in object hash #1569

Merged
fyrchik merged 2 commits from fyrchik/frostfs-node:fix-object-hash into master 2024-12-18 12:16:18 +00:00

2 commits

Author SHA1 Message Date
e44b84c18c
[#1569] cli: Remove unnecessary variable after refactoring
All checks were successful
DCO action / DCO (pull_request) Successful in 3m26s
Vulncheck / Vulncheck (pull_request) Successful in 3m43s
Tests and linters / Run gofumpt (pull_request) Successful in 5m6s
Tests and linters / Staticcheck (pull_request) Successful in 5m45s
Tests and linters / Lint (pull_request) Successful in 6m40s
Build / Build Components (pull_request) Successful in 8m35s
Pre-commit hooks / Pre-commit (pull_request) Successful in 9m13s
Tests and linters / Tests (pull_request) Successful in 10m19s
Tests and linters / Tests with -race (pull_request) Successful in 10m44s
Tests and linters / gopls check (pull_request) Successful in 10m52s
Tests and linters / Run gofumpt (push) Successful in 3m52s
Tests and linters / Staticcheck (push) Successful in 4m3s
Tests and linters / Lint (push) Successful in 5m41s
Vulncheck / Vulncheck (push) Successful in 8m33s
Pre-commit hooks / Pre-commit (push) Successful in 9m29s
Build / Build Components (push) Successful in 9m58s
Tests and linters / Tests (push) Successful in 9m58s
Tests and linters / Tests with -race (push) Successful in 10m20s
Tests and linters / gopls check (push) Successful in 10m56s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-18 10:17:04 +03:00
bed49e6ace
[#1569] cli: Make --range flag required in object hash
Previously, `object head` was used if no range was provided.
This is wrong on multiple levels:
1. We print an error if the checksum is missing in header,
   even though taking hash is possible.
2. We silently ignore --salt parameter.
3. `--range` is required for Object.RANGEHASH RPC, custom logic for one
   specific usecase has no value.

So we make it required and make CLI command follow more closely
the FrostFS API.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-18 10:17:04 +03:00