Skip to content

Commit

Permalink
fix(runtime): remove appv1alpha1.Config from runtime (backport #21042
Browse files Browse the repository at this point in the history
…) (#21080)

Co-authored-by: Julien Robert <[email protected]>
Co-authored-by: marbar3778 <[email protected]>
  • Loading branch information
3 people authored Jul 26, 2024
1 parent 0702719 commit e135030
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* [#20939](https://github.com/cosmos/cosmos-sdk/pull/20939) Fix collection reverse iterator to include `pagination.key` in the result.
* (client/grpc) [#20969](https://github.com/cosmos/cosmos-sdk/pull/20969) Fix `node.NewQueryServer` method not setting `cfg`.
* (testutil/integration) [#21006](https://github.com/cosmos/cosmos-sdk/pull/21006) Fix `NewIntegrationApp` method not writing default genesis to state
* (runtime) [#21080](https://github.com/cosmos/cosmos-sdk/pull/21080) Fix `app.yaml` / `app.json` incompatibility with `depinject v1.0.0`

## [v0.50.8](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.8) - 2024-07-15

Expand Down
2 changes: 1 addition & 1 deletion runtime/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func ProvideApp(interfaceRegistry codectypes.InterfaceRegistry) (
type AppInputs struct {
depinject.In

AppConfig *appv1alpha1.Config
AppConfig *appv1alpha1.Config `optional:"true"`
Config *runtimev1alpha1.Module
AppBuilder *AppBuilder
Modules map[string]appmodule.AppModule
Expand Down
6 changes: 5 additions & 1 deletion runtime/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ import (
)

func (a *App) registerRuntimeServices(cfg module.Configurator) error {
appv1alpha1.RegisterQueryServer(cfg.QueryServer(), services.NewAppQueryService(a.appConfig))
// no app config service if user is using app.yaml / app.json
// it is as in v0.52, this whole query service does not exist at all.
if a.appConfig != nil {
appv1alpha1.RegisterQueryServer(cfg.QueryServer(), services.NewAppQueryService(a.appConfig))
}
autocliv1.RegisterQueryServer(cfg.QueryServer(), services.NewAutoCLIQueryService(a.ModuleManager.Modules))

reflectionSvc, err := services.NewReflectionService()
Expand Down

0 comments on commit e135030

Please sign in to comment.