-
Notifications
You must be signed in to change notification settings - Fork 326
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 gm hermes config
to preserve the global section
#1008
Conversation
gm hermes config
preserves the global sectiongm hermes config
to preserve the global section
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 care less about the naming convention, but let's make sure config is loaded in load_config
.
scripts/gm/bin/lib-gm
Outdated
@@ -692,10 +692,12 @@ list_keys() { | |||
} | |||
|
|||
hermes_config() { | |||
STRATEGY="$(stoml -q "$GLOBAL_HERMES_CONFIG" global.strategy || echo 'all')" | |||
LOG_LEVEL="$(stoml -q "$GLOBAL_HERMES_CONFIG" global.log_level || echo 'info')" |
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 would like to keep all config reading in the load_config
function and make variables available for functions from there. Can you move this in there? You'll find a section that loads all global configs.
I would also rename them GLOBAL_HERMES_STRATEGY
and GLOBAL_HERMES_LOG_LEVEL
as well as the option to global.hermes_strategy
and global.hermes_log_level
, as gaiad might have log levels in the future.
I guess soon we'll need to introduce a [hermes] global section in the config and move all entries there so the names don't get too long. At that point we can name them hermes.log_level
.
Also note that the default loading (||
) is not fully working, there's an issue about it in #993. Don't worry about it for now, just make sure you have these options in your config so you don't rely on hard-coded defaults.
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 would like to keep all config reading in the load_config function and make variables available for functions from there. Can you move this in there? You'll find a section that loads all global configs.
That makes sense. Should be fixed now. 2d033ab
I would also rename them GLOBAL_HERMES_STRATEGY and GLOBAL_HERMES_LOG_LEVEL as well as the option to global.hermes_strategy and global.hermes_log_level, as gaiad might have log levels in the future.
I guess soon we'll need to introduce a [hermes] global section in the config and move all entries there so the names don't get too long. At that point we can name them hermes.log_level.
I renamed the variables into GLOBAL_HERMES_STRATEGY
and GLOBAL_HERMES_LOG_LEVEL
but I think we should postpone changing the Hermes config.toml file to adopt global.hermes_strategy
and global.hermes_log_level
(that would require many changes in the ibc-relayer
crate).
I guess soon we'll need to introduce a [hermes] global section in the config and move all entries there so the names don't get too long. At that point we can name them hermes.log_level.
Agree, we'll do this later.
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.
Yup, looks good.
…s#1008) * gm hermes config preserves the global section; fixes informalsystems#1007. * Moved parameter loading to load_config * Added defaults for strategy and log_level
Closes: #1007
Description
Small modification to the
gm
script to make it work with the new version of the Hermes config.toml file.For contributor use:
docs/
) and code comments.Files changed
in the Github PR explorer.