Skip to content
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!: integrate autocli and reflection services with simapp legacy #13746

Merged
merged 6 commits into from
Nov 8, 2022

Conversation

aaronc
Copy link
Member

@aaronc aaronc commented Nov 3, 2022

Description

Follow-up to #13281 (comment)


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...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

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...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@aaronc aaronc marked this pull request as ready for review November 3, 2022 14:21
@aaronc aaronc requested a review from a team as a code owner November 3, 2022 14:21
@codecov
Copy link

codecov bot commented Nov 3, 2022

Codecov Report

Merging #13746 (38064e5) into main (6ae5641) will decrease coverage by 0.12%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #13746      +/-   ##
==========================================
- Coverage   56.66%   56.53%   -0.13%     
==========================================
  Files         636      646      +10     
  Lines       54552    55903    +1351     
==========================================
+ Hits        30911    31607     +696     
- Misses      21134    21749     +615     
- Partials     2507     2547      +40     
Impacted Files Coverage Δ
server/grpc/server.go 64.58% <ø> (ø)
simapp/genesis_account.go 100.00% <0.00%> (ø)
simapp/genesis.go 100.00% <0.00%> (ø)
simapp/simd/cmd/testnet.go 61.98% <0.00%> (ø)
simapp/simd/cmd/root.go 70.23% <0.00%> (ø)
simapp/app.go 79.44% <0.00%> (ø)
simapp/test_helpers.go 34.30% <0.00%> (ø)
simapp/upgrades.go 28.57% <0.00%> (ø)
simapp/state.go 0.00% <0.00%> (ø)
... and 3 more

@@ -430,6 +433,14 @@ func NewSimApp(
app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter())
app.ModuleManager.RegisterServices(app.configurator)

autocliv1.RegisterQueryServer(app.GRPCQueryRouter(), runtimeservices.NewAutoCLIQueryService(app.ModuleManager.Modules))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love it thank you!!

Copy link
Contributor

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -430,6 +433,14 @@ func NewSimApp(
app.configurator = module.NewConfigurator(app.appCodec, app.MsgServiceRouter(), app.GRPCQueryRouter())
app.ModuleManager.RegisterServices(app.configurator)

autocliv1.RegisterQueryServer(app.GRPCQueryRouter(), runtimeservices.NewAutoCLIQueryService(app.ModuleManager.Modules))

reflectionSvc, err := runtimeservices.NewReflectionService()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's maybe add a quick note in upgrading.md for v0.47

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @ilgooz for visibility on this feature

@@ -14,7 +15,7 @@ type AutoCLIQueryService struct {
moduleOptions map[string]*autocliv1.ModuleOptions
}

func NewAutoCLIQueryService(appModules map[string]appmodule.AppModule) *AutoCLIQueryService {
func NewAutoCLIQueryService(appModules map[string]module.AppModule) *AutoCLIQueryService {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not related to this line specifically, but why didn't we make runtime a go.mod?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't yet because all modules depend on runtime and runtime depends on baseapp and types.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the downvote @julienrbrt ?

Copy link
Member

@julienrbrt julienrbrt Nov 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the split for tools, or things that needs to iterate faster than the SDK.
If we extract runtime, this means different modules could have different version of runtime.
This adds a variable of what a module must be compatible to. It makes for sense if you have modules compatible with SDK versions only and not additionally runtime. These (runtime + sdk types) seems so tight to each another anyway that I, personally, don't understand the added value.
Unless I am missing something.

Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@aaronc aaronc enabled auto-merge (squash) November 7, 2022 18:32
@aaronc aaronc merged commit 74e9d54 into main Nov 8, 2022
@aaronc aaronc deleted the aaronc/autocli-service-app-legacy branch November 8, 2022 12:32
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
…osmos#13746)

* feat!: integrate autocli and reflection services with simapp legacy

* rename alias

* update UPGRADING.md

Co-authored-by: Julien Robert <julien@rbrt.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants