*: upgrade golang to 1.25 (#12384)
This is an automated cherry-pick of #12384
What problem does this PR solve?
Issue Number: close #12383
What is changed and how it works?
This PR upgrades the entire tiflow project to build and test against Go 1.25. This ensures we are using a modern toolchain and benefiting from its latest improvements.
Changes included:
- Updated the
godirective to1.25in the followinggo.modfiles:- Root (
./go.mod) examples/golang/avro-checksum-verification/go.modexamples/golang/canal-json-handle-key-only/go.modtests/integration_tests/debezium/go.modtools/check/go.mod
- Root (
- Removed all explicit
toolchaindirectives, as they are now redundant with thego 1.25setting.
Check List
Tests
- Unit test
- Integration test
Questions
Will it cause performance regression or break compatibility?
None
Do you need to update user documentation, design documentation or monitoring documentation?
None
Release note
None
@wlwilliamx This PR has conflicts, I have hold it.
Please resolve them or ask others to resolve them, then comment /unhold to remove the hold label.
@ti-chi-bot: ## If you want to know how to resolve it, please read the guide in TiDB Dev Guide.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.
Summary of Changes
Hello @ti-chi-bot, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request primarily focuses on upgrading the entire tiflow project to utilize Go 1.25.5. This upgrade ensures the project benefits from the latest Go toolchain improvements, performance enhancements, and security updates. Alongside the core Go version bump, the changes include updating Docker build environments, streamlining go.mod files by removing redundant toolchain directives, and introducing a new PrimaryKeyChecker to enhance data replication integrity. These updates collectively aim to modernize the project's build infrastructure and improve data consistency checks.
Highlights
- Go Version Upgrade: The project's Go toolchain has been upgraded to version 1.25.5, impacting the main module and several example/test modules to leverage the latest language features and performance improvements.
- Dockerfile Updates: All relevant Dockerfiles across
deployments/engine,deployments/ticdc, anddmhave been updated to usegolang:1.25-alpineor a Go 1.25-based image for building and testing environments, ensuring consistency with the new Go version. - Toolchain Directive Removal: Explicit
toolchaindirectives have been removed fromgo.modfiles, as they are now redundant with thego 1.25setting, simplifying module configuration. - New Primary Key Checker: A new checker (
PrimaryKeyChecker) has been introduced indm/pkg/checkerto verify the existence of primary keys in upstream tables, which is crucial for optimizing replication efficiency and ensuring data correctness. - Logging and Error Formatting Consistency: Minor adjustments were made to
t.LogfandNewWarn/NewErrorcalls to ensure consistent string formatting, particularly for error messages. - Dependency Updates: Numerous indirect dependencies in
tools/check/go.modhave been updated, likely as a consequence of the Go version upgrade and general maintenance to ensure compatibility and leverage newer versions.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in pull request comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
[^1]: Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.
/test pull-verify
Codecov Report
:x: Patch coverage is 12.09677% with 109 lines in your changes missing coverage. Please review.
:warning: Please upload report for BASE (release-8.5@951f487). Learn more about missing BASE report.
Additional details and impacted files
| Components | Coverage Δ | |
|---|---|---|
| cdc | 57.7870% <0.0000%> (?) |
|
| dm | 48.7100% <0.0000%> (?) |
|
| engine | 50.6829% <0.0000%> (?) |
| Flag | Coverage Δ | |
|---|---|---|
| unit | 53.4183% <12.0967%> (?) |
Flags with carried forward coverage won't be shown. Click here to find out more.
@@ Coverage Diff @@
## release-8.5 #12465 +/- ##
================================================
Coverage ? 53.4183%
================================================
Files ? 1004
Lines ? 136968
Branches ? 0
================================================
Hits ? 73166
Misses ? 58349
Partials ? 5453
:rocket: New features to boost your workflow:
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
/retest
/unhold
@OliverS929: adding LGTM is restricted to approvers and reviewers in OWNERS files.
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Benjamin2037, OliverS929, wlwilliamx
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [Benjamin2037,wlwilliamx]
- ~~dm/OWNERS~~ [Benjamin2037]
- ~~engine/OWNERS~~ [Benjamin2037]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
/retest
/retest