adm: Remove wallet requirement for safe methods #1179
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#1179
Loading…
Reference in a new issue
No description provided.
Delete branch "achuprov/frostfs-node:bugfix/remove-wallet-requirement-for-safe-methods"
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?
Close #1159
Before
After
This PR changes the behavior of
list-namespaces
list-groups
list-subjects
list-group-subjects
.902c0c8ab5
to9cc1f94360
WIP: bugfix/remove-wallet-requirement-for-safe-methodsto remove wallet requirement for safe methodsAs you have exported util functions from
frostfs-contract
, please, could you refactor morph client for frostfsid contract here: https://git.frostfs.info/TrueCloudLab/frostfs-node/src/branch/master/pkg/morph/client/frostfsid/subject.go?@ -252,3 +262,2 @@
func frostfsidListNamespaces(cmd *cobra.Command, _ []string) {
ffsid, err := newFrostfsIDClient(cmd)
commonCmd.ExitOnErr(cmd, "init contract invoker: %w", err)
c, err := helper.GetN3Client(viper.GetViper())
Why not to move this code to the separate function? All you need in
frostfsidListNamespaces(...)
is a result fromcommonclient.ReadIteratorItems(...)
.Looks like you can reuse it in
frostfsidListSubjects
,frostfsidListGroups
,frostfsidListGroupSubjects
.remove wallet requirement for safe methodsto adm: Remove wallet requirement for safe methodsadm: Remove wallet requirement for safe methodsto WIP: adm: Remove wallet requirement for safe methods9cc1f94360
to0eb0d1d0fe
0eb0d1d0fe
tobd38778c1d
WIP: adm: Remove wallet requirement for safe methodsto adm: Remove wallet requirement for safe methods@ -391,28 +401,29 @@ func frostfsidRemoveSubjectFromGroup(cmd *cobra.Command, _ []string) {
}
func frostfsidListGroupSubjects(cmd *cobra.Command, _ []string) {
c, err := helper.GetN3Client(viper.GetViper())
Looks like here we can use
initInvoker()
too.Could you create a task for this? Would like to merge this PR ASAP.
@ -414,2 +425,2 @@
cmd.Printf("%s (%s)\n", address.Uint160ToString(subjAddr), subj.Name)
for _, group := range groups {
cmd.Printf("%s (%d)\n", group.Name, group.ID)
The diff seems too large: previously this method used
ListGroupSubjects
, now it usesListGroups
, why so?@ -414,2 +425,2 @@
cmd.Printf("%s (%s)\n", address.Uint160ToString(subjAddr), subj.Name)
for _, group := range groups {
cmd.Printf("%s (%d)\n", group.Name, group.ID)
The diff seems too large: previously this method used
ListGroupSubjects
, now it usesListGroups
, why so?bd38778c1d
tobbedf0eaef
@ -315,3 +321,2 @@
subj, err := ffsid.roCli.GetSubject(addr)
commonCmd.ExitOnErr(cmd, "get subject: %w", err)
items, err := unwrap.Array(inv.Call(nmHash, getSubjectContract, addr))
Autogenerated RPC bindings for the
frostfsID
haveGetSubject
(which is almost exactly the same as yourunwrap.Array(...)
), why not use those?@achuprov
You are right. Fixed
bbedf0eaef
to12bec65465
12bec65465
toc9747545ab
c9747545ab
to298281d78a
@ -391,15 +413,22 @@ func frostfsidRemoveSubjectFromGroup(cmd *cobra.Command, _ []string) {
}
func frostfsidListGroupSubjects(cmd *cobra.Command, _ []string) {
Why these changes needed?
fixed
298281d78a
to554a865717
554a865717
toa757cf2f57
Please, check CI error messages