From 1353f411d9040365da6f8f1c653dae046cc02ded Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Thu, 11 Aug 2022 15:57:35 +0200 Subject: [PATCH] update to go 1.19 Signed-off-by: CrazyMax --- .github/workflows/build.yml | 3 ++- Dockerfile | 2 +- examples/buildkit0/buildkit.go | 2 +- examples/buildkit1/buildkit.go | 2 +- examples/buildkit2/buildkit.go | 2 +- examples/buildkit3/buildkit.go | 2 +- examples/buildkit4/buildkit.go | 2 +- examples/nested-llb/main.go | 2 +- frontend/dockerfile/cmd/dockerfile-frontend/Dockerfile | 2 +- frontend/gateway/pb/gateway.pb.go | 2 ++ hack/dockerfiles/generated-files.Dockerfile | 2 +- hack/dockerfiles/lint.Dockerfile | 2 +- hack/dockerfiles/vendor.Dockerfile | 2 +- solver/errdefs/errdefs.pb.go | 1 + solver/pb/ops.pb.go | 3 +++ util/archutil/Dockerfile | 2 +- 16 files changed, 20 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bca0fe9605a3..12335828afa7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,6 +29,7 @@ env: CACHE_GHA_SCOPE_CROSS: "cross" TESTFLAGS: "-v --parallel=6 --timeout=30m" BUILDX_VERSION: "v0.8.2" # leave empty to use the one available on GitHub virtual environment + GO_VERSION: "1.19" jobs: base: @@ -170,7 +171,7 @@ jobs: name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.18 + go-version: ${{ env.GO_VERSION }} - name: Cache Go modules uses: actions/cache@v2 diff --git a/Dockerfile b/Dockerfile index 186cc135440f..293070af477c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ RUN apk add --no-cache git # xx is a helper for cross-compilation FROM --platform=$BUILDPLATFORM tonistiigi/xx@sha256:1e96844fadaa2f9aea021b2b05299bc02fe4c39a92d8e735b93e8e2b15610128 AS xx -FROM --platform=$BUILDPLATFORM golang:1.18-alpine AS golatest +FROM --platform=$BUILDPLATFORM golang:1.19-alpine AS golatest # gobuild is base stage for compiling go/cgo FROM golatest AS gobuild-base diff --git a/examples/buildkit0/buildkit.go b/examples/buildkit0/buildkit.go index 1a524347427d..24810e730ff5 100644 --- a/examples/buildkit0/buildkit.go +++ b/examples/buildkit0/buildkit.go @@ -33,7 +33,7 @@ func main() { } func goBuildBase() llb.State { - goAlpine := llb.Image("docker.io/library/golang:1.18-alpine") + goAlpine := llb.Image("docker.io/library/golang:1.19-alpine") return goAlpine. AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnvUnix). AddEnv("GOPATH", "/go"). diff --git a/examples/buildkit1/buildkit.go b/examples/buildkit1/buildkit.go index 9bbee5f84c21..9f8201b2bddf 100644 --- a/examples/buildkit1/buildkit.go +++ b/examples/buildkit1/buildkit.go @@ -33,7 +33,7 @@ func main() { } func goBuildBase() llb.State { - goAlpine := llb.Image("docker.io/library/golang:1.18-alpine") + goAlpine := llb.Image("docker.io/library/golang:1.19-alpine") return goAlpine. AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnvUnix). AddEnv("GOPATH", "/go"). diff --git a/examples/buildkit2/buildkit.go b/examples/buildkit2/buildkit.go index fed66079783f..5ae6b201678b 100644 --- a/examples/buildkit2/buildkit.go +++ b/examples/buildkit2/buildkit.go @@ -33,7 +33,7 @@ func main() { } func goBuildBase() llb.State { - goAlpine := llb.Image("docker.io/library/golang:1.18-alpine") + goAlpine := llb.Image("docker.io/library/golang:1.19-alpine") return goAlpine. AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnvUnix). AddEnv("GOPATH", "/go"). diff --git a/examples/buildkit3/buildkit.go b/examples/buildkit3/buildkit.go index ac1c18ecdc07..58de1ebe0666 100644 --- a/examples/buildkit3/buildkit.go +++ b/examples/buildkit3/buildkit.go @@ -34,7 +34,7 @@ func main() { } func goBuildBase() llb.State { - goAlpine := llb.Image("docker.io/library/golang:1.18-alpine") + goAlpine := llb.Image("docker.io/library/golang:1.19-alpine") return goAlpine. AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnvUnix). AddEnv("GOPATH", "/go"). diff --git a/examples/buildkit4/buildkit.go b/examples/buildkit4/buildkit.go index 399a7ac5a07e..0bae9e7899e8 100644 --- a/examples/buildkit4/buildkit.go +++ b/examples/buildkit4/buildkit.go @@ -37,7 +37,7 @@ func main() { } func goBuildBase() llb.State { - goAlpine := llb.Image("docker.io/library/golang:1.18-alpine") + goAlpine := llb.Image("docker.io/library/golang:1.19-alpine") return goAlpine. AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnvUnix). AddEnv("GOPATH", "/go"). diff --git a/examples/nested-llb/main.go b/examples/nested-llb/main.go index 180282e6eb19..93f9d41c2dcc 100644 --- a/examples/nested-llb/main.go +++ b/examples/nested-llb/main.go @@ -32,7 +32,7 @@ func main() { } func goBuildBase() llb.State { - goAlpine := llb.Image("docker.io/library/golang:1.18-alpine") + goAlpine := llb.Image("docker.io/library/golang:1.19-alpine") return goAlpine. AddEnv("PATH", "/usr/local/go/bin:"+system.DefaultPathEnvUnix). AddEnv("GOPATH", "/go"). diff --git a/frontend/dockerfile/cmd/dockerfile-frontend/Dockerfile b/frontend/dockerfile/cmd/dockerfile-frontend/Dockerfile index 6c4428a06533..e71903902426 100644 --- a/frontend/dockerfile/cmd/dockerfile-frontend/Dockerfile +++ b/frontend/dockerfile/cmd/dockerfile-frontend/Dockerfile @@ -3,7 +3,7 @@ # xx is a helper for cross-compilation FROM --platform=$BUILDPLATFORM tonistiigi/xx:golang@sha256:810dc54d5144f133a218e88e319184bf8b9ce01d37d46ddb37573e90decd9eef AS xx -FROM --platform=$BUILDPLATFORM golang:1.18-alpine AS base +FROM --platform=$BUILDPLATFORM golang:1.19-alpine AS base RUN apk add git bash COPY --from=xx / / WORKDIR /src diff --git a/frontend/gateway/pb/gateway.pb.go b/frontend/gateway/pb/gateway.pb.go index 743ad2ec526d..40a62d86f21d 100644 --- a/frontend/gateway/pb/gateway.pb.go +++ b/frontend/gateway/pb/gateway.pb.go @@ -35,6 +35,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type Result struct { // Types that are valid to be assigned to Result: + // // *Result_RefDeprecated // *Result_RefsDeprecated // *Result_Ref @@ -1678,6 +1679,7 @@ var xxx_messageInfo_ReleaseContainerResponse proto.InternalMessageInfo type ExecMessage struct { ProcessID string `protobuf:"bytes,1,opt,name=ProcessID,proto3" json:"ProcessID,omitempty"` // Types that are valid to be assigned to Input: + // // *ExecMessage_Init // *ExecMessage_File // *ExecMessage_Resize diff --git a/hack/dockerfiles/generated-files.Dockerfile b/hack/dockerfiles/generated-files.Dockerfile index 0bc0897e7ebc..4a98712c67a1 100644 --- a/hack/dockerfiles/generated-files.Dockerfile +++ b/hack/dockerfiles/generated-files.Dockerfile @@ -1,7 +1,7 @@ # syntax=docker/dockerfile-upstream:master # protoc is dynamically linked to glibc to can't use golang:1.10-alpine -FROM golang:1.18-buster AS gobuild-base +FROM golang:1.19-buster AS gobuild-base RUN apt-get update && apt-get --no-install-recommends install -y \ unzip \ diff --git a/hack/dockerfiles/lint.Dockerfile b/hack/dockerfiles/lint.Dockerfile index 5b7e0c158364..58803bd8b790 100644 --- a/hack/dockerfiles/lint.Dockerfile +++ b/hack/dockerfiles/lint.Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile-upstream:master -FROM golang:1.18-alpine +FROM golang:1.19-alpine ENV GOFLAGS="-buildvcs=false" RUN apk add --no-cache gcc musl-dev yamllint RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.47.3 diff --git a/hack/dockerfiles/vendor.Dockerfile b/hack/dockerfiles/vendor.Dockerfile index 4387099d6895..4108aaaecf1b 100644 --- a/hack/dockerfiles/vendor.Dockerfile +++ b/hack/dockerfiles/vendor.Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile-upstream:master -FROM golang:1.18-alpine AS vendored +FROM golang:1.19-alpine AS vendored RUN apk add --no-cache git WORKDIR /src RUN --mount=target=/src,rw \ diff --git a/solver/errdefs/errdefs.pb.go b/solver/errdefs/errdefs.pb.go index 5da34b6e591b..e02cfb9696d8 100644 --- a/solver/errdefs/errdefs.pb.go +++ b/solver/errdefs/errdefs.pb.go @@ -186,6 +186,7 @@ type Solve struct { MountIDs []string `protobuf:"bytes,2,rep,name=mountIDs,proto3" json:"mountIDs,omitempty"` Op *pb.Op `protobuf:"bytes,3,opt,name=op,proto3" json:"op,omitempty"` // Types that are valid to be assigned to Subject: + // // *Solve_File // *Solve_Cache Subject isSolve_Subject `protobuf_oneof:"subject"` diff --git a/solver/pb/ops.pb.go b/solver/pb/ops.pb.go index 0cf15b077038..78e4121b47ee 100644 --- a/solver/pb/ops.pb.go +++ b/solver/pb/ops.pb.go @@ -154,6 +154,7 @@ type Op struct { // inputs is a set of input edges. Inputs []*Input `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs,omitempty"` // Types that are valid to be assigned to Op: + // // *Op_Exec // *Op_Source // *Op_File @@ -1948,6 +1949,7 @@ type FileAction struct { SecondaryInput InputIndex `protobuf:"varint,2,opt,name=secondaryInput,proto3,customtype=InputIndex" json:"secondaryInput"` Output OutputIndex `protobuf:"varint,3,opt,name=output,proto3,customtype=OutputIndex" json:"output"` // Types that are valid to be assigned to Action: + // // *FileAction_Copy // *FileAction_Mkfile // *FileAction_Mkdir @@ -2465,6 +2467,7 @@ func (m *ChownOpt) GetGroup() *UserOpt { type UserOpt struct { // Types that are valid to be assigned to User: + // // *UserOpt_ByName // *UserOpt_ByID User isUserOpt_User `protobuf_oneof:"user"` diff --git a/util/archutil/Dockerfile b/util/archutil/Dockerfile index 985d980bf165..9f831b7bfd44 100644 --- a/util/archutil/Dockerfile +++ b/util/archutil/Dockerfile @@ -48,7 +48,7 @@ FROM base AS exit-mips64 COPY fixtures/exit.mips64.s . RUN mips64-linux-gnuabi64-as --noexecstack -o exit.o exit.mips64.s && mips64-linux-gnuabi64-ld -o exit -s exit.o -FROM golang:1.18-alpine AS generate +FROM golang:1.19-alpine AS generate WORKDIR /src COPY --from=exit-amd64 /src/exit amd64 COPY --from=exit-386 /src/exit 386