Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump golang to v1.22 #5683

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ jobs:
# see https://github.community/t/github-sha-isnt-the-value-expected/17903/2
# so we checkout the repo with `fetch-depth: 2` and let `codecov/codecov-action` to retrieve the real commit hash.
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: go/src/github.com/${{ github.repository }}
fetch-depth: 2
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version-file: go/src/github.com/${{ github.repository }}/go.mod
go-version: 1.21.3
cache-dependency-path: "**/*.sum"
- name: Set vars
run: |
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_ENV
- name: Try to use build cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ env.GOCACHE }}
Expand Down
2 changes: 1 addition & 1 deletion ci/e2e_eks.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kind: Pod
spec:
containers:
- name: main
image: hub.pingcap.net/tidb-operator/kubekins-e2e:v6-go1.21.3
image: hub.pingcap.net/tidb-operator/kubekins-e2e:v7-go1.22.5
command:
- runner.sh
- sleep
Expand Down
2 changes: 1 addition & 1 deletion ci/e2e_gke.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kind: Pod
spec:
containers:
- name: main
image: hub.pingcap.net/tidb-operator/kubekins-e2e:v6-go1.21.3
image: hub.pingcap.net/tidb-operator/kubekins-e2e:v7-go1.22.5
command:
- runner.sh
- sleep
Expand Down
2 changes: 1 addition & 1 deletion ci/e2e_kind.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ metadata:
spec:
containers:
- name: main
image: hub.pingcap.net/tidb-operator/kubekins-e2e:v6-go1.21.3
image: hub.pingcap.net/tidb-operator/kubekins-e2e:v7-go1.22.5
command:
- runner.sh
- exec
Expand Down
6 changes: 5 additions & 1 deletion ci/pull_e2e_kind.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ metadata:
spec:
containers:
- name: main
image: hub.pingcap.net/tidb-operator/kubekins-e2e:v6-go1.21.3
image: hub.pingcap.net/tidb-operator/kubekins-e2e:v7-go1.22.5
command:
- runner.sh
- exec
Expand Down Expand Up @@ -351,6 +351,9 @@ try {
sh """#!/bin/bash
set -eu
echo "info: building"
unset GOSUMDB
echo "====== go env ======"
go env
echo "info: patch charts and golang code to enable coverage profile"
./hack/e2e-patch-codecov.sh
export CUSTOM_PORT_TIDB_SERVER=${CUSTOM_PORT_TIDB_SERVER}
Expand Down Expand Up @@ -379,6 +382,7 @@ try {
withCredentials([usernamePassword(credentialsId: 'TIDB_OPERATOR_HUB_AUTH', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) {
sh """#!/bin/bash
set -eu
unset GOSUMDB
echo "save GTI_COMMIT export script into file"
echo "export GIT_COMMIT=\$(git rev-parse HEAD)" > EXPORT_GIT_COMMIT
echo "info: logging into hub.pingcap.net"
Expand Down
2 changes: 1 addition & 1 deletion ci/pull_e2e_release.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ metadata:
spec:
containers:
- name: main
image: hub.pingcap.net/tidb-operator/kubekins-e2e:v6-go1.21.3
image: hub.pingcap.net/tidb-operator/kubekins-e2e:v7-go1.22.5
command:
- runner.sh
- exec
Expand Down
2 changes: 1 addition & 1 deletion ci/vm.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ kind: Pod
spec:
containers:
- name: main
image: hub.pingcap.net/tidb-operator/kubekins-e2e:v6-go1.21.3
image: hub.pingcap.net/tidb-operator/kubekins-e2e:v7-go1.22.5
command:
- runner.sh
- sleep
Expand Down
4 changes: 3 additions & 1 deletion cmd/http-service/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/pingcap/tidb-operator/http-service

go 1.21
go 1.22.0

toolchain go1.22.5

require (
github.com/gin-gonic/gin v1.10.0
Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Prerequisites

Please install [Go 1.21.x](https://go.dev/doc/install). If you want to run TiDB Operator locally, please also install the latest version of [Docker](https://www.docker.com/get-started/), [kind](https://kind.sigs.k8s.io/docs/user/quick-start/), [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) and [Helm](https://helm.sh/docs/intro/quickstart/).
Please install [Go 1.22.x](https://go.dev/doc/install). If you want to run TiDB Operator locally, please also install the latest version of [Docker](https://www.docker.com/get-started/), [kind](https://kind.sigs.k8s.io/docs/user/quick-start/), [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl) and [Helm](https://helm.sh/docs/intro/quickstart/).

## Workflow

Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

module github.com/pingcap/tidb-operator

go 1.21
go 1.22.0

toolchain go1.22.5

require (
cloud.google.com/go/storage v1.30.1
Expand Down
8 changes: 8 additions & 0 deletions go.work
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
go 1.22.5

use (
.
./pkg/apis
./pkg/client
./cmd/http-service
)
Loading
Loading