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: debug golangci-lint for cosmovisor #18304

Merged
merged 4 commits into from
Oct 30, 2023
Merged

Conversation

julienrbrt
Copy link
Member

@julienrbrt julienrbrt commented Oct 30, 2023

Description

PRs with cosmovisor changes are blocked due to failing linting.

This probably have been introduced with the extended linting script and the combination of building tags.

This PR addresses the issue and removes the rocksdb_build tag from ci, as it does not exist.


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
  • added ! to 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
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • run make lint and make test
  • 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.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

Summary by CodeRabbit

Tests:

  • Updated test commands for multiple packages, removing the rocksdb_build tag for improved test execution.

Style:

  • Implemented code formatting changes in the lint_module() function for better code readability.

Chores:

  • Modified the linting process for certain directories to exclude specific build tags, enhancing the efficiency of the linting process.
  • Added a comment in args.go for better code understanding and maintenance.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 30, 2023

Walkthrough

The changes primarily revolve around modifying test and linting commands for various packages and modules in the project. The rocksdb_build tag has been removed from test commands, and the linting process has been adjusted for certain directories and modules. No significant changes have been made to the tools/cosmovisor/args.go file, except for the addition of a comment.

Changes

File(s) Summary
.github/workflows/test.yml Test commands for multiple packages have been modified, with the rocksdb_build tag removed.
scripts/go-lint-all.bash Changes to the lint_module() function include a new condition for linting the simapp module and modified linting commands for certain directories. Code formatting changes are also present.
tools/cosmovisor/args.go A comment has been added, with no changes to the signatures of exported functions, global data structures, global variables, interfaces, return values, or thrown exceptions.

🐇🍂

As the leaves fall and the wind does blow,

CodeRabbit hops and tweaks the code flow.

Tags removed, lints refined, no stone unturned,

In the autumn's chill, new knowledge is learned.

Celebrate the changes, for they bring delight,

To the world of code, shining bright.

So here's to the season, and to the code's new lease,

May our efforts bring both progress and peace. 🍁🌙


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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 help to get help.
  • @coderabbitai resolve to resolve all the CodeRabbit review comments.

Note: For conversation with the bot, please use the review comments on code diffs or files.

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

@github-actions github-actions bot added the C:Cosmovisor Issues and PR related to Cosmovisor label Oct 30, 2023
@julienrbrt julienrbrt marked this pull request as ready for review October 30, 2023 15:13
@julienrbrt julienrbrt requested a review from a team as a code owner October 30, 2023 15:13
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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 393de26 and e9a7f3b.
Files selected for processing (3)
  • .github/workflows/test.yml (29 hunks)
  • scripts/go-lint-all.bash (2 hunks)
  • tools/cosmovisor/args.go (1 hunks)
Files skipped from review due to trivial changes (2)
  • scripts/go-lint-all.bash
  • tools/cosmovisor/args.go
Additional comments: 1
.github/workflows/test.yml (1)
  • 1185-1187: The changes in these hunks are removing the rocksdb_build tag from the go test command. This is likely due to the fact that the rocksdb_build tag was causing issues with the linter. Ensure that removing this tag does not affect the functionality of the tests or the packages they are testing.

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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between e9a7f3b and 9ddad7f.
Files selected for processing (1)
  • tools/cosmovisor/process.go (1 hunks)
Files skipped from review due to trivial changes (1)
  • tools/cosmovisor/process.go

@julienrbrt julienrbrt enabled auto-merge October 30, 2023 15:22
@github-prbot github-prbot requested review from a team, kocubinski and likhita-809 and removed request for a team October 30, 2023 15:35
else
golangci-lint run ./... -c "${REPO_ROOT}/.golangci.yml" "$@" --build-tags=rocksdb,e2e,ledger,test_ledger_mock
fi
if [[ (-z "${NIX:-}" && $f != store) || $f == "tools/"* ]]; then
Copy link
Member

Choose a reason for hiding this comment

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

unclear how this effects cosmovisor? can you explain

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, $f is the directory name/path, so if it contains tools/ it applies to confix and cosmovisor
cosmovisor is under tools/, we actually have the same issue for all tools (confix).

Copy link
Member

Choose a reason for hiding this comment

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

is there a flag in the list that is needed for the tools? that was the confusing part,

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, using rocksdb tag for building tooling breaks them.

Copy link
Member

Choose a reason for hiding this comment

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

ah okay, thank you

@julienrbrt julienrbrt added this pull request to the merge queue Oct 30, 2023
Merged via the queue into main with commit 15ccdcc Oct 30, 2023
@julienrbrt julienrbrt deleted the julien/cosmovisor-lint branch October 30, 2023 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:Cosmovisor Issues and PR related to Cosmovisor Type: Build Type: CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants