Refactor UX for bearer create command #523
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
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#523
Loading…
Reference in a new issue
No description provided.
Delete branch "dstepanov-yadro/frostfs-node:fix/cli-bearer-create"
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
issuedAt
ornotValidBefore
are not specified, then use current epoch value.Also added RPC endpoint value check.
Closes #512
cb6d06ce7c
to1137d26591
@ -68,3 +66,3 @@
commonCmd.ExitOnErr(cmd, "can't parse --"+notValidBeforeFlag+" flag: %w", err)
if iatRelative || expRelative || nvbRelative {
iatMissing := !flagSpecified(cmd, issuedAtFlag)
if this util function is used only negated, wasn't it easier to not have it and instead do
and so on?
cmd.Flags().Lookup(issuedAtFlag)
returns not nil, if flag with such name defined by code. We must to checkChanged
too:@ -69,2 +67,3 @@
if iatRelative || expRelative || nvbRelative {
iatMissing := !flagSpecified(cmd, issuedAtFlag)
nvbMissing := !flagSpecified(cmd, notValidBeforeFlag)
Couldn't we just set the default value
+0
in the flag definition?nice idea! fixed
1137d26591
to5f7e455b92
@dstepanov-yadro there are conflicts after #524
LGTM
5f7e455b92
toa0c7045f29