adm/morph: Fix set-config parameter validation #1167

Merged
fyrchik merged 2 commits from achuprov/frostfs-node:bugfix/set-config-error into master 2024-06-11 15:15:27 +00:00
Member

Signed-off-by: Alexander Chuprov a.chuprov@yadro.com

Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
achuprov changed title from WIP: [#1166] adm/morph: Fix set-config parameter validation to adm/morph: Fix set-config parameter validation 2024-06-07 11:15:47 +00:00
achuprov force-pushed bugfix/set-config-error from 8f91dc29fd to 84348a3636 2024-06-07 11:16:51 +00:00 Compare
fyrchik requested changes 2024-06-07 12:07:12 +00:00
@ -137,6 +137,8 @@ func SetConfigCmd(cmd *cobra.Command, args []string) error {
return wCtx.AwaitTx()
}
const maxECSum = 256
Owner

Looks like a separate commit.

Looks like a separate commit.
Author
Member

fixed

fixed
fyrchik marked this conversation as resolved
@ -151,3 +152,1 @@
if !ok || value < 0 {
return fmt.Errorf("%s must be >= 0, got %v", k, v)
}
intValue, intOk := v.(int64)
Owner

Why don't we cast it inside case branches? The results are only used there.

Why don't we cast it inside `case` branches? The results are only used there.
Author
Member

fixed

fixed
fyrchik marked this conversation as resolved
achuprov force-pushed bugfix/set-config-error from 84348a3636 to a9b93676e0 2024-06-07 13:33:40 +00:00 Compare
dstepanov-yadro approved these changes 2024-06-07 14:20:59 +00:00
fyrchik approved these changes 2024-06-11 15:15:03 +00:00
fyrchik merged commit 41e670c9ba into master 2024-06-11 15:15:26 +00:00
Sign in to join this conversation.
No reviewers
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#1167
No description provided.