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

Problem: cometbft not up to date #1664

Merged
merged 8 commits into from
Oct 28, 2024

Conversation

yihuang
Copy link
Collaborator

@yihuang yihuang commented Oct 25, 2024

update to 0.38.13

👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻

PR Checklist:

  • Have you read the CONTRIBUTING.md?
  • Does your PR follow the C4 patch requirements?
  • Have you rebased your work on top of the latest master?
  • Have you checked your code compiles? (make)
  • Have you included tests for any non-trivial functionality?
  • Have you checked your code passes the unit tests? (make test)
  • Have you checked your code formatting is correct? (go fmt)
  • Have you checked your basic code style is fine? (golangci-lint run)
  • If you added any dependencies, have you checked they do not contain any known vulnerabilities? (go list -json -m all | nancy sleuth)
  • If your changes affect the client infrastructure, have you run the integration test?
  • If your changes affect public APIs, does your PR follow the C4 evolution of public contracts?
  • If your code changes public APIs, have you incremented the crate version numbers and documented your changes in the CHANGELOG.md?
  • If you are contributing for the first time, please read the agreement in CONTRIBUTING.md now and add a comment to this pull request stating that your PR is in accordance with the Developer's Certificate of Origin.

Thank you for your code, it's appreciated! :)

Summary by CodeRabbit

  • Documentation

    • Updated CHANGELOG.md to include a new section titled "UNRELEASED" for tracking improvements.
  • Chores

    • Updated various dependencies to their latest versions for improved compatibility and performance.
    • Updated Go version requirements to ensure alignment with the latest toolchain.
    • Updated flake.nix to reference a stable release of nixpkgs.
    • Updated nix/sources.json to reflect changes in the nixpkgs package source.
    • Increased timeout settings for linting processes to allow for longer checks.
    • Added golangci-lint package to the build overlay for enhanced linting capabilities.
    • Introduced a new Nix expression for the golangci-lint tool, facilitating easier linting integration.

@yihuang yihuang requested a review from a team as a code owner October 25, 2024 05:38
@yihuang yihuang requested review from mmsqe and leejw51crypto and removed request for a team October 25, 2024 05:38
Copy link
Contributor

coderabbitai bot commented Oct 25, 2024

Walkthrough

The changes in this pull request include updates to the CHANGELOG.md, go.mod, gomod2nix.toml, flake.nix, and nix/sources.json files. A new section titled "UNRELEASED" was added to CHANGELOG.md, documenting the update of the cometbft dependency to version 0.38.13. The go.mod file reflects changes in Go version requirements and multiple dependency updates, including the Go version from 1.22.2 to 1.22.7. The gomod2nix.toml file shows version and hash updates for several Go modules. Additionally, flake.nix and nix/sources.json were updated to reference a stable release of nixpkgs. Other files were also modified to enhance linting configurations and introduce new packages.

Changes

File Change Summary
CHANGELOG.md Added new section "UNRELEASED" with cometbft updated to 0.38.13. Existing entries remain unchanged.
go.mod Updated Go version from 1.22.2 to 1.22.7, toolchain from go1.22.3 to go1.23.1, and several dependencies to new versions.
gomod2nix.toml Updated versions and hashes for multiple Go modules, including cloud.google.com/go/compute/metadata and github.com/cometbft/cometbft.
flake.nix Updated nixpkgs input URL from nixpkgs-unstable to release-24.05.
nix/sources.json Updated nixpkgs entry to reflect changes in branch, revision, SHA256, and URL for stable release.
.github/workflows/lint.yml Increased timeout settings for golangci-lint job and individual lint commands.
nix/build_overlay.nix Added new package golangci-lint to the final attribute set.
nix/golangci-lint.nix Introduced a new Nix expression for the golangci-lint tool, specifying version and build details.
docs/docs.go Modified comment formatting for embedding static files.

Possibly related PRs

Suggested reviewers

  • JayT106
  • devashishdxt

🐇 In the changelog, a new tale,
Of cometbft, we set sail.
From 1.22.2 to 7, we leap,
With updates that make our code deep.
Dependencies fresh, like morning dew,
Hopping forward, we bid adieu! 🌟


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 866d28a and ffdedd5.

📒 Files selected for processing (1)
  • nix/golangci-lint.nix (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • nix/golangci-lint.nix

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

CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: yihuang <[email protected]>
Copy link
Collaborator

@mmsqe mmsqe left a comment

Choose a reason for hiding this comment

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

go.mod Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
Copy link

codecov bot commented Oct 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 34.99%. Comparing base (7dd3362) to head (ffdedd5).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1664   +/-   ##
=======================================
  Coverage   34.99%   34.99%           
=======================================
  Files         123      123           
  Lines       11783    11783           
=======================================
  Hits         4124     4124           
  Misses       7245     7245           
  Partials      414      414           

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: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 9c0f912 and c7717ce.

📒 Files selected for processing (1)
  • .github/workflows/lint.yml (2 hunks)

.github/workflows/lint.yml Show resolved Hide resolved
.github/workflows/lint.yml Show resolved Hide resolved
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: 0

🧹 Outside diff range and nitpick comments (1)
nix/golangci-lint.nix (1)

14-26: Consider using a dynamic build date.

The build configuration looks good overall, but the hardcoded date (19700101-00:00:00) could be replaced with the actual build date for better debugging information.

Consider updating the date flag:

-    "-X main.date=19700101-00:00:00"
+    "-X main.date=$(date -u +%Y%m%d-%H:%M:%S)"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between c7717ce and 866d28a.

📒 Files selected for processing (3)
  • docs/docs.go (1 hunks)
  • nix/build_overlay.nix (1 hunks)
  • nix/golangci-lint.nix (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • docs/docs.go
🔇 Additional comments (6)
nix/build_overlay.nix (2)

4-4: LGTM! The golangci-lint package addition follows Nix conventions.

The syntax is correct and consistent with the existing pattern used for other packages in this overlay.


4-4: Verify the relationship with cometbft update.

The addition of golangci-lint appears to be separate from the main PR objective of updating cometbft. Please clarify if this is:

  1. A required tooling update to support the newer cometbft version
  2. An unrelated improvement that should be in a separate PR
✅ Verification successful

Let me gather more information about the relationship between golangci-lint and cometbft.


Let me check one more thing to see if golangci-lint is used in any Go-related build or test processes.


golangci-lint is a required development dependency

The verification shows that golangci-lint is an essential development tool used in the project's build process:

  • It's integrated into the main Makefile with dedicated lint targets (lint, lint-fix)
  • The project has a .golangci.yml configuration file
  • It's used for Go code linting as part of the development workflow

This is a required tooling dependency that belongs in this PR as it's needed for the Go-based development workflow, which includes working with CometBFT.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if golangci-lint is mentioned in cometbft's build requirements
rg -l "golangci-lint" --type nix

Length of output: 76


Script:

#!/bin/bash
# Check the content of golangci-lint.nix to understand its purpose
cat nix/golangci-lint.nix

# Search for any direct relationship between cometbft and golangci-lint
rg -i "cometbft.*golangci-lint|golangci-lint.*cometbft" -A 5 -B 5

# Check if there are any recent changes or commits mentioning both
git log --grep="cometbft.*golangci|golangci.*cometbft" --all

Length of output: 1315


Script:

#!/bin/bash
# Check for any Go-related build or test files that might use golangci-lint
rg -l "\.go" --type yaml --type nix

# Look for any Makefile or similar build scripts
fd Makefile

# Check content of any found build files
rg "lint" --type yaml --type make

Length of output: 1223

nix/golangci-lint.nix (4)

7-12: LGTM! Secure source configuration.

The source fetching configuration is well-defined with proper hash verification for security.


28-33: LGTM! Comprehensive shell completion setup.

The post-installation script properly generates and installs shell completions for all major shells, with appropriate security measures using TMPDIR.


35-42: ⚠️ Potential issue

Fix incorrect license specification.

The license is specified as GPL3+, but golangci-lint uses the MIT license according to their repository.

Update the license specification:

-    license = licenses.gpl3Plus;
+    license = licenses.mit;

Let's verify the license:

#!/bin/bash
# Description: Check the license in golangci-lint repository
gh api repos/golangci/golangci-lint --jq .license.spdx_id

1-6: Verify the builder name and version number.

Two potential issues to address:

  1. The builder name buildGo123Module seems unusual. Should this be buildGoModule instead?
  2. The specified version 1.60.1 appears to be incorrect as it's higher than the latest released version (1.55.2) of golangci-lint.

Let's verify the latest version:

@yihuang yihuang added this pull request to the merge queue Oct 28, 2024
Merged via the queue into crypto-org-chain:main with commit 01b048e Oct 28, 2024
38 checks passed
@yihuang yihuang deleted the update-cometbft branch October 28, 2024 05:55
@coderabbitai coderabbitai bot mentioned this pull request Oct 28, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants