-
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
fix: Don't error on startup if min-gas-price is empty #9621
Conversation
@@ -132,7 +132,6 @@ Ref: https://keepachangelog.com/en/1.0.0/ | |||
* [\#8628](https://github.com/cosmos/cosmos-sdk/issues/8628) Commands no longer print outputs using `stderr` by default | |||
* [\#9134](https://github.com/cosmos/cosmos-sdk/pull/9134) Renamed the CLI flag `--memo` to `--note`. | |||
* [\#9291](https://github.com/cosmos/cosmos-sdk/pull/9291) Migration scripts prior to v0.38 have been removed from the CLI `migrate` command. The oldest supported migration is v0.39->v0.42. | |||
* [\#9371](https://github.com/cosmos/cosmos-sdk/pull/9371) Non-zero default fees/Server will error if there's an empty value for min-gas-price in app.toml |
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.
I'll add this line to the "Unreleased" section in #9592
edit: done
server/start.go
Outdated
@@ -247,7 +247,9 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App | |||
|
|||
config := config.GetConfig(ctx.Viper) | |||
if err := config.ValidateBasic(); err != nil { | |||
return err | |||
ctx.Logger.Info("The minimum-gas-prices config in app.toml is set to the empty string. "+ |
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.
Can we do Logger.Error
or will that cause a panic?
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.
ctx.Logger.Info("The minimum-gas-prices config in app.toml is set to the empty string. "+ | |
ctx.Logger.Info("WARNING: The minimum-gas-prices config in app.toml is set to the empty string. "+ |
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.
Co-authored-by: Aaron Craelius <aaron@regen.network>
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
@@ -247,7 +247,9 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App | |||
|
|||
config := config.GetConfig(ctx.Viper) | |||
if err := config.ValidateBasic(); err != nil { | |||
return err | |||
ctx.Logger.Error("WARNING: The minimum-gas-prices config in app.toml is set to the empty string. " + |
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.
oh, we don't have Warn
method.
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.
We could add it to the interface. ERR is fine for now IMHO.
* fix: Don't error on startup if min-gas-price is empty * remove test * Update server/start.go * Update server/start.go Co-authored-by: Aaron Craelius <aaron@regen.network> * Switch to error Co-authored-by: Aaron Craelius <aaron@regen.network>
* fix: Don't error on startup if min-gas-price is empty * remove test * Update server/start.go * Update server/start.go Co-authored-by: Aaron Craelius <aaron@regen.network> * Switch to error Co-authored-by: Aaron Craelius <aaron@regen.network>
* fix: Don't error on startup if min-gas-price is empty * remove test * Update server/start.go * Update server/start.go Co-authored-by: Aaron Craelius <aaron@regen.network> * Switch to error Co-authored-by: Aaron Craelius <aaron@regen.network>
* fix: Don't error on startup if min-gas-price is empty * remove test * Update server/start.go * Update server/start.go Co-authored-by: Aaron Craelius <aaron@regen.network> * Switch to error Co-authored-by: Aaron Craelius <aaron@regen.network>
Description
We introduced throwing an error when min-gas-price was empty in #9371 in 0.43. It seems like it may be too big of a CLI breaking change too soon. Internally at Regen we discussed of showing a warning in 0.43, and throwing the error in 0.44
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change