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

update go to 1.21 (#1709) #1759

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.18"
go-version: "1.21"
- name: Load go module cache
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
cache-dependency-path: "ui/pnpm-lock.yaml"
- uses: actions/setup-go@v3
with:
go-version: "1.18"
go-version: "1.21"
- name: Load go module cache
uses: actions/cache@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
cache-dependency-path: "ui/pnpm-lock.yaml"
- uses: actions/setup-go@v3
with:
go-version: "1.18"
go-version: "1.21"
- name: Load go module cache
uses: actions/cache@v3
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.18"
go-version: "1.21"
- name: Load go module cache
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.18"
go-version: "1.21"
- name: Load go module cache
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
# ${{ runner.os }}-cypress-
# - uses: actions/setup-go@v3
# with:
# go-version: "1.18"
# go-version: "1.21"
# - name: Load go module cache
# uses: actions/cache@v3
# with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upload-e2e-snapshots.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
cache-dependency-path: "ui/pnpm-lock.yaml"
- uses: actions/setup-go@v3
with:
go-version: "1.18"
go-version: "1.21"
- name: Load go module cache
uses: actions/cache@v3
with:
Expand Down
10 changes: 5 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
run:
skip-dirs:
- swaggerspec
- pkg/uiserver
- ui
timeout: 2m

issues:
Expand All @@ -25,12 +21,16 @@ issues:
- text: "G112:"
linters:
- gosec
exclude-dirs:
- swaggerspec
- pkg/uiserver
- ui

linters:
enable:
# Additionally enable some checkers
- asciicheck
- depguard
# - depguard
- dogsled
- durationcheck
- errorlint
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The followings are required for developing TiDB Dashboard:

- git - Version control
- make - Build tool (run common workflows)
- [Golang 1.19+](https://golang.org/) - To compile the server.
- [Golang 1.21+](https://golang.org/) - To compile the server.
- [Node.js 18](https://nodejs.org/) - To compile the front-end.
- [PNPM 8](https://pnpm.io/) - To manage front-end dependencies.
- [Java 8+](https://www.java.com/ES/download/) - To generate JavaScript API client by OpenAPI specification.
Expand Down
2 changes: 1 addition & 1 deletion cmd/tidb-dashboard/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (

"github.com/pingcap/log"
flag "github.com/spf13/pflag"
"go.etcd.io/etcd/pkg/transport"
"go.etcd.io/etcd/client/pkg/v3/transport"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/alpine316.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.18-alpine3.16 as builder
FROM golang:1.21-alpine3.16 as builder

RUN apk add --no-cache \
make \
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/centos7.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN yum -y groupinstall "Development Tools"
# Install golang.
ENV PATH /usr/local/go/bin:$PATH
RUN export ARCH=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && \
export GO_VERSION=1.19.5 && \
export GO_VERSION=1.21.12 && \
curl -OL https://golang.org/dl/go$GO_VERSION.linux-$ARCH.tar.gz && \
tar -C /usr/local/ -xzf go$GO_VERSION.linux-$ARCH.tar.gz && \
rm -f go$GO_VERSION.linux-$ARCH.tar.gz
Expand Down
48 changes: 26 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/pingcap/tidb-dashboard

go 1.18
go 1.21

require (
github.com/DATA-DOG/go-sqlmock v1.5.0
Expand All @@ -22,7 +22,7 @@ require (
github.com/golang-jwt/jwt v3.2.1+incompatible
github.com/golang/snappy v0.0.4
github.com/google/pprof v0.0.0-20211122183932-1daafda22083
github.com/google/uuid v1.0.0
github.com/google/uuid v1.3.1
github.com/gtank/cryptopasta v0.0.0-20170601214702-1f550f6f2f69
github.com/henrylee2cn/ameda v1.4.10
github.com/jarcoal/httpmock v1.0.8
Expand All @@ -41,23 +41,24 @@ require (
github.com/shhdgit/testfixtures/v3 v3.6.2-0.20211219171712-c4f264d673d3
github.com/shurcooL/httpgzip v0.0.0-20190720172056-320755c1c1b0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.3
github.com/stretchr/testify v1.8.4
github.com/swaggo/http-swagger v1.2.6
github.com/swaggo/swag v1.7.9
github.com/vmihailenco/msgpack/v5 v5.3.5
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738
go.etcd.io/etcd/client/pkg/v3 v3.5.15
go.etcd.io/etcd/client/v3 v3.5.15
go.uber.org/atomic v1.9.0
go.uber.org/fx v1.12.0
go.uber.org/goleak v1.1.10
go.uber.org/zap v1.19.0
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be
golang.org/x/sync v0.1.0
google.golang.org/grpc v1.25.1
google.golang.org/protobuf v1.30.0
golang.org/x/oauth2 v0.11.0
golang.org/x/sync v0.10.0
google.golang.org/grpc v1.59.0
google.golang.org/protobuf v1.33.0
gorm.io/datatypes v1.1.0
gorm.io/driver/mysql v1.4.5
gorm.io/driver/sqlite v1.4.3
gorm.io/gorm v1.24.3
gorm.io/driver/sqlite v1.5.7
gorm.io/gorm v1.25.12
moul.io/zapgorm2 v1.1.0
)

Expand All @@ -68,8 +69,8 @@ require (
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
github.com/bytedance/sonic v1.9.1 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fogleman/gg v1.3.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
Expand All @@ -82,9 +83,9 @@ require (
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.14.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/gogo/protobuf v1.3.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
github.com/golang/protobuf v1.5.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
Expand All @@ -93,7 +94,7 @@ require (
github.com/leodido/go-urn v1.2.4 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-sqlite3 v1.14.15 // indirect
github.com/mattn/go-sqlite3 v1.14.24 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
Expand All @@ -104,19 +105,22 @@ require (
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
go.etcd.io/etcd/api/v3 v3.5.15 // indirect
go.uber.org/dig v1.9.0 // indirect
go.uber.org/multierr v1.7.0 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/crypto v0.9.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 // indirect
golang.org/x/image v0.0.0-20200119044424-58c23975cae1 // indirect
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/tools v0.6.0 // indirect
google.golang.org/appengine v1.4.0 // indirect
google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading
Loading