Skip to content

ci(dockerfiles): add go1.19 and go1.20 jenkins image profiles#4765

Closed
wuhuizuo wants to merge 2 commits into
mainfrom
agent/coder/image-build-go119-120
Closed

ci(dockerfiles): add go1.19 and go1.20 jenkins image profiles#4765
wuhuizuo wants to merge 2 commits into
mainfrom
agent/coder/image-build-go119-120

Conversation

@wuhuizuo

Copy link
Copy Markdown
Contributor

Summary

Add skaffold profiles and workflow matrix entries to build GHCR jenkins images for Go 1.19 and Go 1.20.

Changes

  • Added profile (Go 1.19.13) to
  • Added profile (Go 1.20.14) to
  • Added and profiles for completeness (images already on GHCR)
  • Updated workflow matrix to build and variants

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:

docker manifest inspect ghcr.io/pingcap-qe/ci/jenkins:<tag>-go1.19
docker manifest inspect ghcr.io/pingcap-qe/ci/jenkins:<tag>-go1.20

Risk

Low — adds new build profiles, does not modify existing ones.

Ref: FLA-233

wuhuizuo added 2 commits June 29, 2026 18:41
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
@ti-chi-bot

ti-chi-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign wuhuizuo for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 new go-profile strategy 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., replacing hub.pingcap.net with docker.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 via docker 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

  1. Add validation logic for new Go profiles in .github/workflows/release-ci-runtime-images.yaml.
  2. Refactor skaffold.yaml to use centralized or dynamic Go version management.
  3. Enhance comments for strategy matrix and image updates across relevant files.
  4. Include pre-merge testing for image build and push processes.

These changes will improve maintainability, reduce errors, and provide better clarity for future contributors.

@ti-chi-bot ti-chi-bot Bot added the size/L label Jun 29, 2026
@wuhuizuo

Copy link
Copy Markdown
Contributor Author

Closing — go1.19/go1.20 will use go1.21 image per final design spec v3. No separate image builds needed.

@wuhuizuo wuhuizuo closed this Jun 29, 2026
@wuhuizuo wuhuizuo deleted the agent/coder/image-build-go119-120 branch June 29, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

1 participant