-
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
chore(network): remove DefaultConfigWithAppConfigWithQueryGasLimit
#21055
Conversation
WalkthroughWalkthroughThe changes introduce a more flexible configuration system for the integration tests by modifying how the gas limit is set. The Changes
Sequence Diagram(s)sequenceDiagram
participant TestSuite
participant ConfigFunction
participant BaseApp
TestSuite->>ConfigFunction: Call DefaultConfigWithAppConfig(appConfig, baseappOpts...)
ConfigFunction->>BaseApp: Construct BaseApp with options
BaseApp->>TestSuite: Return configured instance
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files selected for processing (2)
- tests/integration/server/grpc/out_of_gas_test.go (2 hunks)
- testutil/network/network.go (2 hunks)
Additional context used
Path-based instructions (2)
tests/integration/server/grpc/out_of_gas_test.go (3)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Pattern
tests/**/*
: "Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request"
Pattern
**/*_test.go
: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"testutil/network/network.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Additional comments not posted (2)
tests/integration/server/grpc/out_of_gas_test.go (1)
40-48
: Verify the correctness of the new configuration setup.The function call to
network.DefaultConfigWithAppConfigWithQueryGasLimit
has been replaced withnetwork.DefaultConfigWithAppConfig
, andbaseapp.SetQueryGasLimit(10)
has been added. Ensure that this change correctly sets the query gas limit as intended.Verification successful
Verify the correctness of the new configuration setup.
The function call to
network.DefaultConfigWithAppConfigWithQueryGasLimit
has been replaced withnetwork.DefaultConfigWithAppConfig
, andbaseapp.SetQueryGasLimit(10)
has been added. Ensure that this change correctly sets the query gas limit as intended.
Verify the correctness of the new configuration setup.
The function call to
network.DefaultConfigWithAppConfigWithQueryGasLimit
has been replaced withnetwork.DefaultConfigWithAppConfig
, andbaseapp.SetQueryGasLimit(10)
has been added. Ensure that this change correctly sets the query gas limit as intended.
Verified the correctness of the new configuration setup.
The function call to
network.DefaultConfigWithAppConfigWithQueryGasLimit
has been replaced withnetwork.DefaultConfigWithAppConfig
, andbaseapp.SetQueryGasLimit(10)
has been added. This change correctly sets the query gas limit as intended.
- Verified in
tests/integration/server/grpc/out_of_gas_test.go
- Verified in
server/util.go
- Verified in
baseapp/baseapp_test.go
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the function usage of `network.DefaultConfigWithAppConfig` and ensure `baseapp.SetQueryGasLimit` is correctly used. # Test: Search for the function usage. Expect: Only occurances of the new usage. rg --type go -A 5 $'network.DefaultConfigWithAppConfig'Length of output: 2567
Script:
#!/bin/bash # Description: Verify the usage of `baseapp.SetQueryGasLimit` in the codebase. # Test: Search for the function usage. Expect: Occurrences of `baseapp.SetQueryGasLimit(10)`. rg --type go -A 5 $'baseapp.SetQueryGasLimit(10)'Length of output: 50
Script:
#!/bin/bash # Description: Verify the usage of `baseapp.SetQueryGasLimit` in the codebase. # Test: Search for the function usage. Expect: Occurrences of `baseapp.SetQueryGasLimit`. rg --type go -A 5 $'baseapp.SetQueryGasLimit'Length of output: 1249
testutil/network/network.go (1)
Line range hint
166-225
:
Verify the correctness of the new function signature and logic.The function
DefaultConfigWithAppConfig
has been updated to include a variadic parameterbaseappOpts ...func(*baseapp.BaseApp)
, allowing for additional configuration options. Ensure that this change correctly enhances the flexibility of the function and that the internal logic has been adjusted appropriately.
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.
yes, this looks way cleaner! 👌
* main: feat(log): remove core dependency and update core interface to be dependency free (#21045) chore: fix some comments (#21085) feat: simulate nested messages (#20291) chore(network): remove `DefaultConfigWithAppConfigWithQueryGasLimit` (#21055) fix(runtime): remove `appv1alpha1.Config` from runtime (#21042) feat(simapp/v2): Add store server to testnet init cmd (#21076) chore(indexer/postgres): update to changes on main (#21077) feat(schema/appdata): async listener mux'ing (#20879) ci: Use large box for 052 branch sims on CI (#21067) chore(all): replace all `fmt.Errorf` without paramters with `errors.New` (#21068)
Description
Noticed while editing network (#20887)
Follow-up of: #20945
The newly introduced API in the above PR was quite bad, this improves it and future-proof.
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...
!
in 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.
Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.
I have...
Summary by CodeRabbit
Bug Fixes
New Features