chore(pingcap/tiflow): update latest Go 1.25 CI images for tiflow jobs#4578
Conversation
Signed-off-by: lyb <yebin.li@pingcap.com>
There was a problem hiding this comment.
I have already done a preliminary review for you, and I hope to help you do a better job.
Summary
This PR updates the Go 1.25 CI image tags used in TiFlow pipeline and Prow job YAML files to a newer Go 1.25 version (v2026.4.12-10-gc29110c-go1.25). The update addresses a version mismatch error between the Go compiler and tool version after upgrading go.mod to Go 1.25.9. The changes are straightforward and focused on bumping image tags. Overall, the PR is concise and targets the correct files to fix the CI environment inconsistency.
Code Improvements
-
Validation of image tag consistency across all relevant YAML files
The PR updates multiple YAML files underpipelines/pingcap/tiflow/latest/and a Prow job YAMLprow-jobs/pingcap/tiflow/latest-presubmits.yaml.- It would be beneficial to cross-verify if other CI jobs or pipeline configurations referencing older Go 1.25 images exist outside these files. This ensures no job remains with outdated images causing flaky builds.
- Consider centralizing these image tags in a shared config or environment variable if possible, to avoid manual updates in multiple places.
-
Pinning exact Go patch version in image tags
The updated image tag ends withgo1.25without specifying the patch version1.25.9, which is the version referenced in the PR description. Confirm that the imagev2026.4.12-10-gc29110c-go1.25actually uses Go 1.25.9 to avoid similar mismatches in the future. If possible, use explicit patch version tags in image names, e.g.,go1.25.9. -
ImagePullPolicy consistency
Inpod-pull_cdc_integration_kafka_test.yaml, theimagePullPolicy: Alwaysis explicitly set for the golang container. However, this is missing in other similar YAML files. Consider adding this explicitly for all golang containers to ensure the latest image is always pulled, preventing cached older images from causing issues.
Best Practices
-
Add comments or documentation in YAML files
The YAML files lack any comments explaining the purpose of the image tags or the Go version upgrade. Adding a brief comment near the image tag lines would help future maintainers understand why these particular image versions are used and the rationale for updates. For example:# Use updated Go 1.25.9 image to match go.mod version and avoid compile version mismatch errors image: ghcr.io/pingcap-qe/ci/jenkins:v2026.4.12-10-gc29110c-go1.25
-
Testing coverage for this change
Since this is a CI configuration update, ensure that after merging, the relevant CI jobs run successfully with the new images by monitoring the pipeline runs. It is helpful to document any such verification within the PR description or comments.
No critical issues identified as this PR is a version bump in CI images and does not affect application logic. The main focus is ensuring all relevant CI and test jobs use consistent and correct Go images to prevent build failures.
There was a problem hiding this comment.
Code Review
This pull request updates the CI image tags to version v2026.4.12-10-gc29110c-go1.25 across various TiFlow pipeline and job configuration files. Review feedback indicates that the update in latest-presubmits.yaml is incomplete, as several other jobs in that file still reference older image versions. Additionally, a suggestion was made to use double quotes for the image name in pod-pull_cdc_integration_kafka_test.yaml to maintain consistency with other pod definitions in the repository.
Signed-off-by: lyb <yebin.li@pingcap.com>
There was a problem hiding this comment.
I have already done a preliminary review for you, and I hope to help you do a better job.
Summary
This PR updates the Go version used in TiFlow CI images from an older Go 1.25 image tag to a newer one specifically v2026.4.12-10-gc29110c-go1.25 to fix version mismatch errors between go.mod and the Go tool version during compilation. The change is straightforward, replacing image tags in multiple Kubernetes pod specs and Prow job configs. Overall, the changes are consistent and directly address the version mismatch issue, but the PR could improve by adding verification steps and considering maintainability.
Code Improvements
- Lack of Centralized Image Version Management
- Files affected:
pipelines/pingcap/tiflow/latest/*.yaml,prow-jobs/pingcap/tiflow/latest-presubmits.yaml - Issue: The Go image version is hardcoded repeatedly across multiple YAML files. This causes duplication and increases risk of inconsistent updates in the future.
- Suggestion: Introduce a centralized variable or config map for the image version tag used in TiFlow CI jobs. This can be templated during pipeline generation or imported from a shared config to ease maintenance. For example:
# In a config file golang_image_tag: v2026.4.12-10-gc29110c-go1.25 # Then reference this tag in other YAMLs or scripts image: "ghcr.io/pingcap-qe/ci/jenkins:${golang_image_tag}"
- Files affected:
- Missing Validation or Testing Steps
- Files affected: Entire PR (implicit)
- Issue: The PR description notes a version mismatch error was fixed, but the PR does not mention any validation or test runs confirming the new image resolves the issue and builds/tests pass successfully.
- Suggestion: Add a note about successful CI runs with the new images or include a checklist in the PR description to confirm that the updated images have been tested in all relevant CI jobs.
Best Practices
-
Documentation of Image Version Updates
- Files affected: None (documentation outside YAML)
- Issue: While the PR description is clear, the update of Go images is a critical dependency change that could benefit from documented versioning guidelines or a changelog entry on how and when to update CI images related to Go versions.
- Suggestion: Maintain a
docs/or internal wiki page for managing Go version upgrades in CI, including how to track and update image tags to prevent mismatches.
-
Consistent Image Pull Policy
- Files affected:
pipelines/pingcap/tiflow/latest/pod-pull_cdc_integration_kafka_test.yaml(line ~22) - Observation: One YAML explicitly sets
imagePullPolicy: Alwayswhile others do not. It’s recommended to standardize this to avoid caching stale images, especially after an update. - Suggestion: Ensure all pod specs use
imagePullPolicy: Alwayswhen referencing frequently updated CI images to avoid pulling outdated cached versions.
- Files affected:
Minor Suggestions
- PR Description
- The example error message is very helpful. Consider adding the exact Go version string mismatch error as a code block for clarity, e.g.:
compile: version "go1.25.9" does not match go tool version "go1.25.8" - This is already done, but make sure it's formatted as a code block in markdown for readability (which it is).
- The example error message is very helpful. Consider adding the exact Go version string mismatch error as a code block for clarity, e.g.:
Summary: The PR effectively updates the Go image versions across TiFlow CI jobs to resolve version mismatch errors. To improve maintainability and robustness, centralizing image version management and standardizing image pull policies are recommended. Additionally, validating the changes with successful CI runs and maintaining documentation on Go version upgrades would enhance long-term reliability.
Signed-off-by: lyb <yebin.li@pingcap.com>
There was a problem hiding this comment.
I have already done a preliminary review for you, and I hope to help you do a better job.
Summary:
This PR updates the Go version in the CI images for TiFlow jobs from older Go 1.25 tags to the latest Go 1.25.9 image tags. The approach is straightforward—modifying image tags in Kubernetes pod and Prow job YAML files to ensure consistency with the updated go.mod version. The changes are focused and low risk, addressing build errors caused by version mismatches. Overall, the update looks correct and necessary, but a few improvements can be made around maintainability and version management.
Code Improvements
-
Centralize Image Versioning
- Files: All YAML files under
pipelines/pingcap/tiflow/latest/andprow-jobs/pingcap/tiflow/latest-presubmits.yaml - Issue: The same image tag
"v2026.4.12-10-gc29110c-go1.25"is repeated across many files and places. This creates a maintenance burden and risk of inconsistent versions if future updates are needed. - Suggestion: Define the image tags as variables or constants in a single config file or use templating tools (e.g., Helm, Kustomize) if supported by the CI system. This would enable easier, error-proof image updates in the future.
- Files: All YAML files under
-
Verify Image Pull Policies
- Files:
pipelines/pingcap/tiflow/latest/pod-pull_cdc_integration_kafka_test.yaml(and others) - Observation: Some containers explicitly set
imagePullPolicy: Always, others do not. - Suggestion: For consistency and to ensure the latest images are always pulled (especially with frequently updated tags), consider setting
imagePullPolicy: Alwaysexplicitly in all pod specs.
- Files:
Best Practices
-
Add Comments Explaining the Version Update
- Files: All modified YAML files
- Issue: No comments are present explaining why the image tags were updated.
- Suggestion: Add short comments near the image lines indicating the update is due to
go.modbump to Go 1.25.9 to help future maintainers understand the rationale without referring to the PR description.
-
Testing Coverage
- Issue: The PR does not mention running the updated CI jobs to verify the new images work as expected.
- Suggestion: Ensure that the updated CI pipelines have been tested and validated to prevent build or runtime failures due to image changes.
Minor Suggestions
- Consistent Quotation Marks
- Files: Mixed usage of double quotes with and without quotes around image names.
- Suggestion: Standardize on double quotes for all image field values for consistency, e.g.:
image: "ghcr.io/pingcap-qe/ci/jenkins:v2026.4.12-10-gc29110c-go1.25"
No critical issues or broken functionality detected. The PR addresses the core problem effectively. Implementing the above improvements would increase maintainability and clarity.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wuhuizuo The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
What
Update TiFlow latest CI images to the newer Go 1.25 image tag:
ghcr.io/pingcap-qe/ci/jenkins:v2026.4.12-10-gc29110c-go1.25for jenkins jobghcr.io/pingcap-qe/ci/base:v2026.4.12-10-gc29110c-go1.25for the Prow unit test jobWhy
TiFlow PR pingcap/tiflow#12628 updates
go.modtogo 1.25.9.Some CI jobs were still running with older Go 1.25 images, causing errors like:
Test result
I have run replay tests for all failed tasks. The Go version mismatch issue is now fully resolved. The remaining failures are either integration test failures inherent to the TiFlow PR itself, or runtime issues on individual Jenkins/K8s agents. These are not directly related to the current upgrade of the Go image.