Commit graph

242 commits

Author SHA1 Message Date
d00c606fee [#652] adm: Group independent stages in batches
Some checks failed
Vulncheck / Vulncheck (push) Successful in 1m3s
Build / Build Components (push) Has been cancelled
Pre-commit hooks / Pre-commit (push) Successful in 1m25s
OCI image / Build container images (push) Has been cancelled
Tests and linters / Lint (push) Has been cancelled
Tests and linters / Tests (push) Has been cancelled
Tests and linters / Tests with -race (push) Has been cancelled
Tests and linters / Staticcheck (push) Has been cancelled
Tests and linters / gopls check (push) Has been cancelled
Tests and linters / Run gofumpt (push) Has been cancelled
Each stage waits until transaction persists. This is needed to ensure
the next stage will see the result of the previous one. However, some of
the stages do not depend one on another, so we may execute them in
parallel.

`AwaitDisabled` flag is used to localize this batching on the code
level. We could've removed `AwaitTx()` from respective stages, but it
seems more error prone.

Close #652.

Change-Id: Ib9c6f6cd5e0db0f31aa1cda8e127b1fad5166336
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-03-28 12:15:21 +00:00
60446bb668 [#1689] adm/helper: Use proper nns bindings import
The one in `neo-go` is for another contract.

Change-Id: Ia1ac2da5e419b48801afdb26df72892d77344e0d
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-03-28 12:15:21 +00:00
bd8ab2d84a [#1689] adm: Remove useless switch in NNSIsAvailable()
After all the refactorings, there is no need to have custom behaviour
for local client.

Change-Id: I99e297cdeffff979524b3f89d3580ab5780e7681
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-03-28 12:15:21 +00:00
bce2f7bef0 [#1689] adm: Reuse neo.NewReader helper in transferNEOFinished()
Some checks failed
Vulncheck / Vulncheck (push) Successful in 1m0s
Pre-commit hooks / Pre-commit (push) Successful in 1m29s
Build / Build Components (push) Successful in 2m10s
Tests and linters / gopls check (push) Successful in 3m33s
Tests and linters / Run gofumpt (push) Successful in 3m36s
Tests and linters / Lint (push) Successful in 3m53s
Tests and linters / Tests with -race (push) Successful in 4m0s
Tests and linters / Tests (push) Successful in 4m19s
Tests and linters / Staticcheck (push) Successful in 4m20s
OCI image / Build container images (push) Has been cancelled
Change-Id: I27980ed87436958cb4d27278e30e05da021d1506
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-03-28 12:10:37 +00:00
c2c05e2228 [#1689] adm: Reuse ReadOnlyInvoker in registerCandidateRange()
Change-Id: I544d10340825494b45a62700fa247404c18f746a
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-03-28 12:10:37 +00:00
0a38571a10 [#1689] adm: Simplify getCandidateRegisterPrice()
After all the refactoring, there is no more need to have custom branch
for the local client.

Change-Id: I274305b0c390578fb4583759135d3e7ce58873dc
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-03-28 12:10:31 +00:00
e7e91ef634 [#1689] adm: Remove storagecfg subcommand
It is unused and unsupported for a long time.

Change-Id: I570567db4e8cb202e41286064406ad85cd0e7a39
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-03-21 15:05:02 +00:00
fde2649e60 [#1678] adm: Fix frostfs-adm morph list-subjects & list-group-subjects
All checks were successful
Pre-commit hooks / Pre-commit (push) Successful in 1m21s
Vulncheck / Vulncheck (push) Successful in 1m19s
Build / Build Components (push) Successful in 2m5s
Tests and linters / Tests (push) Successful in 3m37s
Tests and linters / Run gofumpt (push) Successful in 3m30s
Tests and linters / Lint (push) Successful in 4m6s
Tests and linters / Staticcheck (push) Successful in 4m3s
Tests and linters / gopls check (push) Successful in 5m9s
OCI image / Build container images (push) Successful in 5m28s
Tests and linters / Tests with -race (push) Successful in 5m25s
`include-names` for `list-subjects` returns error `invalid response subject struct`
because `ListSubjects` returns only subject addresses (see frostfs-contract).

Replace `include-names` with `extended` as now all subject info printed.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-03-14 13:42:29 +00:00
997759994a
[#1676] golangci: Enable gci linter
All checks were successful
Vulncheck / Vulncheck (pull_request) Successful in 1m16s
Build / Build Components (pull_request) Successful in 1m47s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m45s
Tests and linters / Run gofumpt (pull_request) Successful in 2m59s
Tests and linters / Lint (pull_request) Successful in 3m33s
Tests and linters / Staticcheck (pull_request) Successful in 3m27s
Tests and linters / gopls check (pull_request) Successful in 3m30s
Tests and linters / Tests with -race (pull_request) Successful in 3m33s
Tests and linters / Tests (pull_request) Successful in 2m42s
DCO action / DCO (pull_request) Successful in 25s
Vulncheck / Vulncheck (push) Successful in 1m0s
Pre-commit hooks / Pre-commit (push) Successful in 1m28s
Build / Build Components (push) Successful in 1m47s
Tests and linters / Run gofumpt (push) Successful in 2m51s
Tests and linters / Staticcheck (push) Successful in 2m55s
Tests and linters / Tests (push) Successful in 2m58s
Tests and linters / Lint (push) Successful in 3m1s
Tests and linters / Tests with -race (push) Successful in 3m29s
Tests and linters / gopls check (push) Successful in 4m1s
OCI image / Build container images (push) Successful in 4m43s
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-03-13 12:04:01 +03:00
ecb6b0793c [#1671] Use slices.ContainsFunc() where possible
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m18s
Pre-commit hooks / Pre-commit (push) Successful in 1m25s
Build / Build Components (push) Successful in 1m59s
Tests and linters / Run gofumpt (push) Successful in 2m31s
Tests and linters / Tests (push) Successful in 2m56s
Tests and linters / Lint (push) Successful in 3m2s
Tests and linters / Staticcheck (push) Successful in 2m59s
Tests and linters / gopls check (push) Successful in 3m44s
Tests and linters / Tests with -race (push) Successful in 4m13s
OCI image / Build container images (push) Successful in 4m27s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-03-13 08:12:20 +00:00
40536d8a06 [#1671] Use fmt.Appendf where warranted
Fix gopls warnings:
```
cmd/frostfs-adm/internal/modules/morph/config/config.go:68:20-64: Replace []byte(fmt.Sprintf...) with fmt.Appendf
````

gopatch:
```
@@
var f expression
@@
-[]byte(fmt.Sprintf(f, ...))
+fmt.Appendf(nil, f, ...)
```

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-03-13 08:12:20 +00:00
2005fdda09
[#1667] shard: Drop shard pool
All checks were successful
DCO action / DCO (pull_request) Successful in 47s
Vulncheck / Vulncheck (pull_request) Successful in 1m4s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m25s
Build / Build Components (pull_request) Successful in 1m53s
Tests and linters / Run gofumpt (pull_request) Successful in 2m43s
Tests and linters / Lint (pull_request) Successful in 3m13s
Tests and linters / Tests (pull_request) Successful in 3m24s
Tests and linters / gopls check (pull_request) Successful in 3m30s
Tests and linters / Staticcheck (pull_request) Successful in 3m33s
Tests and linters / Tests with -race (pull_request) Successful in 3m35s
Vulncheck / Vulncheck (push) Successful in 1m1s
Pre-commit hooks / Pre-commit (push) Successful in 1m27s
Build / Build Components (push) Successful in 1m58s
Tests and linters / Run gofumpt (push) Successful in 2m40s
Tests and linters / Staticcheck (push) Successful in 3m3s
Tests and linters / Lint (push) Successful in 3m7s
Tests and linters / Tests (push) Successful in 3m23s
Tests and linters / gopls check (push) Successful in 3m41s
Tests and linters / Tests with -race (push) Successful in 3m47s
OCI image / Build container images (push) Successful in 4m45s
After adding an ops limiter, shard's `put` pool is redundant.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-03-11 13:59:51 +03:00
2ff032db90 [#1654] adm: Get 'gasInitialTotalSupply' from network
All checks were successful
Vulncheck / Vulncheck (push) Successful in 1m1s
Pre-commit hooks / Pre-commit (push) Successful in 1m22s
Build / Build Components (push) Successful in 1m56s
Tests and linters / Run gofumpt (push) Successful in 3m24s
Tests and linters / Tests (push) Successful in 3m29s
Tests and linters / Staticcheck (push) Successful in 3m34s
Tests and linters / Lint (push) Successful in 3m38s
Tests and linters / Tests with -race (push) Successful in 4m14s
Tests and linters / gopls check (push) Successful in 4m16s
OCI image / Build container images (push) Successful in 5m4s
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-02-27 11:57:45 +00:00
37972a91c1 [#1654] adm: Make 'morph-init' idempotent
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-02-27 11:57:45 +00:00
304bee938b
[#1614] adm/nns: Add 'set-admin'
All checks were successful
DCO action / DCO (pull_request) Successful in 37s
Vulncheck / Vulncheck (pull_request) Successful in 52s
Tests and linters / Run gofumpt (pull_request) Successful in 1m19s
Build / Build Components (pull_request) Successful in 1m29s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m40s
Tests and linters / Staticcheck (pull_request) Successful in 2m12s
Tests and linters / Lint (pull_request) Successful in 3m2s
Tests and linters / Tests (pull_request) Successful in 4m42s
Tests and linters / Tests with -race (pull_request) Successful in 5m0s
Tests and linters / gopls check (pull_request) Successful in 5m19s
Vulncheck / Vulncheck (push) Successful in 59s
Tests and linters / Run gofumpt (push) Successful in 1m25s
Pre-commit hooks / Pre-commit (push) Successful in 1m33s
Build / Build Components (push) Successful in 2m4s
Tests and linters / Staticcheck (push) Successful in 2m22s
Tests and linters / Lint (push) Successful in 3m17s
OCI image / Build container images (push) Successful in 4m16s
Tests and linters / Tests (push) Successful in 4m45s
Tests and linters / gopls check (push) Successful in 5m35s
Tests and linters / Tests with -race (push) Successful in 5m38s
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-02-11 12:00:51 +03:00
b2163ff44c
[#1614] adm: Allow use any wallets
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-02-11 12:00:25 +03:00
076952f4c7
[#1614] adm/frostfsid: Add 'delete-kv'
All checks were successful
DCO action / DCO (pull_request) Successful in 44s
Vulncheck / Vulncheck (pull_request) Successful in 1m2s
Build / Build Components (pull_request) Successful in 1m36s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m37s
Tests and linters / gopls check (pull_request) Successful in 2m40s
Tests and linters / Tests with -race (pull_request) Successful in 3m15s
Tests and linters / Lint (pull_request) Successful in 4m33s
Tests and linters / Staticcheck (pull_request) Successful in 4m39s
Tests and linters / Run gofumpt (pull_request) Successful in 4m41s
Tests and linters / Tests (pull_request) Successful in 4m50s
Vulncheck / Vulncheck (push) Successful in 1m10s
Tests and linters / Run gofumpt (push) Successful in 1m23s
Pre-commit hooks / Pre-commit (push) Successful in 1m41s
Build / Build Components (push) Successful in 1m55s
Tests and linters / Staticcheck (push) Successful in 2m21s
Tests and linters / Lint (push) Successful in 3m9s
OCI image / Build container images (push) Successful in 4m19s
Tests and linters / Tests with -race (push) Successful in 5m17s
Tests and linters / Tests (push) Successful in 5m19s
Tests and linters / gopls check (push) Successful in 5m29s
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-02-10 15:28:29 +03:00
a7145ca9bf
[#1614] adm/frostfsid: Add 'set-kv'
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-02-10 15:26:12 +03:00
78bfd12229
[#1622] adm: Return non zero return code if metabase upgrade failed
All checks were successful
DCO action / DCO (pull_request) Successful in 46s
Tests and linters / Run gofumpt (pull_request) Successful in 49s
Vulncheck / Vulncheck (pull_request) Successful in 1m16s
Build / Build Components (pull_request) Successful in 2m18s
Tests and linters / Staticcheck (pull_request) Successful in 2m12s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m20s
Tests and linters / Tests (pull_request) Successful in 2m21s
Tests and linters / Lint (pull_request) Successful in 5m29s
Tests and linters / Tests with -race (pull_request) Successful in 5m31s
Tests and linters / gopls check (pull_request) Successful in 5m57s
Tests and linters / Run gofumpt (push) Successful in 37s
Vulncheck / Vulncheck (push) Successful in 52s
Pre-commit hooks / Pre-commit (push) Successful in 1m32s
Build / Build Components (push) Successful in 2m4s
Tests and linters / Staticcheck (push) Successful in 2m31s
Tests and linters / Lint (push) Successful in 3m20s
Tests and linters / Tests (push) Successful in 4m3s
OCI image / Build container images (push) Successful in 4m10s
Tests and linters / Tests with -race (push) Successful in 5m13s
Tests and linters / gopls check (push) Successful in 5m19s
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-01-30 15:31:25 +03:00
c98357606b
[#1606] Use slices.Clone()/bytes.Clone() where possible
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 28s
DCO action / DCO (pull_request) Successful in 42s
Vulncheck / Vulncheck (pull_request) Successful in 1m0s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m33s
Build / Build Components (pull_request) Successful in 1m46s
Tests and linters / Staticcheck (pull_request) Successful in 2m0s
Tests and linters / Lint (pull_request) Successful in 2m55s
Tests and linters / Tests (pull_request) Successful in 4m17s
Tests and linters / Tests with -race (pull_request) Successful in 5m14s
Tests and linters / gopls check (pull_request) Successful in 5m17s
Tests and linters / Run gofumpt (push) Successful in 27s
Vulncheck / Vulncheck (push) Successful in 51s
Pre-commit hooks / Pre-commit (push) Successful in 1m25s
Build / Build Components (push) Successful in 2m10s
Tests and linters / Staticcheck (push) Successful in 2m25s
Tests and linters / Lint (push) Successful in 3m24s
Tests and linters / Tests (push) Successful in 4m4s
OCI image / Build container images (push) Successful in 4m21s
Tests and linters / Tests with -race (push) Successful in 4m25s
Tests and linters / gopls check (push) Successful in 4m49s
gopatch:
```
@@
var from, to expression
@@
+import "bytes"
-to := make([]byte, len(from))
-copy(to, from)
+to := bytes.Clone(from)

@@
var from, to expression
@@
+import "bytes"
-to = make([]byte, len(from))
-copy(to, from)
+to = bytes.Clone(from)

@@
var from, to, typ expression
@@
+import "slices"
-to := make([]typ, len(from))
-copy(to, from)
+to := slices.Clone(from)

@@
var from, to, typ expression
@@
+import "slices"
-to = make([]typ, len(from))
-copy(to, from)
+to = slices.Clone(from)
```

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-01-17 14:50:14 +03:00
fb928616cc
[#1598] golangci: Enable unparam linter
All checks were successful
DCO action / DCO (pull_request) Successful in 35s
Vulncheck / Vulncheck (pull_request) Successful in 1m6s
Build / Build Components (pull_request) Successful in 1m45s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m44s
Tests and linters / Staticcheck (pull_request) Successful in 1m59s
Tests and linters / gopls check (pull_request) Successful in 2m19s
Tests and linters / Run gofumpt (pull_request) Successful in 2m35s
Tests and linters / Lint (pull_request) Successful in 2m56s
Tests and linters / Tests with -race (pull_request) Successful in 3m48s
Tests and linters / Tests (pull_request) Successful in 3m58s
To drop unnecessary parameters and return values.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-01-14 09:06:47 +03:00
dc410fca90 [#1590] adm: Accept many accounts in proxy-* commands
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 38s
Vulncheck / Vulncheck (push) Successful in 1m9s
Pre-commit hooks / Pre-commit (push) Successful in 1m27s
Tests and linters / Tests (push) Successful in 2m1s
Tests and linters / Staticcheck (push) Successful in 2m19s
Tests and linters / Tests with -race (push) Successful in 2m43s
Tests and linters / gopls check (push) Successful in 2m50s
Tests and linters / Lint (push) Successful in 3m9s
Build / Build Components (push) Successful in 1m25s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-01-09 07:51:54 +00:00
cddcd73f04 [#1590] adm: Make --account flag required in proxy-* commands
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-01-09 07:51:54 +00:00
ea868e09f8
[#1582] adm: Use int64 type and the default value for --till flag
All checks were successful
Vulncheck / Vulncheck (pull_request) Successful in 7m43s
Pre-commit hooks / Pre-commit (pull_request) Successful in 8m36s
Build / Build Components (pull_request) Successful in 9m19s
Tests and linters / gopls check (pull_request) Successful in 9m28s
Tests and linters / Staticcheck (pull_request) Successful in 9m34s
Tests and linters / Lint (pull_request) Successful in 10m34s
DCO action / DCO (pull_request) Successful in 3m9s
Tests and linters / Run gofumpt (pull_request) Successful in 4m5s
Tests and linters / Tests (pull_request) Successful in 4m38s
Tests and linters / Tests with -race (pull_request) Successful in 5m49s
Vulncheck / Vulncheck (push) Successful in 4m14s
Tests and linters / Run gofumpt (push) Successful in 4m35s
Build / Build Components (push) Successful in 5m16s
Pre-commit hooks / Pre-commit (push) Successful in 5m15s
Tests and linters / Staticcheck (push) Successful in 5m36s
Tests and linters / gopls check (push) Successful in 5m45s
Tests and linters / Tests (push) Successful in 6m9s
Tests and linters / Tests with -race (push) Successful in 6m17s
Tests and linters / Lint (push) Successful in 6m32s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-25 14:22:28 +03:00
31d3d299bf
[#1582] adm: Unify promps for reading a password
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-25 14:22:28 +03:00
b5b4f78b49
[#1582] adm: Allow using the default account in deposit-notary
It has never worked, actually.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-25 14:22:28 +03:00
e64871c3fd
[#1578] adm: Allow to transfer GAS to multiple recepients
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-23 11:17:22 +03:00
303cd35a01
[#1578] adm: Remove unnecessary comments in RefillGasCmd
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-23 11:17:22 +03:00
bb9ba1bce2
[#1578] adm: Remove bool flag from refillGas()
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-23 11:17:22 +03:00
db03742d33
[#1578] adm: Reword help message for morph refill-gas
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-23 11:17:22 +03:00
6a51086030
[#1538] morph/client: Remove TryNotary() option from side-chain contracts
The notary is always enabled and this option does always work.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-04 15:30:58 +03:00
aac65001e5 [#1522] adm/frostfsid: Remove unreachable condition
All checks were successful
Vulncheck / Vulncheck (push) Successful in 2m35s
Tests and linters / Staticcheck (push) Successful in 2m52s
Tests and linters / Run gofumpt (push) Successful in 2m55s
Build / Build Components (push) Successful in 3m13s
Pre-commit hooks / Pre-commit (push) Successful in 3m15s
Tests and linters / gopls check (push) Successful in 3m53s
Tests and linters / Lint (push) Successful in 4m4s
Tests and linters / Tests (push) Successful in 4m21s
Tests and linters / Tests with -race (push) Successful in 4m59s
SendConsensusTx() modifies SendTxs field, if it is not the case, there
is a bug in code.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-26 08:13:35 +00:00
1170370753 [#1522] adm/helper: Rename createSingleAccounts() -> getSingleAccounts()
It doesn't create any accounts, purely finds them in the wallet.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-26 08:13:35 +00:00
9e275d44c8 [#1522] adm/helper: Unexport DefaultClientContext()
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-26 08:13:35 +00:00
2469e0c683 [#1522] adm/helper: Remove NewActor() helper
It is used once, it is used only internally and it is single-statement.
I see no justification in having it as a separate function.
It introduces confusion, because we also have NewLocalActor().

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-26 08:13:35 +00:00
a6ef4ab524 [#1522] adm/helper: Rename GetN3Client() -> NewRemoteClient()
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-26 08:13:35 +00:00
49959c4166 [#1522] adm/helper: Unexport GetFrostfsIDAdmin()
It is used in `helper` package only, besides unit-tests.
Move unit-tests to the same package, where they belong.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-26 08:13:35 +00:00
61ee1b5610 [#1522] adm: Simplify LocalClient.SendRawTransaction()
The old code was there before Copy() method was introduced.
It was also supposed to check errors, however, they are already checked
server-side.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-26 08:13:35 +00:00
b10c954377 [#1522] adm: Split NewLocalClient() into functions
No functional changes.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-26 08:13:35 +00:00
1605391628 [#1522] adm/helper: Simplify Client interface
Just reuse `actor.RPCActor`. No functional changes.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-26 08:13:35 +00:00
b1766e47c7 [#1522] adm/helper: Remove unused GetCommittee() method from the Client interface
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-26 08:13:35 +00:00
caa4253249 [#1522] adm: Remove unnecessary variable declaration
It is better to have small scope.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-26 08:13:35 +00:00
0e5524dac7 [#1515] adm: Print address in base58 format in morph ape get-admin
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 1m45s
Pre-commit hooks / Pre-commit (push) Successful in 2m39s
Vulncheck / Vulncheck (push) Successful in 2m30s
Tests and linters / gopls check (push) Successful in 3m6s
Build / Build Components (push) Successful in 3m27s
Tests and linters / Staticcheck (push) Successful in 3m50s
Tests and linters / Lint (push) Successful in 4m43s
Tests and linters / Tests (push) Successful in 4m50s
Tests and linters / Tests with -race (push) Successful in 6m9s
Signed-off-by: George Bartolomey <george@bh4.ru>
2024-11-25 10:38:05 +00:00
99f9e59de9 [#1514] adm: Remove --alphabet-wallets flag from readonly commands
All checks were successful
Vulncheck / Vulncheck (push) Successful in 2m24s
Tests and linters / Run gofumpt (push) Successful in 3m1s
Pre-commit hooks / Pre-commit (push) Successful in 3m11s
Build / Build Components (push) Successful in 3m17s
Tests and linters / Staticcheck (push) Successful in 3m16s
Tests and linters / gopls check (push) Successful in 3m44s
Tests and linters / Lint (push) Successful in 3m57s
Tests and linters / Tests (push) Successful in 4m34s
Tests and linters / Tests with -race (push) Successful in 4m44s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-21 14:37:34 +00:00
256f96e252 [#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 14:37:34 +00:00
e5ea95c045 [#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 14:37:34 +00:00
9073e555db [#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 14:37:34 +00:00
2771fdb8c7 [#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 14:37:34 +00:00
2e2c62147d
[#1513] adm: Move ProtoConfigPath from constants to commonflags package
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 1m47s
DCO action / DCO (pull_request) Successful in 2m4s
Vulncheck / Vulncheck (pull_request) Successful in 2m41s
Pre-commit hooks / Pre-commit (pull_request) Successful in 3m2s
Build / Build Components (pull_request) Successful in 3m18s
Tests and linters / Staticcheck (pull_request) Successful in 3m31s
Tests and linters / gopls check (pull_request) Successful in 3m33s
Tests and linters / Lint (pull_request) Successful in 4m25s
Tests and linters / Tests (pull_request) Successful in 5m7s
Tests and linters / Tests with -race (pull_request) Successful in 6m23s
Tests and linters / Run gofumpt (push) Successful in 3m29s
Tests and linters / Staticcheck (push) Successful in 4m3s
Vulncheck / Vulncheck (push) Successful in 3m57s
Pre-commit hooks / Pre-commit (push) Successful in 4m11s
Build / Build Components (push) Successful in 4m33s
Tests and linters / gopls check (push) Successful in 4m53s
Tests and linters / Tests with -race (push) Successful in 5m15s
Tests and linters / Lint (push) Successful in 5m27s
Tests and linters / Tests (push) Successful in 10m1s
Refs #932

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-21 09:39:06 +03:00
a339b52a60 [#1501] adm: Refactor APE-chains managing subcommands
* Use `cmd/internal/common/ape` parser commands within `ape`
  subcommands
* Use flag names from `cmd/internal/common/ape

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-11-20 07:58:32 +00:00