Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

fix: Lint tests + fix e2e #1447

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

faddat
Copy link
Contributor

@faddat faddat commented Jan 19, 2024

This PR lints the polaris tests with the same standard as the rest of the repository.

This helped to find that SDK d0c414e commit seems to resolve some e2e issues.

I think that this pr may pass e2e in ways others don't.

  • update dependencies
  • time to lint tests
  • configuration
  • an issue in e2e seems to be solved by update cosmos-sdk to commit d0c414e and it makes sense if you look at it sideways :D
  • sync to use latest v0.50.x across repository

Summary by CodeRabbit

  • Performance Improvements

    • Analysis timeout increased to 10 minutes for more comprehensive code checks.
    • Test execution now included during code analysis for improved quality assurance.
  • Enhancements

    • Analysis results now displayed with colored line numbers and the issued lines printed for better readability.
    • Linter configuration updated to streamline code reviews by disabling multiple non-critical rules.
  • Tooling Updates

    • Updated linter to version v1.55.2.
    • Increased concurrency level for linting processes to enhance performance.
  • Codebase Refinements

    • Simplified method signatures in certain modules for clarity.
    • Adjusted lint directive comments for consistency and to meet linting standards.
    • Import paths and comments refined to ensure proper package usage.

Copy link

coderabbitai bot commented Jan 19, 2024

Important

Auto Review Skipped

Draft detected.

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.

Walkthrough

The updates involve enhancing the analysis timeout and test execution in the .golangci.yaml, refining the linter settings, and increasing the concurrency level in the build scripts. Code cleanliness is improved by adjusting method signatures in module.go and tidying up comments across various Go files. The import path is corrected in precompile/utils.go, ensuring proper package handling.

Changes

File Path Change Summary
.golangci.yaml Timeout increased to 10 minutes, added test execution, updated output format, and disabled multiple revive rules
build/scripts/main.mk Updated golangci_version and increased --concurrency flag value
cosmos/x/evm/module.go Removed receiver names in method signatures
e2e/localnet/utils/utils.go Altered lint directive comment and updated import path
e2e/testapp/app.go Replaced block comment with line comment and modified the receiver parameter in a method
e2e/precompile/utils.go Updated import path with a nolint comment

🐰✨
In code we trust, with lint so just,
A rabbit hops, leaving dust on crust.
Concurrency high, timeouts goodbye,
With each commit, our code does fly. 🚀
🐇💻

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>.
    • Generate unit-tests for this file.
  • 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 tests 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 from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

@faddat faddat changed the title run automatic test fixes Lint tests + a fix! Jan 19, 2024
@faddat faddat changed the title Lint tests + a fix! fix: Lint tests + a fix! Jan 19, 2024
Copy link

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 25fbe13 and b793b10.
Files ignored due to path filters (16)
  • contracts/go.mod is excluded by: !**/*.mod
  • contracts/go.sum is excluded by: !**/*.sum
  • cosmos/go.mod is excluded by: !**/*.mod
  • cosmos/go.sum is excluded by: !**/*.sum
  • e2e/localnet/go.mod is excluded by: !**/*.mod
  • e2e/localnet/go.sum is excluded by: !**/*.sum
  • e2e/precompile/go.mod is excluded by: !**/*.mod
  • e2e/precompile/go.sum is excluded by: !**/*.sum
  • e2e/testapp/go.mod is excluded by: !**/*.mod
  • e2e/testapp/go.sum is excluded by: !**/*.sum
  • eth/go.mod is excluded by: !**/*.mod
  • eth/go.sum is excluded by: !**/*.sum
  • go.work is excluded by: !**/*.work
  • go.work.sum is excluded by: !**/*.sum
  • lib/go.mod is excluded by: !**/*.mod
  • lib/go.sum is excluded by: !**/*.sum
Files selected for processing (6)
  • .golangci.yaml (3 hunks)
  • build/scripts/main.mk (2 hunks)
  • cosmos/x/evm/module.go (1 hunks)
  • e2e/localnet/utils/utils.go (1 hunks)
  • e2e/precompile/utils.go (1 hunks)
  • e2e/testapp/app.go (2 hunks)
Files skipped from review due to trivial changes (4)
  • .golangci.yaml
  • cosmos/x/evm/module.go
  • e2e/localnet/utils/utils.go
  • e2e/testapp/app.go
Additional comments: 3
e2e/precompile/utils.go (1)
  • 28-28: The //nolint:revive directive is used to bypass the linter for the import statement. This is not a typical practice and could be indicative of an underlying issue with the linter configuration or the import path.

Please confirm that this is the only viable solution and consider investigating the root cause that necessitates this directive.

build/scripts/main.mk (2)
  • 311-311: The golangci_version has been updated to v1.55.2.

Ensure that this version is compatible with the project's requirements and does not introduce any new issues.

  • 325-325: The concurrency level for golangci-fix has been increased from 8 to 64.

This is a significant increase and could potentially overload some build environments. Verify that this level of concurrency is supported across all environments where the linting process will be executed.

@faddat
Copy link
Contributor Author

faddat commented Jan 19, 2024

need to restore the tools folder that was unintentional

@faddat
Copy link
Contributor Author

faddat commented Jan 19, 2024

nah this just made the linter happy and did not make hive, e2e toolchain more happy. Lmk if any of it is interesting...

@faddat faddat changed the title fix: Lint tests + a fix! fix: Lint tests + fix e2e Jan 19, 2024
Copy link

codecov bot commented Jan 19, 2024

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (17ea475) 46.33% compared to head (a029924) 46.47%.
Report is 15 commits behind head on main.

❗ Current head a029924 differs from pull request most recent head 2ab8e1d. Consider uploading reports for the commit 2ab8e1d to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1447      +/-   ##
==========================================
+ Coverage   46.33%   46.47%   +0.14%     
==========================================
  Files          89       89              
  Lines        5169     5149      -20     
==========================================
- Hits         2395     2393       -2     
+ Misses       2598     2580      -18     
  Partials      176      176              
Files Coverage Δ
cosmos/runtime/txpool/ante.go 0.00% <ø> (ø)
cosmos/runtime/txpool/comet.go 42.85% <ø> (ø)
cosmos/runtime/txpool/handler.go 64.76% <ø> (-0.06%) ⬇️
cosmos/runtime/txpool/mempool.go 0.00% <0.00%> (ø)
cosmos/x/evm/module.go 21.42% <0.00%> (ø)
cosmos/config/default.go 0.00% <0.00%> (ø)

Copy link

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between b793b10 and 12495bb.
Files ignored due to path filters (17)
  • build/tools/go.mod is excluded by: !**/*.mod
  • build/tools/go.sum is excluded by: !**/*.sum
  • contracts/go.mod is excluded by: !**/*.mod
  • contracts/go.sum is excluded by: !**/*.sum
  • cosmos/go.mod is excluded by: !**/*.mod
  • cosmos/go.sum is excluded by: !**/*.sum
  • e2e/localnet/go.mod is excluded by: !**/*.mod
  • e2e/localnet/go.sum is excluded by: !**/*.sum
  • e2e/precompile/go.mod is excluded by: !**/*.mod
  • e2e/precompile/go.sum is excluded by: !**/*.sum
  • e2e/testapp/go.mod is excluded by: !**/*.mod
  • e2e/testapp/go.sum is excluded by: !**/*.sum
  • eth/go.mod is excluded by: !**/*.mod
  • eth/go.sum is excluded by: !**/*.sum
  • go.work.sum is excluded by: !**/*.sum
  • lib/go.mod is excluded by: !**/*.mod
  • lib/go.sum is excluded by: !**/*.sum
Files selected for processing (1)
  • .golangci.yaml (3 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .golangci.yaml

@faddat
Copy link
Contributor Author

faddat commented Jan 20, 2024

not really accomplishing the goal here I'm afraid. Putting this on draft.

@faddat faddat marked this pull request as draft January 20, 2024 00:42
@itsdevbear
Copy link
Member

thanks @faddat trying some stuff out

@faddat
Copy link
Contributor Author

faddat commented Jan 31, 2024

any time :D.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants