-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
ci: actually enable v2 system test #21539
Conversation
📝 Walkthrough📝 Walkthrough📝 WalkthroughWalkthroughThe changes involve significant updates to the GitHub Actions workflow for system tests, including the removal of dependencies for the Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
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 using PR comments)
Other keywords and placeholders
Documentation and Community
|
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 (1)
- .github/workflows/test.yml (2 hunks)
Additional comments not posted (2)
.github/workflows/test.yml (2)
180-180
: Looks good!The removal of the
COSMOS_BUILD_OPTIONS=legacy
environment variable simplifies the command for running the v1 system tests.
190-190
: LGTM!The addition of the
COSMOS_BUILD_OPTIONS=v2
environment variable ensures that the v2 system tests are executed with the appropriate build options.
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 (6)
- Makefile (1 hunks)
- client/grpc/cmtservice/status_test.go (1 hunks)
- client/v2/autocli/query_test.go (1 hunks)
- tests/systemtests/testnet_init.go (3 hunks)
- tests/systemtests/unordered_tx_test.go (1 hunks)
- x/auth/ante/basic_test.go (1 hunks)
Files skipped from review due to trivial changes (3)
- Makefile
- client/grpc/cmtservice/status_test.go
- x/auth/ante/basic_test.go
Additional context used
Path-based instructions (3)
tests/systemtests/unordered_tx_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"tests/systemtests/testnet_init.go (2)
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"client/v2/autocli/query_test.go (2)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Pattern
**/*_test.go
: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"
Additional comments not posted (5)
tests/systemtests/unordered_tx_test.go (1)
Line range hint
14-47
: LGTM!The code changes in the
TestUnorderedTXDuplicate
function are approved. The removal of thet.Skip
statement indicates that the test case is now expected to run without being skipped, suggesting that the conditions or dependencies that warranted the skip have been addressed.The test function follows a clear scenario-based approach and provides comprehensive validation of the unordered transaction handling functionality.
tests/systemtests/testnet_init.go (3)
17-20
: LGTM!The code changes are approved.
66-70
: LGTM!The code changes are approved.
124-127
: LGTM!The code changes are approved.
client/v2/autocli/query_test.go (1)
Line range hint
1-1
: Test enabled.Removing the
t.Skip()
call enables theTestAddressValidation
test. This indicates that any underlying issues related to keyring instantiation have been resolved or the test is now deemed ready for execution.
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
Outside diff range, codebase verification and nitpick comments (1)
client/grpc/cmtservice/status_test.go (1)
17-17
: Acknowledge the plan to rewrite the test as a system test.The comment indicates that the test is to be rewritten as a system test, which is a good approach for testing the functionality at a higher level.
Consider creating a GitHub issue to track the task of rewriting the test and add a TODO comment with the issue number for better traceability:
- t.Skip() // Rewrite as system test + t.Skip() // TODO: Rewrite as system test (https://github.com/cosmos/cosmos-sdk/issues/<issue-number>)
Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files selected for processing (6)
- Makefile (1 hunks)
- client/grpc/cmtservice/status_test.go (1 hunks)
- client/v2/autocli/query_test.go (1 hunks)
- tests/systemtests/testnet_init.go (3 hunks)
- tests/systemtests/unordered_tx_test.go (1 hunks)
- x/auth/ante/basic_test.go (1 hunks)
Files skipped from review due to trivial changes (2)
- Makefile
- x/auth/ante/basic_test.go
Additional context used
Path-based instructions (4)
client/grpc/cmtservice/status_test.go (2)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Pattern
**/*_test.go
: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"tests/systemtests/unordered_tx_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"tests/systemtests/testnet_init.go (2)
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"client/v2/autocli/query_test.go (2)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Pattern
**/*_test.go
: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"
Additional comments not posted (6)
tests/systemtests/unordered_tx_test.go (1)
14-14
: LGTM! The test for duplicate transactions in the unordered transaction pool is now enabled.The test
TestUnorderedTXDuplicate
was previously skipped due to missing functionality in v2. By removing the skip statement, the test will now run and validate the behavior of duplicate transactions in the unordered transaction pool. This improves the test coverage for the unordered transaction pool functionality.The test setup and assertions seem appropriate for the scenario being tested.
tests/systemtests/testnet_init.go (4)
17-20
: LGTM!The code changes are approved.
65-71
: LGTM!The code changes are approved.
123-127
: LGTM!The code changes are approved.
Line range hint
1-217
: Code conforms to the Uber Golang style guide.No deviations from the style guide were found.
client/v2/autocli/query_test.go (1)
Line range hint
1-1
: Test enabled.Removing the
t.Skip()
call enables theTestAddressValidation
test to run, which is a positive change. It suggests that the underlying issue related to keyring instantiation has been resolved or the test is now deemed ready for execution.
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 (3)
- .github/workflows/test.yml (3 hunks)
- tests/systemtests/testnet_init.go (4 hunks)
- tests/systemtests/unordered_tx_test.go (1 hunks)
Files skipped from review as they are similar to previous changes (3)
- .github/workflows/test.yml
- tests/systemtests/testnet_init.go
- tests/systemtests/unordered_tx_test.go
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: 3
Outside diff range and nitpick comments (1)
server/v2/cometbft/query.go (1)
Line range hint
88-134
: Address TODO commentThere's a TODO comment on line 98:
// TODO fastpath?
. This suggests that there might be a potential optimization opportunity for converting the store name to bytes.Consider investigating if there's a faster way to convert the store name to bytes, or remove the TODO comment if it's not applicable.
Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files ignored due to path filters (1)
server/v2/cometbft/go.sum
is excluded by!**/*.sum
Files selected for processing (6)
- server/v2/cometbft/abci.go (6 hunks)
- server/v2/cometbft/go.mod (3 hunks)
- server/v2/cometbft/query.go (1 hunks)
- server/v2/cometbft/streaming.go (2 hunks)
- server/v2/cometbft/types/errors/errors.go (1 hunks)
- server/v2/cometbft/utils.go (5 hunks)
Files skipped from review as they are similar to previous changes (2)
- server/v2/cometbft/abci.go
- server/v2/cometbft/utils.go
Additional context used
Path-based instructions (3)
server/v2/cometbft/query.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.server/v2/cometbft/streaming.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.server/v2/cometbft/types/errors/errors.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Additional comments not posted (6)
server/v2/cometbft/streaming.go (2)
9-9
: LGTM: New import added correctlyThe new import for
errorsmod
is correctly formatted and necessary for the changes made in the function.
25-26
: Improved error handling and more detailed transaction resultsThe changes enhance the error handling by extracting more detailed information from transaction results. The
streamingTxResults
structure now includesCodespace
andLog
in addition toCode
, providing more comprehensive error information. This improvement aligns well with the Cosmos SDK error handling practices and addresses the issue mentioned in #21881.Also applies to: 33-35
server/v2/cometbft/query.go (3)
Line range hint
39-86
: LGTM: Well-structured and documented functionThe
handlerQueryApp
function is well-implemented and thoroughly documented. It handles different query types appropriately and uses error wrapping effectively.
Line range hint
1-134
: Overall code quality is good, with minor suggestionsThe code in this file is well-structured and follows good practices. The main change of updating the
errorsmod
import has been noted and a verification task has been suggested. There's a minor TODO comment that could be addressed. Overall, the implementation looks solid and adheres to the Uber Golang style guide.
10-10
: Verify consistency of errors package updateThe import for
errorsmod
has been updated to usecosmossdk.io/errors/v2
. This change to a versioned import might introduce breaking changes or require updates in other parts of the codebase.Please run the following script to check for consistency across the project:
server/v2/cometbft/go.mod (1)
7-7
: Verify the intention behind the new replace directive forcosmossdk.io/core
.A new replace directive has been added for
cosmossdk.io/core
, pointing to a local path. While this is useful for development, it may cause issues in production builds or when other developers clone the repository.Please confirm:
- Is this replacement intended for development purposes only?
- How will this affect production builds and other developers working on the project?
- Is there a plan to remove this directive before merging to the main branch?
@@ -1,7 +1,7 @@ | |||
package errors | |||
|
|||
import ( | |||
errorsmod "cosmossdk.io/errors" | |||
errorsmod "cosmossdk.io/errors/v2" |
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.
💡 Codebase verification
Imports of cosmossdk.io/errors/v2
are inconsistent across the codebase.
Multiple files still import the old cosmossdk.io/errors
. Please update all imports to use cosmossdk.io/errors/v2
to ensure consistency and leverage the benefits of the v2 errors package.
Analysis chain
LGTM. Verify v2 package usage across the codebase.
The update to cosmossdk.io/errors/v2
aligns with the PR objective of enabling v2 system tests. This change follows the Uber Golang style guide for imports.
To ensure consistency, please run the following script to verify the usage of the v2 errors package across the codebase:
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the usage of cosmossdk.io/errors/v2 package across the codebase.
# Test: Search for imports of the errors package. Expect: Only v2 imports.
rg --type go 'import.*cosmossdk.io/errors'
Length of output: 888
space, code, log := errorsmod.ABCIInfo(txResult.Error, c.cfg.AppTomlConfig.Trace) | ||
|
||
events, err := streaming.IntoStreamingEvents(txResult.Events) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
streamingTxResults[i] = &streaming.ExecTxResult{ | ||
Code: txResult.Code, | ||
Code: code, | ||
Codespace: space, | ||
Log: log, |
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.
🛠️ Refactor suggestion
Overall improvement in error handling and transaction result details
The changes successfully address the issue mentioned in #21881 by ensuring that error codes, codespace, and logs are properly propagated in the transaction results. This improvement enhances the clarity and robustness of the error handling process.
Consider adding a debug log statement after line 26 to log the extracted error information. This could be helpful for troubleshooting in the future. For example:
c.logger.Debug("Extracted error info from transaction result",
"codespace", space,
"code", code,
"log", log)
This addition would provide valuable debugging information without affecting the normal flow of the function.
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
🧹 Outside diff range and nitpick comments (1)
server/v2/stf/stf.go (1)
323-324
: Approve the change with a minor suggestion for clarityThe modification to return the error directly instead of wrapping it is a good change. It preserves the original error type and aligns with the issue #21881 by ensuring proper error code propagation.
For improved clarity and maintainability, consider adding a brief comment explaining why the error is not wrapped here. This will help future maintainers understand the rationale behind this specific error handling approach. For example:
- return nil, 0, nil, err // do not wrap the error or we lose the original error type + // Return the error directly to preserve the original error type and ensure proper error code propagation + return nil, 0, nil, errThis comment provides context for why the error is handled differently here compared to other parts of the codebase.
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
🔇 Files ignored due to path filters (1)
server/v2/cometbft/go.sum
is excluded by!**/*.sum
📒 Files selected for processing (2)
- server/v2/cometbft/go.mod (3 hunks)
- server/v2/stf/stf.go (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- server/v2/cometbft/go.mod
🧰 Additional context used
📓 Path-based instructions (1)
server/v2/stf/stf.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Co-authored-by: Matt Kocubinski <mkocubinski@gmail.com> (cherry picked from commit f927e9b) # Conflicts: # core/server/app.go # server/v2/cometbft/go.mod # server/v2/cometbft/go.sum # server/v2/stf/stf.go
Description
Closes: #21881
ref: #20800
Noticed when doing the CI overview to Claude.
Our system tests were not running on v2, but only on simapp v1 legacy and simapp v1 depinject.
Deleting as well, scripts that shouldn't have been pushed.
Additionally, it fixes all error that popped up to make the test pass.
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
Summary by CodeRabbit
Chores
New Features
Bug Fixes