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

fix: support multiple runs for precomplies e2e test #2874

Merged
merged 7 commits into from
Sep 16, 2024

Conversation

kingpinXD
Copy link
Contributor

@kingpinXD kingpinXD commented Sep 12, 2024

Description

The PR refactors the precompiles staking test to allow it to run multiple times.

It adds a function to remove all delegations if they exist so that the test starts from the same base values everytime , and the assertions work as expected.

How Has This Been Tested?

  • Tested CCTX in localnet
  • Tested in development environment
  • Go unit tests
  • Go integration tests
  • Tested via GitHub Actions

Summary by CodeRabbit

  • New Features

    • Added support for multiple runs for precompile tests, enhancing testing capabilities.
    • Introduced a new function to clean validator delegations before staking tests, improving test reliability.
  • Bug Fixes

    • Removed the --skip-precompiles flag from the local environment script, ensuring precompilation steps are executed as required.
  • Documentation

    • Updated changelog with recent enhancements and formatting corrections for clarity.

Copy link
Contributor

coderabbitai bot commented Sep 12, 2024

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Walkthrough

The pull request introduces several changes aimed at enhancing the codebase's testing framework and documentation. Key modifications include the addition of support for multiple runs in precompile tests, the removal of the --skip-precompiles flag from a script, and the introduction of a new function to clean validator delegations in staking tests. These updates collectively aim to improve the reliability and clarity of the testing processes.

Changes

File Change Summary
changelog.md Added an entry for support of multiple runs for precompile tests. Minor formatting correction made to the entry for pull request 2830.
contrib/localnet/orchestrator/... Removed the --skip-precompiles flag from the start-zetae2e.sh script, affecting execution logic based on upgrade height.
e2e/e2etests/test_precompiles_staking.go Introduced a new function CleanValidatorDelegations to unstake all delegations from specified validators, enhancing test reliability by ensuring a clean state before executing staking tests. Error handling added.

Possibly related PRs

Suggested labels

no-changelog, UPGRADE_LIGHT_TESTS, PERFORMANCE_TESTS


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 generate interesting stats about this repository and render them as a table.
    -- @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

codecov bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.88%. Comparing base (8ad6192) to head (daeea5f).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #2874   +/-   ##
========================================
  Coverage    66.88%   66.88%           
========================================
  Files          377      377           
  Lines        21084    21084           
========================================
  Hits         14103    14103           
  Misses        6316     6316           
  Partials       665      665           

@kingpinXD kingpinXD added TSS_MIGRATION_TESTS Run TSS migration tests UPGRADE_TESTS Run make start-upgrade-tests labels Sep 13, 2024
Copy link
Member

@gartnera gartnera left a comment

Choose a reason for hiding this comment

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

Thanks I was just running into this too

Copy link
Contributor

@skosito skosito left a comment

Choose a reason for hiding this comment

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

tnx for fixing this

maybe simpler would be to just unstake 1 and 2 from 2 validators at the end of the test, since validators and amounts are fixed in each test run, but this works as well

changelog.md Outdated Show resolved Hide resolved
@kingpinXD kingpinXD added this pull request to the merge queue Sep 16, 2024
Merged via the queue into develop with commit d4cd477 Sep 16, 2024
30 checks passed
@kingpinXD kingpinXD deleted the fix-precomilies-test branch September 16, 2024 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TSS_MIGRATION_TESTS Run TSS migration tests UPGRADE_TESTS Run make start-upgrade-tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants