adm: Fix panic on negative value #1127
No reviewers
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1127
Loading…
Reference in a new issue
No description provided.
Delete branch "Anoke/frostfs-node:negative-value-issue"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
If there was an error (it tried parse negative value in ParseUint), the If condition executes and by trying send an error it tries to get value args[1] which is not exists. I changed it to args[0] and it works. (args = [ExecFeeFactor=-1])
@ -49,3 +49,3 @@
value, err := strconv.ParseUint(v, 10, 32)
if err != nil {
return fmt.Errorf("can't parse parameter value '%s': %w", args[1], err)
return fmt.Errorf("can't parse parameter value '%s': %w", args[0], err)
Can you change the commit message format to:
[#1067] frostfs-adm: Fix panic on negative value
.Can you include all changes in one commit?
Most likely, it should be
args[i]
, we do this inside the loop.I meant the commit message, not the title of the Pull Request. Please use the command:
git commit -s -m "[#1067] frostfs-adm: Fix panic on negative value"
If you're using an IDE to make commits, ensure that
commit signing
is enabled in the settings.frostfs-adm panics on negative values #1067to [#1067] frostfs-adm: Fix panic on negative valuee18a38c85e
to0b7d706450
Commit message still needs care.
0b7d706450
toc62178004a
c62178004a
tod7feb1019e
@achuprov made a small mistake, by convention we use
adm:
, notfrostfs-adm:
for prefix.Also, signoff is mandatory,
git commit
has--signoff
option which adds a special mark to commit, see theDCO
action which fails.[#1067] frostfs-adm: Fix panic on negative valueto adm: Fix panic on negative valueOther than that, LGTM
8b791b3675
toc4a6e3ec8d
c4a6e3ec8d
to0932c9f7bf