Skip to content

Conversation

wdbaruni
Copy link
Member

@wdbaruni wdbaruni commented Feb 18, 2025

The workflow is failing because golangci-lint-action added config validation, and our config are still using outdated lints that have been dropped couple of years ago.

This PR fixes the issue by removing the dropped configs, but also mitigates future similars issues by:

  • Pinning the golangci-lint version used by the action to latest version v1.64.5 to avoid always using the latest version which may be incompatible with our configs
  • Pinning golangci-lint-action to current latest version v6.5.0 to avoid change in behaviour, such as config validation

This allows us to update whenever we are ready and not block our pipeline when latest versions are incompatible with our repo

Summary by CodeRabbit

  • Chores
    • Updated and streamlined automated quality checks for improved consistency.
    • Upgraded linting tool versions across the development process to enhance code quality.

Copy link

linear bot commented Feb 18, 2025

Copy link
Contributor

coderabbitai bot commented Feb 18, 2025

Walkthrough

This pull request updates the project's configuration by refining linting tool versions and making formatting adjustments. In the GitHub Actions workflow (.github/workflows/lint.yml), the OS matrix formatting is revised, and an explicit version (v1.64.5) is now specified for the golangci-lint-action. The version of golangci-lint is updated in the .tool-versions file (from 1.55.2 to 1.64.2) and in the Dockerfile (docker/.../Dockerfile), where the GOLANGCI_LINT_VERSION environment variable is set from v1.60.1 to v1.64.5. Additionally, the .golangci.yml file has been modified to tighten linting rules and exclusions.

Changes

File(s) Change Summary
.github/workflows/lint.yml Reformatted OS matrix; updated golangci-lint-action version from v6 to v6.5.0 and added explicit version v1.64.5.
.tool-versions Updated golangci-lint version from 1.55.2 to 1.64.2.
docker/buildkite-hosted-agent-bacalhau/Dockerfile Updated GOLANGCI_LINT_VERSION from v1.60.1 to v1.64.5.
.golangci.yml Removed allow-leading-space from nolintlint; updated exclude-files and exclude-dirs settings.

Poem

I hopped through the lines of code so fine,
Updated versions made the linting shine,
No gaps to trip on, all settings aligned,
My whiskers dance with each fix defined,
A carrot of change in every line!
Cheers from a rabbit with joy divine!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8b69202 and 845adb5.

📒 Files selected for processing (3)
  • .github/workflows/lint.yml (2 hunks)
  • .golangci.yml (0 hunks)
  • docker/buildkite-hosted-agent-bacalhau/Dockerfile (1 hunks)
💤 Files with no reviewable changes (1)
  • .golangci.yml
⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: build / Build Binary (windows, amd64)
  • GitHub Check: build / Build Binary (darwin, arm64)
  • GitHub Check: build / Build Binary (darwin, amd64)
  • GitHub Check: build / Build Binary (linux, armv6)
  • GitHub Check: build / Build Binary (linux, armv7)
  • GitHub Check: build / Build Binary (linux, arm64)
  • GitHub Check: build / Build Binary (linux, amd64)
  • GitHub Check: lint / lint
  • GitHub Check: lint / go-lint (ubuntu-latest)
🔇 Additional comments (3)
docker/buildkite-hosted-agent-bacalhau/Dockerfile (1)

5-5: Version Inconsistency with golangci-lint Pinning
The PR title mentions pinning golangci-lint to v1.64.2, yet this Dockerfile now sets GOLANGCI_LINT_VERSION to v1.64.5. Please verify and align the version across all configurations (Dockerfile, workflow, and .tool-versions) to avoid discrepancies.

.github/workflows/lint.yml (2)

14-14: YAML Formatting Improvement Confirmed
Reformatting the OS matrix entry to os: [ubuntu-latest] removes unnecessary spaces and improves the readability of the workflow configuration.


25-28: Version Specification in GitHub Action Needs Verification
The workflow now uses golangci/golangci-lint-action@v6.5.0 with an explicit version: v1.64.5. However, given that the PR title specifies pinning to v1.64.2, please confirm that v1.64.5 is the intended version. Consistency between the CI configurations and the pinning objective is critical for reproducibility.


🪧 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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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.

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

@wdbaruni wdbaruni changed the title pin golangci-lint to v1.64.2 fix golangci-lint workflow Feb 18, 2025
@wdbaruni wdbaruni merged commit 655223d into main Feb 18, 2025
14 checks passed
@wdbaruni wdbaruni deleted the eng-623-pin-golangci-lint-version branch February 18, 2025 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant