adm: Do not use actor for readonly commands #1514

Merged
fyrchik merged 6 commits from fyrchik/frostfs-node:only-read-only into master 2024-11-21 14:37:35 +00:00

6 commits

Author SHA1 Message Date
bd8459312a
[#1514] adm: Remove --alphabet-wallets flag from readonly commands
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 1m45s
DCO action / DCO (pull_request) Successful in 2m14s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m52s
Vulncheck / Vulncheck (pull_request) Successful in 2m48s
Build / Build Components (pull_request) Successful in 3m3s
Tests and linters / gopls check (pull_request) Successful in 3m20s
Tests and linters / Staticcheck (pull_request) Successful in 3m33s
Tests and linters / Lint (pull_request) Successful in 4m21s
Tests and linters / Tests (pull_request) Successful in 4m56s
Tests and linters / Tests with -race (pull_request) Successful in 6m38s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-21 11:53:24 +03:00
4d494dd180
[#1514] adm/nns: Rename getRPCClient() to nnsWriter()
Make it more specific and similar to nnsReader().

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-21 11:53:24 +03:00
daed12c68b
[#1514] adm/nns: Do not return hash from getRPCClient()
It was unused and we employ better abstractions now.
gopatch:
```
@@
var a, b expression
@@
-a, b, _ := getRPCClient(...)
+a, b := getRPCClient(...)
```

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-21 11:53:24 +03:00
efc9b8813e
[#1514] adm/nns: Do not create actor for readonly commands
`nns get-records` and `nns tokens` command do not need to sign anything,
so remove useless actor and use invoker directly.
`NewLocalActor()` is only used in `ape` and `nns` packages. `ape`
package seem to use it correctly, only when alphabet wallets are
provided, so no changes there.
Also, remove --alphabet-wallets flag from commands that do not need it.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-21 11:53:24 +03:00
55027a1c2f
[#1514] adm/nns: Use nns.GetAllRecords() wrapper
It was not possible previously, because GetAllRecords() was not declared
safe in frostfs-contract.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-21 11:53:24 +03:00
02dae8aa0d
[#1514] go.mod: Update frostfs-contract to v0.21.0-rc.3
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-21 11:53:24 +03:00