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: e2e tests #3487

Merged
merged 27 commits into from
May 28, 2024
Merged

fix: e2e tests #3487

merged 27 commits into from
May 28, 2024

Conversation

ninabarbakadze
Copy link
Member

@ninabarbakadze ninabarbakadze commented May 15, 2024

Overview

Fixes #3453

I encountered a lot of flakiness while running knuu tests in ci(view logs in issue description) to resolve them i added a few workarounds with @smuu which broke other things in our existing suite. those changes are now reverted since the tests started passing on main again after scaling some of the clusters that were stuck. DevOps is working on addressing flakiness on knuu.

E2E tests are green: https://github.com/celestiaorg/celestia-app/actions/runs/9179315870/job/25241185362?pr=3487

My changes:

  • Fix git tag fetching issue
  • Extract e2e tests into its own yaml file
  • Separate MinorVersionCompatibility and MajorupgradeToV2

@ninabarbakadze ninabarbakadze changed the title chore: add e2e tests to ci fix: e2e tests May 21, 2024
@ninabarbakadze ninabarbakadze marked this pull request as ready for review May 21, 2024 18:30
@ninabarbakadze ninabarbakadze requested a review from a team as a code owner May 21, 2024 18:30
@ninabarbakadze ninabarbakadze requested review from cmwaters and staheri14 and removed request for a team May 21, 2024 18:30
Copy link
Contributor

coderabbitai bot commented May 21, 2024

Walkthrough

The recent changes introduce a new GitHub Actions workflow for end-to-end (E2E) testing, refactor the existing nightly workflow to use external job configurations, and update test-related Go files to streamline the testing process. These updates aim to enhance the reliability and maintainability of the E2E tests, addressing issues with test execution and environment setup.

Changes

File(s) Change Summary
.github/workflows/e2e-tests.yml Introduced a new GitHub Actions workflow for end-to-end testing.
.github/workflows/nightly.yml Refactored the test-e2e job to use an external YAML file for job configuration and inherit secrets.
test/e2e/main.go Updated the message in the main() function to instruct running tests using make test-e2e <test_name> instead of go run ./test/e2e <test_name>.
test/e2e/major_upgrade_v2.go Added new functions: MajorUpgradeToV2, getHeight, and waitForHeight to handle the major upgrade to version 2 of a test network.
test/e2e/minor_version_compatibility.go Removed import for github.com/tendermint/tendermint/rpc/client/http and deleted the MajorUpgradeToV2 and its helper functions.
test/e2e/testnet/node.go Modified the Node struct's Init method to move the n.Instance.Commit() call above folder addition and return nil instead of n.Instance.Commit().
test/e2e/testnet/testnet.go Reordered operations in CreateTxClient method to commit the txsim instance before adding the keyring directory and updated the corresponding error messages.

Assessment against linked issues

Objective (Issue #3453) Addressed Explanation
Fix the failing E2E tests in both local and nightly workflows
Update test execution instructions to use make instead of go run
Ensure testnet setup robustness and reliability
Refactor workflows to improve maintainability and configuration
Remove outdated or redundant code and dependencies

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:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • 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 show all the console.log statements in this repository.
    • @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 as 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 full the 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

@ninabarbakadze ninabarbakadze self-assigned this May 21, 2024
@celestia-bot celestia-bot requested review from a team and rach-id and removed request for a team May 22, 2024 08:36
@evan-forbes evan-forbes added knuu item is directly related to the usage of knuu WS: Maintenance 🔧 includes bugs, refactors, flakes, and tech debt etc labels May 22, 2024
Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

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

[question] out of curiosity how was the git tag issue fixed?

.github/workflows/e2e-tests.yml Outdated Show resolved Hide resolved
test/e2e/major_upgrade_v2.go Show resolved Hide resolved
test/e2e/major_upgrade_v2.go Outdated Show resolved Hide resolved
test/e2e/major_upgrade_v2.go Outdated Show resolved Hide resolved
test/e2e/major_upgrade_v2.go Outdated Show resolved Hide resolved
ninabarbakadze and others added 2 commits May 22, 2024 19:06
Co-authored-by: Rootul P <rootulp@gmail.com>
Co-authored-by: Rootul P <rootulp@gmail.com>
@celestia-bot celestia-bot requested a review from a team May 22, 2024 17:06
Co-authored-by: Rootul P <rootulp@gmail.com>
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: 3

test/e2e/major_upgrade_v2.go Show resolved Hide resolved
test/e2e/major_upgrade_v2.go Show resolved Hide resolved
test/e2e/major_upgrade_v2.go Show resolved Hide resolved
Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

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

👍

@@ -40,7 +40,7 @@ func main() {

if !specificTestFound {
logger.Println("No particular test specified. Running all tests.")
logger.Println("go run ./test/e2e <test_name> to run a specific test")
logger.Println("make test-e2e <test_name> to run a specific test")
logger.Printf("Valid tests are: %s\n\n", getTestNames(tests))
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Does this need to be printed? Doesn't each test usually print their names upon start?

}

kr, err := testNet.CreateAccount("alice", 1e12, "")
testnet.NoError("failed to create account", err)
Copy link
Member

Choose a reason for hiding this comment

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

nit for future:

if we move files, ideally (I haven't always done this!) we only move them and not change anything to reduce the effort to see what actually changed. in this case it looked like it was just some comments

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah I tend to agree but since it was only minor changes I applied suggestions

@celestia-bot celestia-bot requested review from a team and ramin and removed request for a team May 28, 2024 08:47
@ninabarbakadze ninabarbakadze enabled auto-merge (squash) May 28, 2024 08:53
@ninabarbakadze ninabarbakadze merged commit e42338d into main May 28, 2024
32 of 33 checks passed
@ninabarbakadze ninabarbakadze deleted the nina/fix-e2e-tests branch May 28, 2024 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
knuu item is directly related to the usage of knuu WS: Maintenance 🔧 includes bugs, refactors, flakes, and tech debt etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

e2e tests are currently not working
5 participants