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
Owner

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.

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.
fyrchik added 2 commits 2024-12-18 07:07:54 +00:00
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>
cli: Remove unnecessary variable after refactoring
Some checks failed
Vulncheck / Vulncheck (pull_request) Successful in 3m3s
Pre-commit hooks / Pre-commit (pull_request) Successful in 3m37s
Tests and linters / gopls check (pull_request) Successful in 3m59s
Tests and linters / Run gofumpt (pull_request) Successful in 6m11s
DCO action / DCO (pull_request) Failing after 6m40s
Tests and linters / Tests with -race (pull_request) Successful in 6m41s
Build / Build Components (pull_request) Successful in 7m30s
Tests and linters / Tests (pull_request) Successful in 7m44s
Tests and linters / Staticcheck (pull_request) Successful in 7m57s
Tests and linters / Lint (pull_request) Successful in 8m42s
98c789c3ee
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
fyrchik requested review from storage-core-committers 2024-12-18 07:07:54 +00:00
fyrchik requested review from storage-core-developers 2024-12-18 07:07:54 +00:00
fyrchik force-pushed fix-object-hash from 98c789c3ee to e44b84c18c 2024-12-18 07:17:09 +00:00 Compare
aarifullin approved these changes 2024-12-18 07:45:14 +00:00
elebedeva approved these changes 2024-12-18 11:42:23 +00:00
fyrchik merged commit e44b84c18c into master 2024-12-18 12:16:18 +00:00
fyrchik deleted branch fix-object-hash 2024-12-18 12:16:20 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-committers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#1569
No description provided.