WIP: adm: Allow to use local-dump from every command #1511

Closed
fyrchik wants to merge 2 commits from fyrchik/frostfs-node:adm-improve into master
Owner

Currently, we allow using --local-dump in morph init command.
We also have this flag in other commands, but no --protocol which is
also needed. And in new command we do not have the ability to use local
dump at all.

This commit makes it possible to work either with an RPC or with
local-dump in every command.

Refs .
Refs .

Writing gopatch this time was really satisfying, btw:

@@
var flags expression
@@
-flags.StringP(commonflags.EndpointFlag, ...)
+commonflags.InitRPC(flags)

@@
var flags expression
@@
-_ = viper.BindPFlag(commonflags.EndpointFlag, flags.Lookup(...))
+commonflags.BindRPC(flags)
Currently, we allow using `--local-dump` in `morph init` command. We also have this flag in other commands, but no `--protocol` which is also needed. And in new command we do not have the ability to use local dump at all. This commit makes it possible to work either with an RPC or with local-dump in every command. Refs #1035. Refs TrueCloudLab/frostfs-dev-env#42. Writing gopatch this time was really satisfying, btw: ``` @@ var flags expression @@ -flags.StringP(commonflags.EndpointFlag, ...) +commonflags.InitRPC(flags) @@ var flags expression @@ -_ = viper.BindPFlag(commonflags.EndpointFlag, flags.Lookup(...)) +commonflags.BindRPC(flags) ```
fyrchik added 3 commits 2024-11-20 11:32:30 +00:00
Refs 

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
Currently, we allow using `--local-dump` in `morph init` command.
We also have this flag in other commands, but no `--protocol` which is
also needed. And in new command we do not have the ability to use local
dump at all.

This commit makes it possible to work either with an RPC or with
local-dump in every command.

Refs .
Refs .

Writing gopatch this time was really satisfying, btw:
```
@@
var flags expression
@@

-flags.StringP(commonflags.EndpointFlag, ...)
+commonflags.InitRPC(flags)

@@
var flags expression
@@
-_ = viper.BindPFlag(commonflags.EndpointFlag, flags.Lookup(...))
+commonflags.BindRPC(flags)
```

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
fyrchik force-pushed adm-improve from 39e3339df6 to 08f197c905 2024-11-20 11:32:50 +00:00 Compare
fyrchik requested review from storage-core-committers 2024-11-20 11:32:50 +00:00
fyrchik requested review from storage-core-developers 2024-11-20 11:32:53 +00:00
fyrchik force-pushed adm-improve from 08f197c905 to 53c2a96258 2024-11-20 11:38:06 +00:00 Compare
fyrchik force-pushed adm-improve from 53c2a96258 to e82f79b0a8 2024-11-20 11:38:39 +00:00 Compare
fyrchik changed title from adm: Allow to use local-dump from every command to WIP: adm: Allow to use local-dump from every command 2024-11-20 11:40:35 +00:00
dstepanov-yadro approved these changes 2024-11-20 12:27:54 +00:00
fyrchik closed this pull request 2024-12-04 09:59:16 +00:00
Some checks failed
Tests and linters / Run gofumpt (pull_request) Successful in 3m21s
Required
Details
Pre-commit hooks / Pre-commit (pull_request) Successful in 4m10s
Required
Details
Tests and linters / Tests (pull_request) Successful in 4m16s
Required
Details
DCO action / DCO (pull_request) Failing after 4m29s
Required
Details
Vulncheck / Vulncheck (pull_request) Successful in 5m44s
Required
Details
Tests and linters / Tests with -race (pull_request) Successful in 6m13s
Required
Details
Build / Build Components (pull_request) Successful in 6m23s
Required
Details
Tests and linters / Staticcheck (pull_request) Successful in 6m25s
Required
Details
Tests and linters / gopls check (pull_request) Successful in 6m27s
Required
Details
Tests and linters / Lint (pull_request) Successful in 7m27s
Required
Details

Pull request closed

Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#1511
No description provided.