-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add env variable to cmd flags #9040
Conversation
@AmauryM Could you leave your feedback, please? |
30333f2
to
3434789
Compare
Codecov Report
@@ Coverage Diff @@
## master #9040 +/- ##
==========================================
- Coverage 58.83% 58.79% -0.04%
==========================================
Files 580 583 +3
Lines 32648 32750 +102
==========================================
+ Hits 19208 19255 +47
- Misses 11174 11218 +44
- Partials 2266 2277 +11
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, before auto-merging, let me just test manually on the CLI too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK.
i tested:
# setting manually WithViper("ABC")
ABC_NODE=localhost:1 simd q staking validators
@cyberbono3 Could you fix the lint errors? |
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
ac00a44
to
c953f78
Compare
Sure. I have fixed some of them. However, I still face some Issues:
|
It's flaky, see #9010
|
@mergify io backport release/v0.42.x |
Sorry but I didn't understand the command. Please consult the commands documentation 📚. Hey, I reacted but my real name is @Mergifyio |
@Mergifyio backport release/v0.42.x |
* first draft * add tests in config_test package * refactored, all tests pass, r4r * ready for review * add envPrefix * Update simapp/simd/cmd/root.go Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> * fix linter issues * minor fixes Co-authored-by: Alessio Treglia <alessio@tendermint.com> Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit a465ae1) # Conflicts: # client/context.go # simapp/simd/cmd/root.go
Command
|
* Add env variable to cmd flags (#9040) * first draft * add tests in config_test package * refactored, all tests pass, r4r * ready for review * add envPrefix * Update simapp/simd/cmd/root.go Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> * fix linter issues * minor fixes Co-authored-by: Alessio Treglia <alessio@tendermint.com> Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit a465ae1) # Conflicts: # client/context.go # simapp/simd/cmd/root.go * Remove line Co-authored-by: Andrei Ivasko <cyberbono3@gmail.com> Co-authored-by: Amaury M <1293565+amaurym@users.noreply.github.com> Co-authored-by: Alessio Treglia <alessio@tendermint.com>
* first draft * add tests in config_test package * refactored, all tests pass, r4r * ready for review * add envPrefix * Update simapp/simd/cmd/root.go Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> * fix linter issues * minor fixes Co-authored-by: Alessio Treglia <alessio@tendermint.com> Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Description
Added v.AutomaticEnv() to Viper field of client.Context.
Implemented various test cases to test priority rules
flag > env var > config
for client config.closes: #8179
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes