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

ci: actually enable v2 system test #21539

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open

ci: actually enable v2 system test #21539

wants to merge 20 commits into from

Conversation

julienrbrt
Copy link
Member

@julienrbrt julienrbrt commented Sep 4, 2024

Description

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

  • included the correct type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in 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
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • updated the relevant documentation or specification, including comments for documenting Go code
  • 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.

Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

Summary by CodeRabbit

Summary by CodeRabbit

  • Chores

    • Updated the GitHub Actions workflow for system tests to streamline execution by removing job dependencies.
  • New Features

    • Introduced a new function to manage command-line arguments based on the simulator version, enhancing flexibility in test configurations.
    • Enhanced debugging capabilities in transaction processing with additional parameters for clearer logging.
  • Bug Fixes

    • Refined the skip message for a test to provide clearer context regarding the state of unordered transaction handling.
    • Clarified comments in tests to specify urgency for pending fixes before the next release.
    • Improved error handling in transaction validation to enhance response clarity.
    • Adjusted halt conditions in the consensus process for earlier triggering based on configured values.

@julienrbrt julienrbrt requested a review from a team as a code owner September 4, 2024 10:35
Copy link
Contributor

coderabbitai bot commented Sep 4, 2024

Warning

Rate limit exceeded

@julienrbrt has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 20 minutes and 25 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between 76820d4 and ba2a08f.

Walkthrough

Walkthrough

The changes involve significant updates to the GitHub Actions workflow for system tests, including the removal of dependencies for the test-system job, allowing it to run independently. The commands for "system tests v1" and "system tests v2" have been modified, with the former simplifying the command and the latter explicitly setting the COSMOS_BUILD_OPTIONS to v2. Additionally, a new function has been introduced to conditionally manage command-line arguments based on the simulator version.

Changes

Files Change Summary
.github/workflows/test.yml Updated commands in "system tests v1" by removing COSMOS_BUILD_OPTIONS=legacy and simplifying to make test-system. In "system tests v2," added COSMOS_BUILD_OPTIONS=v2 before executing make test-system. Removed job dependencies for test-system.
tests/systemtests/testnet_init.go Added isV2 function to check for "simapp v2" configuration and adjusted command-line arguments accordingly based on the version.
tests/systemtests/unordered_tx_test.go Changed skip message in TestUnorderedTXDuplicate for clarity; test remains skipped.
x/auth/ante/basic_test.go Updated comment in TestConsumeGasForTxSize to clarify urgency regarding pending fixes.
server/v2/cometbft/abci.go Modified error handling in CheckTx function to refine conditions under which errors are returned.
server/v2/cometbft/commands.go Removed commented-out code in ShowValidatorCmd and clarified marshaling of sdkPK to JSON format.
server/v2/cometbft/utils.go Adjusted error handling in intoABCITxResults and modified halt conditions in checkHalt method to trigger on equality.

Possibly related PRs

  • test(server/v2/cometbft): Add abci unit tests #21020: The changes in the main PR regarding the GitHub Actions workflow and system tests may relate to the introduction of unit tests for the ABCI functionalities, as both involve modifications to testing processes and configurations.
  • refactor(store/v2): human readable ss/sc types #21645: The refactor of the server's components and the introduction of new dependencies in the main PR could connect with the changes in the server's test configurations and the integration of the store component, enhancing the overall testing framework.
  • refactor(server/v2/cometbft): use only protov1 and backport #21084 #21681: The changes in the main PR that streamline the testing process may relate to the refactor of the cometbft server, which also aims to improve the testing and operational efficiency of the server.
  • chore: remove consensus authority  #21734: The removal of the consensus authority in the main PR could be related to the changes in the testing framework, as both aim to simplify the codebase and improve maintainability.
  • feat(runtime(v2)): add sanity checks on store upgrades #21748: The introduction of sanity checks on store upgrades in the main PR may connect with the changes in the testing processes, as both focus on enhancing the reliability and robustness of the Cosmos SDK framework.
  • chore: add simsx labels & more #21776: The addition of new labels and enhancements in the CI process in the main PR may relate to the overall improvements in the testing and documentation processes, ensuring better management and oversight of the codebase.
  • docs: minor cleanup to simulation docs  #21777: The minor cleanup in the simulation documentation in the main PR aligns with the overall goal of improving clarity and quality across the Cosmos SDK, which is also reflected in the changes made to the testing framework and related documentation.

Suggested labels

C:Simulations

Suggested reviewers

  • tac0turtle
  • sontrinh16
  • kocubinski
  • facundomedica
  • julienrbrt

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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    -- I pushed a fix in commit <commit_id>, please review it.
    -- Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    -- @coderabbitai generate unit testing code for this file.
    -- @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    -- @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    -- @coderabbitai read src/utils.ts and generate unit testing code.
    -- @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    -- @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between daef054 and 1c4061c.

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between 1c4061c and e0337c5.

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 the t.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 the TestAddressValidation test. This indicates that any underlying issues related to keyring instantiation have been resolved or the test is now deemed ready for execution.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between 1c4061c and e0337c5.

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

@julienrbrt julienrbrt added the backport/v0.52.x PR scheduled for inclusion in the v0.52's next stable release label Sep 4, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between e0337c5 and 2e5d2bf.

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

Copy link
Contributor

@alpe alpe left a comment

Choose a reason for hiding this comment

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

Good catch!
The changes look good. I am just wondering if we want to enable v2 with systemtests failing: https://github.com/cosmos/cosmos-sdk/actions/runs/10742660676/job/29795732210?pr=21539#step:8:95

@julienrbrt
Copy link
Member Author

Good catch! The changes look good. I am just wondering if we want to enable v2 with systemtests failing: https://github.com/cosmos/cosmos-sdk/actions/runs/10742660676/job/29795732210?pr=21539#step:8:95

Nope, the job should stay required. I am investigating what's up now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v0.52.x PR scheduled for inclusion in the v0.52's next stable release C:CLI C:server/v2 cometbft C:server/v2 Issues related to server/v2 C:x/auth Type: Build Type: CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants