Skip to content

Commit

Permalink
upgrade go to 1.23
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin2037 committed Sep 20, 2024
1 parent 45c831a commit 37d19fb
Show file tree
Hide file tree
Showing 25 changed files with 29 additions and 446 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check_and_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: '1.21'
go-version: '1.23'

- name: Cache Tools
id: cache-tools
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: '1.21'
go-version: '1.23'

- name: Build
run: make build
2 changes: 1 addition & 1 deletion .github/workflows/dataflow_engine_chaos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: '1.21'
go-version: '1.23'

- name: Cache go modules
uses: actions/cache@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dm_binlog_999999.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Go env
uses: actions/setup-go@v3
with:
go-version: '1.21'
go-version: '1.23'

- name: Check out code
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dm_chaos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Set up Go env
uses: actions/setup-go@v3
with:
go-version: '1.21'
go-version: '1.23'
- name: Print Go version
run: go version

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dm_mariadb_master_down_and_up.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Go env
uses: actions/setup-go@v3
with:
go-version: '1.21'
go-version: '1.23'

- name: Check out code
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dm_upstream_switch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Go env
uses: actions/setup-go@v3
with:
go-version: '1.21'
go-version: '1.23'

- name: Check out code
uses: actions/checkout@v2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/upgrade_dm_via_tiup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Set up Go env
uses: actions/setup-go@v3
with:
go-version: '1.21'
go-version: '1.23'

- name: Check out code
uses: actions/checkout@v2
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
- name: Set up Go env
uses: actions/setup-go@v3
with:
go-version: '1.21'
go-version: '1.23'

- name: Check out code
uses: actions/checkout@v2
Expand Down Expand Up @@ -193,7 +193,7 @@ jobs:
- name: Set up Go env
uses: actions/setup-go@v3
with:
go-version: '1.21'
go-version: '1.23'

- name: Check out code
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
run:
go: "1.21"
go: "1.23"
build-tags:
- intest
linters:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ your contribution accepted.

Developing TiDB-CDC requires:

* [Go 1.21+](https://go.dev/doc/code)
* [Go 1.23+](https://go.dev/doc/code)
* An internet connection to download the dependencies

Simply run `make` to build the program.
Expand Down
2 changes: 1 addition & 1 deletion README_DM.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To check the code style and build binaries, you can simply run:
make build
```

Note that DM supports building with the Go version `Go >= 1.21`. For unit test preparation, see [Running/Unit Test](dm/tests/README.md#Unit-Test).
Note that DM supports building with the Go version `Go >= 1.23`. For unit test preparation, see [Running/Unit Test](dm/tests/README.md#Unit-Test).

If you only want to build binaries, you can run:

Expand Down
2 changes: 1 addition & 1 deletion README_TiCDC.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $ make cdc
$ make test
```

Note that TiCDC supports building with the Go version `Go >= 1.21`.
Note that TiCDC supports building with the Go version `Go >= 1.23`.

When TiCDC is built successfully, you can find binary in the `bin` directory. Instructions for unit test and integration test can be found in [Running tests](./tests/integration_tests/README.md).

Expand Down
2 changes: 1 addition & 1 deletion deployments/engine/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21-alpine as builder
FROM golang:1.23-alpine as builder

#build
RUN apk add --no-cache \
Expand Down
2 changes: 1 addition & 1 deletion deployments/engine/docker/dind.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# In this file, we build an image with `docker-cli in docker` for engine integration tests.
# For `dockerd in docker`, please refer to https://hub.docker.com/_/docker/tags?page=1&name=dind.
FROM golang:1.21-alpine as builder
FROM golang:1.23-alpine as builder

# If you add a new command dependency to engine integration test, add here and
# rebuild this image as well
Expand Down
2 changes: 1 addition & 1 deletion deployments/ticdc/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21-alpine as builder
FROM golang:1.23-alpine as builder
RUN apk add --no-cache git make bash
WORKDIR /go/src/github.com/pingcap/tiflow
COPY . .
Expand Down
2 changes: 1 addition & 1 deletion deployments/ticdc/docker/dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21-alpine as builder
FROM golang:1.23-alpine as builder
RUN apk add --no-cache git make bash findutils
WORKDIR /go/src/github.com/pingcap/tiflow
COPY . .
Expand Down
2 changes: 1 addition & 1 deletion deployments/ticdc/docker/integration-test.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ RUN ./download-integration-test-binaries.sh $BRANCH $COMMUNITY $VERSION $OS $ARC
RUN ls ./bin

# Download go into /usr/local dir.
ENV GOLANG_VERSION 1.21.0
ENV GOLANG_VERSION 1.23.0
ENV GOLANG_DOWNLOAD_URL https://dl.google.com/go/go$GOLANG_VERSION.linux-amd64.tar.gz
RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
&& tar -C /usr/local -xzf golang.tar.gz \
Expand Down
2 changes: 1 addition & 1 deletion deployments/ticdc/docker/kafka-consumer.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21-alpine as builder
FROM golang:1.23-alpine as builder
RUN apk add --no-cache make bash git build-base
WORKDIR /go/src/github.com/pingcap/tiflow
COPY . .
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM openjdk:17 as jdk_container

FROM hub.pingcap.net/jenkins/centos7_golang-1.21:latest
FROM hub.pingcap.net/jenkins/centos7_golang-1.23:latest
RUN curl https://archive.apache.org/dist/pulsar/pulsar-3.2.0/apache-pulsar-3.2.0-bin.tar.gz -o pulsar.tar.gz && \
tar -xvf pulsar.tar.gz && \
mv apache-pulsar-3.2.0 pulsar && \
Expand Down
2 changes: 1 addition & 1 deletion deployments/ticdc/docker/storage-consumer.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21-alpine as builder
FROM golang:1.23-alpine as builder
RUN apk add --no-cache make bash git
WORKDIR /go/src/github.com/pingcap/tiflow
COPY . .
Expand Down
2 changes: 1 addition & 1 deletion dm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21-alpine as builder
FROM golang:1.23-alpine as builder
MAINTAINER siddontang

RUN apk add --no-cache git make
Expand Down
3 changes: 1 addition & 2 deletions examples/golang/avro-checksum-verification/go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module avro-checksum-sample

go 1.21

go 1.23
require (
github.com/linkedin/goavro/v2 v2.11.1
github.com/pingcap/log v1.1.1-0.20230317032135-a0d097d16e22
Expand Down
2 changes: 1 addition & 1 deletion examples/golang/canal-json-handle-key-only/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module canal-json-handle-key-only-example

go 1.21
go 1.23

require (
github.com/go-sql-driver/mysql v1.7.1
Expand Down
Loading

0 comments on commit 37d19fb

Please sign in to comment.