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: update Go and staticcheck versions #1639

Merged
merged 2 commits into from
Nov 11, 2024
Merged

Conversation

methane
Copy link
Member

@methane methane commented Nov 10, 2024

Description

  • Add Go 1.23 support
  • Remove Go 1.20 support
  • Update staticcheck action

Checklist

  • Code compiles correctly
  • Created tests which fail without the change (if possible)
  • All tests passing
  • Extended the README / documentation, if necessary
  • Added myself / the copyright holder to the AUTHORS file

Summary by CodeRabbit

  • New Features

    • Updated Go version requirement in the README to "Go 1.21 or higher."
  • Chores

    • Updated the version of the static check action in the workflow configuration.
    • Modified Go version array for compatibility in the testing workflow.
    • Updated Go version requirement in go.mod to 1.21.

Copy link

coderabbitai bot commented Nov 10, 2024

Walkthrough

The pull request includes updates to the workflow configuration in .github/workflows/test.yml, the README.md file for the Go-MySQL-Driver, and the go.mod file. The workflow file updates the version of the dominikh/staticcheck-action and modifies the Go version requirements. The README.md adjusts the minimum Go version from "1.20 or higher" to "1.21 or higher," and the go.mod file reflects the same change in Go version. These changes enhance compatibility without altering the fundamental logic or structure of the existing code.

Changes

File Change Summary
.github/workflows/test.yml - Updated dominikh/staticcheck-action from v1.3.0 to v1.3.1
- Changed Go version from 1.22 to 1.23, added 1.22, removed 1.20
README.md - Updated Go version requirement from 1.20 or higher to 1.21 or higher
go.mod - Updated Go version from 1.20 to 1.21

Possibly related PRs

Suggested reviewers

  • shogo82148

Poem

🐰 In the garden where code does bloom,
New versions sprout, dispelling gloom.
From 1.20 to 1.21 we cheer,
With static checks, our path is clear!
Let's hop along, with tests so bright,
In the world of Go, we take flight! 🌼


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between b2aa497 and 5875aa3.

📒 Files selected for processing (1)
  • go.mod (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • go.mod

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.

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.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 91ad4fb and b2aa497.

📒 Files selected for processing (2)
  • .github/workflows/test.yml (2 hunks)
  • README.md (1 hunks)
🔇 Additional comments (2)
.github/workflows/test.yml (1)

18-18: Verify staticcheck version compatibility.

The update to staticcheck v1.3.1 is a minor version bump. Let's verify the changes and stability of this version.

✅ Verification successful

Let me gather more information about the changes between versions.


✓ Staticcheck action update to v1.3.1 is safe to use

The update from v1.3.0 to v1.3.1 includes maintenance changes focused on documentation updates and dependency upgrades. Key changes:

  • Updated dependencies (setup-go-faster, actions/cache)
  • Documentation improvements
  • No breaking changes or compatibility issues

The version bump is stable and safe to use with the updated Go versions in the workflow.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check the changelog or release notes for staticcheck v1.3.1
# to ensure compatibility and understand the changes

# Test: Check if there are any breaking changes or important updates
gh release view v1.3.1 --repo dominikh/staticcheck-action

Length of output: 271


Script:

#!/bin/bash
# Check the commit history between v1.3.0 and v1.3.1 to understand the changes
gh api repos/dominikh/staticcheck-action/compare/v1.3.0...v1.3.1 --jq '.commits[].commit.message'

# Also check if there are any issues or discussions related to v1.3.1
gh issue list --repo dominikh/staticcheck-action --search "v1.3.1 in:title,body" --state all

Length of output: 1052

README.md (1)

44-44: LGTM! Version requirement update is clear and consistent.

The update to require Go 1.21 or higher aligns with the PR objectives and maintains the policy of supporting the 3 latest versions of Go.

Let's verify if any other sections need updates:

✅ Verification successful

LGTM! All Go version references are consistent with the update

The search results confirm that:

  • The main requirement in README.md correctly states Go 1.21
  • Other Go version mentions in README.md and CHANGELOG.md are either:
    • Historical changelog entries that should remain unchanged
    • Documentation about features available since older versions (e.g., SetConnMaxIdleTime since Go 1.15)
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any other Go version references that might need updates
# Test: Search for Go version mentions. Expect: No other outdated version references.
rg -i "go 1\.[0-9]{2}" --type md

Length of output: 762

Comment on lines +32 to +34
'1.23',
# Older production releases
'1.22',
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

⚠️ Go 1.23 compatibility concerns found

The codebase currently specifies Go 1.20 in go.mod, which is significantly behind the proposed Go 1.23. While there are no Go 1.23-specific features used, upgrading the Go version requires:

  • Updating go 1.20 to at least go 1.21 in go.mod
  • Testing compatibility with the edwards25519 dependency (v1.1.0)
  • Verifying the fuzzing tests (currently requiring go1.18+)

Please update go.mod and verify the changes before merging.

🔗 Analysis chain

LGTM! Verify Go 1.23 compatibility.

The Go version updates look good:

  • Go 1.23 is now the primary version
  • Maintains support for Go 1.22 and 1.21
  • Removes Go 1.20 as planned

Let's verify compatibility with Go 1.23.


Let me gather more information about the build constraints and Go version requirements.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any Go 1.23-specific syntax or features in the codebase
# that might cause compatibility issues

# Test 1: Look for any Go 1.23 specific features or syntax
echo "Checking for Go 1.23 specific features..."
rg -l 'go1\.23' 

# Test 2: Check go.mod for compatibility
echo "Checking go.mod for version constraints..."
if [ -f "go.mod" ]; then
    cat go.mod | grep -A 5 "^go "
fi

# Test 3: Look for any build constraints
echo "Checking for build constraints..."
rg -l '//\s*\+build\s+' 
rg -l '//go:build'

Length of output: 561


Script:

#!/bin/bash
# Check the specific build constraints and their version requirements
echo "Checking build constraint contents..."
rg "//go:build|//\s*\+build" -A 2

# Check for any version-specific code or dependencies
echo "Checking go.mod dependencies..."
cat go.mod

# Look for any potential compatibility issues in the code
echo "Checking for version-sensitive features..."
rg "(?i)go1\.[0-9]{2}" --type go

Length of output: 1501

@coveralls
Copy link

coveralls commented Nov 10, 2024

Coverage Status

coverage: 82.39%. remained the same
when pulling 5875aa3 on methane:go123
into 91ad4fb on go-sql-driver:master.

@methane methane merged commit fc64d3f into go-sql-driver:master Nov 11, 2024
35 of 38 checks passed
@methane methane deleted the go123 branch November 11, 2024 02:14
methane added a commit to methane/mysql that referenced this pull request Nov 13, 2024
- Add Go 1.23 support
- Remove Go 1.20 support
- Update staticcheck action
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.

3 participants