cli: Fix netinfo output for empty unknown parameters #1236
No reviewers
TrueCloudLab/storage-core-developers
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
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1236
Loading…
Reference in a new issue
No description provided.
Delete branch "achuprov/frostfs-node:feat/unknown_network_info_parameters"
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?
Ref TrueCloudLab/frostfs-sdk-go#232
Before:
After:
Signed-off-by: Alexander Chuprov a.chuprov@yadro.com
fabc602021
toafeaf01cea
[#99999] cli: Fix netinfo output for empty unknown parametersto cli: Fix netinfo output for empty unknown parameters@ -52,3 +52,2 @@
cmd.Println("FrostFS network configuration (other)")
netInfo.IterateRawNetworkParameters(func(name string, value []byte) {
cmd.Printf(format, name, hex.EncodeToString(value))
netInfo.IterateRawNetworkParameters(func(name string, rawValue []byte) {
I personally think the perfect behaviour was fine (we expect hex, we get empty hex)
I think we should display the empty value (just like with namespace). What do you think about
nil
?The same thing to me.
But if everyone agrees we need this,
empty
would be less Go-specific.@aarifullin / @dstepanov-yadro / @elebedeva What do you think?
We should keep in mind that any cli output may be parsed (like test results).
and
As we can see these output results are not the same format. Either we need to frame non-nil output to quotes or omit it for the first case. I think if we keep it in current format - that's OK.
Pull request closed