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
feat: add ability to launch targeted dskit modules in the grafana server CLI command #74188
Conversation
e680a8a
to
be72cdf
Compare
be72cdf
to
8eb48ea
Compare
@@ -325,7 +328,6 @@ var wireBasicSet = wire.NewSet( | |||
grpcserver.ProvideHealthService, | |||
grpcserver.ProvideReflectionService, | |||
interceptors.ProvideAuthenticator, | |||
setting.NewCfgFromArgs, |
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 "dependency" only exists so wire can handle calling that method on the setting.CommandLineArgs, so I refactored the various Initialize commands to take a setting.Cfg
and made sure we were calling setting.NewCfgFromArgs
explicitly where needed.
This does not change the setting.Provider (oss & enterprise both); that is a more idiomatic dependency.
It's an unexpected, free baby step towards refactoring setting.Cfg!!
…ver CLI command This commit adds a ModuleServer and ModuleRunner suitable for launching dskit services and updates the server cli command to use this instead of the full Server. The default behavior is unchanged and will launch the full Grafana server. Individual services are targeted by setting target=comma,seperated,list in the config file.
…th calling setting.NewCfg
625ddba
to
99eff61
Compare
/deploy-to-hg --enterprise-ref mildwonkey/module-server |
|
|
Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
…ver CLI command (grafana#74188) * feat: add ability to launch targeted dskit modules in the grafana server CLI command This commit adds a ModuleServer and ModuleRunner suitable for launching dskit services and updates the server cli command to use this instead of the full Server. The default behavior is unchanged and will launch the full Grafana server. Individual services are targeted by setting target=comma,seperated,list in the config file. * require dev mode to target dskit modules * remove unused type * replace setting.CommandLineArgs w/setting.Cfg; the caller can deal with calling setting.NewCfg * Update pkg/server/module_server.go Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com> --------- Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
…ver CLI command (#74188) * feat: add ability to launch targeted dskit modules in the grafana server CLI command This commit adds a ModuleServer and ModuleRunner suitable for launching dskit services and updates the server cli command to use this instead of the full Server. The default behavior is unchanged and will launch the full Grafana server. Individual services are targeted by setting target=comma,seperated,list in the config file. * require dev mode to target dskit modules * remove unused type * replace setting.CommandLineArgs w/setting.Cfg; the caller can deal with calling setting.NewCfg * Update pkg/server/module_server.go Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com> --------- Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
This commit adds a ModuleServer and ModuleRunner suitable for launching dskit services and updates the server cli command to use this instead of the full Server. The default behavior is unchanged and will launch the full Grafana server. Individual services are targeted by setting target=comma,seperated,list in the config file.
TODO
I recommend y'all try it out yourselves, but here's the output if I set a
target
in my config file but run the CLI in anything other than dev mode: