ci(dockerfiles): add go1.19 and go1.20 jenkins image profiles#4765
ci(dockerfiles): add go1.19 and go1.20 jenkins image profiles#4765wuhuizuo wants to merge 2 commits into
Conversation
Replace hub.pingcap.net and registry-mirror.pingcap.net image references in YAML files under pipelines/pingcap/tiflow/. For release-8.5 and release-9.0-beta: - hub.pingcap.net/jenkins/* -> ghcr.io/pingcap-qe/ci/jenkins:v2026.4.12-10-gc29110c-go1.25 For all branches (including pre-8.5): - hub.pingcap.net/jenkins/mysql:5.7 -> docker.io/library/mysql:5.7 - registry-mirror.pingcap.net/library/mysql:8.0.21 -> docker.io/library/mysql:8.0.21 Pre-8.5 branches retain original Go-version-specific jenkins images (Go 1.19-1.23) as Go 1.25 is not compatible with those branches. Ref: FLA-233
Add skaffold profiles for Go 1.19.13 and Go 1.20.14 to build GHCR jenkins images needed for pre-8.5 tiflow release branches. Also add go-1.21 and go-1.23 profiles for completeness (images already exist on GHCR but were not in the build config). Update workflow matrix to build go-1.19 and go-1.20 variants. Ref: FLA-233
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
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 pull request updates the CI pipeline to build Jenkins images for Go versions 1.19 and 1.20, expanding compatibility for pre-8.5 release branches. It also replaces outdated image references with standardized GHCR and Docker.io URLs across multiple pipeline files. The implementation is straightforward and adheres to the stated motivation, but there are minor opportunities for improvement in documentation and testing validations. The changes appear low-risk and are well-contained.
Critical Issues
No critical issues identified.
Code Improvements
-
File:
.github/workflows/release-ci-runtime-images.yaml
Line: 59
Issue: The addition of Go profiles (go-1.19,go-1.20,go-1.25) modifies the matrix strategy but lacks validation logic for newly added profiles. This could lead to undetected failures during CI runtime.
Suggestion: Add a pre-build validation step to ensure that the new profiles (go-1.19,go-1.20) are correctly configured and functional. For example:- name: Validate Go profiles run: | test -n "$(echo ${MATRIX_GO_PROFILE} | grep -E 'go-1.19|go-1.20')"
-
File:
dockerfiles/ci/skaffold.yaml
Lines: 26–46
Issue: The new Go profiles for versions 1.19 and 1.20 are added as static configurations. However, updating these versions in the future will require manual edits, which is error-prone.
Suggestion: Utilize environment variables or centralized configuration files for Go version management. Update the profiles to dynamically reference the versions, e.g.:- name: go-1.19 patches: - op: replace path: /build/artifacts/0/docker/buildArgs/GOLANG_VERSION value: "${GOLANG_VERSION_1_19}"
Best Practices
-
File:
.github/workflows/release-ci-runtime-images.yaml
Line: 59
Issue: No comments are added for the newgo-profilestrategy values, making the intent unclear to future maintainers.
Suggestion: Add comments explaining why the specific Go versions are included in the matrix. For example:go-profile: [go-1.19, go-1.20, go-1.25] # Go 1.19/1.20 required for pre-8.5 branches, Go 1.25 for latest compatibility.
-
File:
pipelines/**(Multiple files)
Issue: The updates to image references (e.g., replacinghub.pingcap.netwithdocker.io) are extensive but lack context for why this change was made. This information is critical for future debugging.
Suggestion: Document the reasoning behind the image updates either in the PR description or as comments in the pipeline YAML files. For example:# Replaced outdated image registry URLs to standardize on GHCR/Docker.io for better performance and reliability -
Testing Coverage:
Issue: The PR mentions testing viadocker manifest inspect, but this is a post-merge validation. There is no indication that these changes were tested in a staging environment prior to merge.
Suggestion: Add a staging pipeline or local testing script to verify that the new images are built and pushed correctly before merging.
Summary of Actionable Items
- Add validation logic for new Go profiles in
.github/workflows/release-ci-runtime-images.yaml. - Refactor
skaffold.yamlto use centralized or dynamic Go version management. - Enhance comments for strategy matrix and image updates across relevant files.
- Include pre-merge testing for image build and push processes.
These changes will improve maintainability, reduce errors, and provide better clarity for future contributors.
|
Closing — go1.19/go1.20 will use go1.21 image per final design spec v3. No separate image builds needed. |
Summary
Add skaffold profiles and workflow matrix entries to build GHCR jenkins images for Go 1.19 and Go 1.20.
Changes
Motivation
Pre-8.5 tiflow release branches require Go 1.19/1.20 images. Currently only Go 1.25 is built by CI. This unblocks PR #4763 (internal registry cleanup).
Testing
After merge, verify images exist:
Risk
Low — adds new build profiles, does not modify existing ones.
Ref: FLA-233