-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
server: fix interceptConfigs #8641
Conversation
return nil, fmt.Errorf("failed to read in app.toml: %w", err) | ||
rootViper.AddConfigPath(appCfgFilePath) | ||
|
||
if err := rootViper.MergeInConfig(); err != nil { |
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.
This was causing any user value set in Tendermint's config to be wiped out. We need to merge configurations, not overwrite them.
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.
utACK
Argh - tests are failing :-/ |
|
So it seems Recall, So in if 0 != serverCtx.Viper.GetInt("halt-time") {
t.Error("Halt time is not using default")
} But that is not the case. /cc @hydrogen18 we should be using assertions via testfiy and no need for constants in these tests. |
@alexanderbez is this PR related to an issue I opened? I don't really have any context here |
@hydrogen18 its in relation to the |
If what you're saying is correct, there's no difference between the two configuration files at all. You can specify any value in any file. Which leads me to the question of why have two files? |
One is managed by Tendermint and the other by the application. What exists in the application is completely opaque to Tendermint and is completely customizable, so having one file would not make sense. |
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.
sgtm, utACK
Codecov Report
@@ Coverage Diff @@
## master #8641 +/- ##
==========================================
- Coverage 61.47% 61.43% -0.05%
==========================================
Files 659 658 -1
Lines 37876 37769 -107
==========================================
- Hits 23283 23202 -81
+ Misses 12159 12143 -16
+ Partials 2434 2424 -10
|
* server: fix interceptConfigs * cl++ * revert call * update error message * revise TestInterceptConfigsPreRunHandlerDoesNotMixConfigFiles * remove TestInterceptConfigsPreRunHandlerDoesNotMixConfigFiles Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 2f069c9) # Conflicts: # CHANGELOG.md # server/util.go
Description
app.toml
was overridingconfig.toml
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