Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1083] neofs-cli: use single flag for key and wallet #1093

Merged
merged 1 commit into from
Jan 21, 2022

Conversation

fyrchik
Copy link
Contributor

@fyrchik fyrchik commented Jan 19, 2022

Currently have static priority of what key is used irregardless of
whether a flag was provided via CLI or in config. This makes it
impossible to override some of the config settings. While we could try
to check if the key is provided by CLI by binding CLI flag under to
viper under a different name the same problem would occur for config/environment
variables. Fixing all of this with current set of keys is too complicate.
In this commit we revert changes from #610 and use a single flag for all types of keys.

Signed-off-by: Evgenii Stratonikov evgeniy@nspcc.ru

@codecov
Copy link

codecov bot commented Jan 19, 2022

Codecov Report

Merging #1093 (dd8ab60) into master (ac82899) will decrease coverage by 1.67%.
The diff coverage is 100.00%.

❗ Current head dd8ab60 differs from pull request most recent head 8000a2f. Consider uploading reports for the commit 8000a2f to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1093      +/-   ##
==========================================
- Coverage   36.86%   35.18%   -1.68%     
==========================================
  Files         268      278      +10     
  Lines       15046    17042    +1996     
==========================================
+ Hits         5547     5997     +450     
- Misses       9038    10582    +1544     
- Partials      461      463       +2     
Impacted Files Coverage Δ
cmd/neofs-cli/modules/accounting.go 24.44% <ø> (ø)
cmd/neofs-cli/modules/control.go 22.71% <ø> (ø)
cmd/neofs-cli/modules/util.go 25.92% <ø> (ø)
cmd/neofs-cli/modules/root.go 43.93% <100.00%> (ø)
cmd/neofs-cli/modules/container.go 17.71% <0.00%> (ø)
cmd/neofs-cli/modules/completion.go 100.00% <0.00%> (ø)
cmd/neofs-cli/modules/storagegroup.go 26.92% <0.00%> (ø)
cmd/neofs-cli/modules/acl.go 40.00% <0.00%> (ø)
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ac82899...8000a2f. Read the comment docs.

cmd/neofs-cli/modules/root.go Outdated Show resolved Hide resolved
cmd/neofs-cli/modules/root.go Outdated Show resolved Hide resolved
Currently have static priority of what key is used irregardless of
whether a flag was provided via CLI or in config. This makes it
impossible to override some of the config settings. While we could try
to check if the key is provided by CLI by binding CLI flag under to
viper under a different name the same problem would occur for config/environment
variables. Fixing all of this with current set of keys is too complicate.
In this commit we revert changes from nspcc-dev#610 and use a single flag for all types of keys.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
@alexvanin alexvanin merged commit 759421e into nspcc-dev:master Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Confusing neofs-cli config file usage
3 participants