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

Drop support of go1.19 #1558

Merged
merged 3 commits into from
Mar 11, 2024

Conversation

shogo82148
Copy link
Contributor

@shogo82148 shogo82148 commented Mar 11, 2024

Description

Due to the discontinuation of support for Go 1.19 (in #1557 ), we are now able to use the atomic.Bool from the standard library.
This allows us to remove our custom implementation of atomicBool and simplify the code.

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

  • Documentation
    • Updated README to reflect new software version requirements: now requires Go version 1.20 and supports MariaDB version 10.5.
    • Added documentation for new support of TiDB by PingCAP.
  • New Features
    • Introduced compatibility with TiDB, expanding database support.

Copy link

coderabbitai bot commented Mar 11, 2024

Walkthrough

This update focuses on enhancing compatibility and performance by upgrading the required Go version to 1.20, shifting MariaDB support from version 10.3 to 10.5, and introducing support for TiDB by PingCAP. It also includes a technical adjustment in the connection management code by changing the type of a variable for improved atomic operations.

Changes

File Change Summary
README.md Updated Go version requirement to 1.20, added support for MariaDB 10.5 and TiDB
connection.go Imported sync/atomic package; changed closed field type to atomic.Bool

Related issues

  • context deadline exceeded #1528: The changes in this PR could potentially address the "context deadline exceeded" error by ensuring compatibility with newer Go versions (1.20) and by indirectly affecting connection stability through the updated atomic operations in connection.go. The issue's focus on connection settings and behaviors aligns with the improvements intended by the PR.

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

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 3147497 and 115fdb1.
Files ignored due to path filters (1)
  • go.mod is excluded by: !**/*.mod
Files selected for processing (2)
  • README.md (1 hunks)
  • connection.go (2 hunks)
Additional comments: 6
connection.go (2)
  • 20-20: The addition of the sync/atomic package is appropriate for utilizing atomic.Bool in the codebase.
  • 45-45: Changing the closed field to use atomic.Bool from the standard library simplifies the code and improves maintainability by eliminating the custom atomicBool implementation. All usages of the closed field have been correctly updated to use the atomic.Bool methods.
README.md (4)
  • 44-44: The README now specifies Go 1.20 or higher as a requirement, aligning with the PR's objective to utilize features from newer Go versions. This change is crucial for users and developers to understand the updated environment requirements.
  • 44-44: MariaDB support has been updated from version 10.3 to 10.5. This is an important update for users working with MariaDB, ensuring compatibility with newer versions of the database.
  • 44-44: Support for TiDB by PingCAP has been added. This inclusion broadens the driver's compatibility with different database systems, offering more options for users.
  • 44-44: The README mentions support for MySQL (5.7+) and MariaDB (10.5+), but it's also worth noting in the review that ensuring compatibility with these versions is crucial for users relying on specific database features or behaviors.

@coveralls
Copy link

Coverage Status

coverage: 81.989%. remained the same
when pulling 115fdb1 on shogo82148:drop-support-of-go1.19
into 3147497 on go-sql-driver:master.

@shogo82148 shogo82148 merged commit 8a327a3 into go-sql-driver:master Mar 11, 2024
32 checks passed
@shogo82148 shogo82148 deleted the drop-support-of-go1.19 branch March 11, 2024 14:54
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