PingCAP-QE / ci

Continue intergration tests
Apache License 2.0
19 stars 97 forks source link

fix(deps): update golang image for mysql_connector_test #3021

Closed djshow832 closed 3 days ago

djshow832 commented 4 days ago

User description

After upgrading tidb deps to v1.1.0 in tiproxy, the test mysql_connector_test reports:

/go/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20240428083427-66ba419636ce/pkg/types/compare.go:18:2: package cmp is not in GOROOT (/usr/local/go/src/cmp)
note: imported by a module that requires go 1.21
/go/pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20240428083427-66ba419636ce/pkg/util/stmtsummary/v2/stmtsummary.go:20:2: package maps is not in GOROOT (/usr/local/go/src/maps)
note: imported by a module that requires go 1.21
/go/pkg/mod/github.com/tikv/client-go/v2@v2.0.8-0.20240424052342-0229f4077f0c/internal/locate/region_cache.go:44:2: package slices is not in GOROOT (/usr/local/go/src/slices)
note: imported by a module that requires go 1.21

Maybe I should upgrade the golang image.


PR Type

dependencies, configuration changes


Description


Changes walkthrough 📝

Relevant files
Dependencies
pod-pull_tiproxy_mysql_connector_test.yaml
Update Golang image version in tidb-test pipeline configuration

pipelines/PingCAP-QE/tidb-test/latest/pod-pull_tiproxy_mysql_connector_test.yaml
  • Updated the Golang image version from centos7_golang-1.21:latest to
    golang-with-gcc11:1.21.
  • +1/-1     
    pod-pull_mysql_connector_test.yaml
    Update Golang image version in tiproxy pipeline configuration

    pipelines/pingcap/tiproxy/latest/pod-pull_mysql_connector_test.yaml
  • Updated the Golang image version from golang-with-gcc11:1.20 to
    golang-with-gcc11:1.21.
  • +1/-1     

    💡 PR-Agent usage: Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    ti-chi-bot[bot] commented 4 days ago

    I have already done a preliminary review for you, and I hope to help you do a better job.

    Key Changes:

    Potential Problems:

    Fixing Suggestions:

    codiumai-pr-agent-pro[bot] commented 4 days ago

    PR Reviewer Guide 🔍

    (Review updated until commit https://github.com/PingCAP-QE/ci/commit/224d27e4eee199898db860550ba7285326660823)

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Key issues to review

    None
    codiumai-pr-agent-pro[bot] commented 4 days ago

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Best practice
    Pin the version of the Golang image to ensure consistent and stable builds ___ **Consider pinning the version of the Golang image instead of using the 'latest' tag. Using
    a specific version ensures that the builds are repeatable and stable over time, avoiding
    unexpected behaviors due to changes in the 'latest' image.** [pipelines/pingcap/tiproxy/latest/pod-pull_mysql_connector_test.yaml [8]](https://github.com/PingCAP-QE/ci/pull/3021/files#diff-44748dc433ffe13a4eeb252d77c5db7809cb6f8fe8c2f5e5faa7f9290b010ec9R8-R8) ```diff -image: "hub.pingcap.net/jenkins/centos7_golang-1.21:latest" +image: "hub.pingcap.net/jenkins/centos7_golang-1.21:1.21.0" ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 9 Why: Pinning the version of the Golang image is a best practice that ensures builds are repeatable and stable over time. This avoids unexpected behaviors due to changes in the 'latest' image.
    9
    codiumai-pr-agent-pro[bot] commented 3 days ago

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    Persistent review updated to latest commit https://github.com/PingCAP-QE/ci/commit/224d27e4eee199898db860550ba7285326660823

    codiumai-pr-agent-pro[bot] commented 3 days ago

    PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here.

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Best practice
    Use a more specific tag for Docker images to ensure reproducibility ___ **Consider using a more specific tag instead of "1.21" for the Docker image to ensure that
    the builds are reproducible and consistent. Using a specific tag or a digest ensures that
    the exact same image is used every time, which is crucial for debugging and reliability in
    production environments.** [pipelines/PingCAP-QE/tidb-test/latest/pod-pull_tiproxy_mysql_connector_test.yaml [8]](https://github.com/PingCAP-QE/ci/pull/3021/files#diff-9f1cd4ec65284e432c4696bc9279873bb22b540b1e0ebbbced07122dc0743669R8-R8) ```diff -image: "hub.pingcap.net/jenkins/golang-with-gcc11:1.21" +image: "hub.pingcap.net/jenkins/golang-with-gcc11:1.21.3" ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 9 Why: Using a more specific tag for Docker images is a best practice that ensures builds are reproducible and consistent, which is crucial for debugging and reliability in production environments.
    9
    Enhancement
    Update the Docker image tag to the latest minor version for consistency and feature completeness ___ **To avoid potential incompatibilities and ensure that all features and fixes are included,
    consider updating the image tag to match the latest minor version used in other similar
    configurations, if applicable.** [pipelines/pingcap/tiproxy/latest/pod-pull_mysql_connector_test.yaml [8]](https://github.com/PingCAP-QE/ci/pull/3021/files#diff-44748dc433ffe13a4eeb252d77c5db7809cb6f8fe8c2f5e5faa7f9290b010ec9R8-R8) ```diff -image: "hub.pingcap.net/jenkins/golang-with-gcc11:1.21" +image: "hub.pingcap.net/jenkins/golang-with-gcc11:1.21.3" ``` - [ ] **Apply this suggestion**
    Suggestion importance[1-10]: 8 Why: Updating the Docker image tag to the latest minor version helps avoid potential incompatibilities and ensures that all features and fixes are included, promoting consistency across similar configurations.
    8
    ti-chi-bot[bot] commented 3 days ago

    [APPROVALNOTIFIER] This PR is APPROVED

    This pull-request has been approved by: purelind

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

    The pull request process is described here

    Needs approval from an approver in each of these files: - ~~[pipelines/OWNERS](https://github.com/PingCAP-QE/ci/blob/main/pipelines/OWNERS)~~ [purelind] 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[bot] commented 3 days ago

    [LGTM Timeline notifier]

    Timeline: