Skip to content

Commit dadfb38

Browse files
authored
Merge pull request #56 from DharmitD/go-version-cve
UPSTREAM: <carry>: Upgrade go version to 1.21 and go.mod package versions
2 parents ea68150 + f46e510 commit dadfb38

16 files changed

+181
-667
lines changed

.github/workflows/unit-tests.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Setup Go
2222
uses: actions/setup-go@v4
2323
with:
24-
go-version: '1.20.x'
24+
go-version: '1.21.x'
2525
- name: Run Unit Test
2626
working-directory: ${{ github.workspace }}/backend/src
2727
env:

backend/Dockerfile

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
# Build arguments
1616
ARG SOURCE_CODE=.
1717

18-
#@follow_tag(registry.access.redhat.com/ubi8/go-toolset:1.20)
19-
FROM registry.access.redhat.com/ubi8/go-toolset:1.20 as builder
18+
FROM registry.access.redhat.com/ubi8/go-toolset:1.21 as builder
2019

2120
## Build args to be used at this step
2221
ARG SOURCE_CODE
@@ -34,7 +33,6 @@ COPY ${SOURCE_CODE}/ ./
3433
RUN GO111MODULE=on go build -o /bin/apiserver ./backend/src/apiserver/ && \
3534
dnf clean all
3635

37-
#@follow_tag(registry.access.redhat.com/ubi8/ubi-minimal:latest)
3836
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
3937

4038
WORKDIR /bin

backend/Dockerfile.cacheserver

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
# Dockerfile for building the source code of cache_server
16-
FROM golang:1.20.4-alpine3.17 as builder
16+
FROM golang:1.21.4-alpine3.17 as builder
1717

1818
RUN apk update && apk upgrade && \
1919
apk add --no-cache bash git openssh gcc musl-dev

backend/Dockerfile.conformance

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
# Dockerfile for building the source code of conformance tests
16-
FROM golang:1.20.4-alpine3.17 as builder
16+
FROM golang:1.21.4-alpine3.17 as builder
1717

1818
RUN apk update && apk upgrade && \
1919
apk add --no-cache bash git openssh gcc musl-dev

backend/Dockerfile.driver

+1-3
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
ARG SOURCE_CODE=.
1717

1818
# Use ubi8/nodejs-14 as base image
19-
#@follow_tag(registry.access.redhat.com/ubi8/go-toolset:1.20)
20-
FROM registry.access.redhat.com/ubi8/go-toolset:1.20 as builder
19+
FROM registry.access.redhat.com/ubi8/go-toolset:1.21 as builder
2120

2221

2322
## Build args to be used at this step
@@ -34,7 +33,6 @@ COPY ${SOURCE_CODE}/ ./
3433

3534
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags netgo -ldflags '-extldflags "-static"' -o /bin/driver ./backend/src/v2/cmd/driver/*.go
3635

37-
#@follow_tag(registry.access.redhat.com/ubi8/ubi-minimal:latest)
3836
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
3937

4038
WORKDIR /bin

backend/Dockerfile.launcher

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ ARG CI_CONTAINER_VERSION="unknown"
1818

1919

2020
# Use ubi8/nodejs-14 as base image
21-
#@follow_tag(registry.access.redhat.com/ubi8/go-toolset:1.20)
22-
FROM registry.access.redhat.com/ubi8/go-toolset:1.20 as builder
21+
FROM registry.access.redhat.com/ubi8/go-toolset:1.21 as builder
2322

2423

2524
## Build args to be used at this step
@@ -36,7 +35,6 @@ COPY ${SOURCE_CODE}/ ./
3635

3736
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags netgo -ldflags '-extldflags "-static"' -o /bin/launcher-v2 ./backend/src/v2/cmd/launcher-v2/*.go
3837

39-
#@follow_tag(registry.access.redhat.com/ubi8/ubi-minimal:latest)
4038
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
4139

4240
WORKDIR /bin

backend/Dockerfile.persistenceagent

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ ARG CI_CONTAINER_VERSION="unknown"
1818

1919

2020
# Use ubi8/go-toolset as base image
21-
#@follow_tag(registry.access.redhat.com/ubi8/go-toolset:1.20)
22-
FROM registry.access.redhat.com/ubi8/go-toolset:1.20 as builder
21+
FROM registry.access.redhat.com/ubi8/go-toolset:1.21 as builder
2322

2423
## Build args to be used at this step
2524
ARG SOURCE_CODE
@@ -36,7 +35,6 @@ COPY ${SOURCE_CODE}/ ./
3635

3736
RUN GO111MODULE=on go build -o /bin/persistence_agent backend/src/agent/persistence/*.go
3837

39-
#@follow_tag(registry.access.redhat.com/ubi8/ubi-minimal:latest)
4038
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
4139
WORKDIR /bin
4240

backend/Dockerfile.scheduledworkflow

+1-3
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
ARG SOURCE_CODE=.
1717

1818
# Use ubi8/nodejs-14 as base image
19-
#@follow_tag(registry.access.redhat.com/ubi8/go-toolset:1.20)
20-
FROM registry.access.redhat.com/ubi8/go-toolset:1.20 as builder
19+
FROM registry.access.redhat.com/ubi8/go-toolset:1.21 as builder
2120

2221
## Build args to be used at this step
2322
ARG SOURCE_CODE
@@ -41,7 +40,6 @@ COPY ${SOURCE_CODE}/ ./
4140

4241
RUN GO111MODULE=on go build -o /bin/controller backend/src/crd/controller/scheduledworkflow/*.go
4342

44-
#@follow_tag(registry.access.redhat.com/ubi8/ubi-minimal:latest)
4543
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
4644
WORKDIR /bin
4745

backend/Dockerfile.viewercontroller

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM golang:1.20.4-alpine3.17 as builder
15+
FROM golang:1.21.4-alpine3.17 as builder
1616

1717
RUN apk update && apk upgrade
1818
RUN apk add --no-cache git gcc musl-dev

backend/src/v2/test/components/build_go.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ metadata:
2828
author: Yuan Gong <[email protected]>
2929
implementation:
3030
container:
31-
image: golang:1.20-alpine
31+
image: golang:1.21-alpine
3232
command:
3333
- sh
3434
- -exc

backend/src/v2/test/presubmit-v2-go-test.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ PROJECT="${PROJECT:-kfp-ci}"
2323
# The current directory is /home/prow/go/src/github.com/kubeflow/pipelines
2424
# 1. install go in /home/prow/go1.15.10
2525
cd /home/prow
26-
mkdir go1.20.4
27-
cd go1.20.4
26+
mkdir go1.21.4
27+
cd go1.21.4
2828
curl -LO https://dl.google.com/go/go1.20.4.linux-amd64.tar.gz
29-
tar -xf go1.20.4.linux-amd64.tar.gz
29+
tar -xf go1.21.4.linux-amd64.tar.gz
3030
export PATH="/home/prow/go1.20.4/go/bin:${PATH}"
3131
cd /home/prow/go/src/github.com/kubeflow/pipelines/backend/src/v2
3232
# 2. Check go modules are tidy

backend/third_party_licenses/apiserver.csv

-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ github.com/klauspost/cpuid,https://github.com/klauspost/cpuid/blob/v1.3.1/LICENS
6262
github.com/klauspost/pgzip,https://github.com/klauspost/pgzip/blob/v1.2.5/LICENSE,MIT
6363
github.com/kubeflow/pipelines/api/v2alpha1/go,https://github.com/kubeflow/pipelines/blob/758c91f76784/api/LICENSE,Apache-2.0
6464
github.com/kubeflow/pipelines/backend,https://github.com/kubeflow/pipelines/blob/HEAD/LICENSE,Apache-2.0
65-
github.com/kubeflow/pipelines/kubernetes_platform/go/kubernetesplatform,https://github.com/kubeflow/pipelines/blob/8b2a099e8c9f/kubernetes_platform/LICENSE,Apache-2.0
6665
github.com/kubeflow/pipelines/third_party/ml-metadata/go/ml_metadata,https://github.com/kubeflow/pipelines/blob/e1f0c010f800/third_party/ml-metadata/LICENSE,Apache-2.0
6766
github.com/lann/builder,https://github.com/lann/builder/blob/47ae307949d0/LICENSE,MIT
6867
github.com/lann/ps,https://github.com/lann/ps/blob/62de8c46ede0/LICENSE,MIT

backend/third_party_licenses/cache_server.csv

+21-22
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ github.com/argoproj/pkg,https://github.com/argoproj/pkg/blob/v0.11.0/LICENSE,Apa
99
github.com/asaskevich/govalidator,https://github.com/asaskevich/govalidator/blob/f21760c49a8d/LICENSE,MIT
1010
github.com/beorn7/perks/quantile,https://github.com/beorn7/perks/blob/v1.0.1/LICENSE,MIT
1111
github.com/cenkalti/backoff,https://github.com/cenkalti/backoff/blob/v2.2.1/LICENSE,MIT
12-
github.com/cespare/xxhash/v2,https://github.com/cespare/xxhash/blob/v2.1.2/LICENSE.txt,MIT
12+
github.com/cespare/xxhash/v2,https://github.com/cespare/xxhash/blob/v2.2.0/LICENSE.txt,MIT
1313
github.com/colinmarc/hdfs,https://github.com/colinmarc/hdfs/blob/9746310a4d31/LICENSE.txt,MIT
1414
github.com/davecgh/go-spew/spew,https://github.com/davecgh/go-spew/blob/v1.1.1/LICENSE,ISC
1515
github.com/doublerebel/bellows,https://github.com/doublerebel/bellows/blob/f177d92a03d3/LICENSE,MIT
1616
github.com/emicklei/go-restful/v3,https://github.com/emicklei/go-restful/blob/v3.8.0/LICENSE,MIT
17-
github.com/go-logr/logr,https://github.com/go-logr/logr/blob/v1.2.2/LICENSE,Apache-2.0
17+
github.com/go-logr/logr,https://github.com/go-logr/logr/blob/v1.2.4/LICENSE,Apache-2.0
1818
github.com/go-openapi/errors,https://github.com/go-openapi/errors/blob/v0.20.2/LICENSE,Apache-2.0
1919
github.com/go-openapi/jsonpointer,https://github.com/go-openapi/jsonpointer/blob/v0.19.5/LICENSE,Apache-2.0
2020
github.com/go-openapi/jsonreference,https://github.com/go-openapi/jsonreference/blob/v0.19.6/LICENSE,Apache-2.0
@@ -24,10 +24,10 @@ github.com/go-openapi/swag,https://github.com/go-openapi/swag/blob/v0.19.15/LICE
2424
github.com/go-sql-driver/mysql,https://github.com/go-sql-driver/mysql/blob/v1.6.0/LICENSE,MPL-2.0
2525
github.com/go-stack/stack,https://github.com/go-stack/stack/blob/v1.8.1/LICENSE.md,MIT
2626
github.com/gogo/protobuf,https://github.com/gogo/protobuf/blob/v1.3.2/LICENSE,BSD-3-Clause
27-
github.com/golang/glog,https://github.com/golang/glog/blob/v1.0.0/LICENSE,Apache-2.0
28-
github.com/golang/protobuf,https://github.com/golang/protobuf/blob/v1.5.2/LICENSE,BSD-3-Clause
27+
github.com/golang/glog,https://github.com/golang/glog/blob/v1.1.0/LICENSE,Apache-2.0
28+
github.com/golang/protobuf,https://github.com/golang/protobuf/blob/v1.5.3/LICENSE,BSD-3-Clause
2929
github.com/google/gnostic,https://github.com/google/gnostic/blob/v0.5.7-v3refs/LICENSE,Apache-2.0
30-
github.com/google/go-cmp/cmp,https://github.com/google/go-cmp/blob/v0.5.7/LICENSE,BSD-3-Clause
30+
github.com/google/go-cmp/cmp,https://github.com/google/go-cmp/blob/v0.6.0/LICENSE,BSD-3-Clause
3131
github.com/google/gofuzz,https://github.com/google/gofuzz/blob/v1.2.0/LICENSE,Apache-2.0
3232
github.com/google/uuid,https://github.com/google/uuid/blob/v1.3.0/LICENSE,BSD-3-Clause
3333
github.com/gorilla/websocket,https://github.com/gorilla/websocket/blob/v1.5.0/LICENSE,BSD-2-Clause
@@ -40,12 +40,12 @@ github.com/jinzhu/gorm,https://github.com/jinzhu/gorm/blob/v1.9.1/License,MIT
4040
github.com/jinzhu/inflection,https://github.com/jinzhu/inflection/blob/v1.0.0/LICENSE,MIT
4141
github.com/josharian/intern,https://github.com/josharian/intern/blob/v1.0.0/license.md,MIT
4242
github.com/json-iterator/go,https://github.com/json-iterator/go/blob/v1.1.12/LICENSE,MIT
43-
github.com/klauspost/compress/flate,https://github.com/klauspost/compress/blob/v1.14.2/LICENSE,Apache-2.0
43+
github.com/klauspost/compress/flate,https://github.com/klauspost/compress/blob/v1.15.9/LICENSE,Apache-2.0
4444
github.com/klauspost/pgzip,https://github.com/klauspost/pgzip/blob/v1.2.5/LICENSE,MIT
4545
github.com/kubeflow/pipelines/backend,https://github.com/kubeflow/pipelines/blob/HEAD/LICENSE,Apache-2.0
4646
github.com/lestrrat-go/strftime,https://github.com/lestrrat-go/strftime/blob/v1.0.4/LICENSE,MIT
4747
github.com/mailru/easyjson,https://github.com/mailru/easyjson/blob/v0.7.7/LICENSE,MIT
48-
github.com/mattn/go-sqlite3,https://github.com/mattn/go-sqlite3/blob/v1.14.16/LICENSE,MIT
48+
github.com/mattn/go-sqlite3,https://github.com/mattn/go-sqlite3/blob/v1.14.18/LICENSE,MIT
4949
github.com/matttproud/golang_protobuf_extensions/pbutil,https://github.com/matttproud/golang_protobuf_extensions/blob/c182affec369/LICENSE,Apache-2.0
5050
github.com/mitchellh/copystructure,https://github.com/mitchellh/copystructure/blob/v1.2.0/LICENSE,MIT
5151
github.com/mitchellh/mapstructure,https://github.com/mitchellh/mapstructure/blob/v1.4.3/LICENSE,MIT
@@ -65,21 +65,21 @@ github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg,https://github.
6565
github.com/prometheus/procfs,https://github.com/prometheus/procfs/blob/v0.7.3/LICENSE,Apache-2.0
6666
github.com/robfig/cron/v3,https://github.com/robfig/cron/blob/v3.0.1/LICENSE,MIT
6767
github.com/shopspring/decimal,https://github.com/shopspring/decimal/blob/v1.2.0/LICENSE,MIT
68-
github.com/sirupsen/logrus,https://github.com/sirupsen/logrus/blob/v1.8.1/LICENSE,MIT
68+
github.com/sirupsen/logrus,https://github.com/sirupsen/logrus/blob/v1.9.0/LICENSE,MIT
6969
github.com/spf13/cast,https://github.com/spf13/cast/blob/v1.4.1/LICENSE,MIT
7070
github.com/spf13/pflag,https://github.com/spf13/pflag/blob/v1.0.5/LICENSE,BSD-3-Clause
7171
github.com/valyala/bytebufferpool,https://github.com/valyala/bytebufferpool/blob/v1.0.0/LICENSE,MIT
7272
github.com/valyala/fasttemplate,https://github.com/valyala/fasttemplate/blob/v1.2.1/LICENSE,MIT
7373
go.mongodb.org/mongo-driver,https://github.com/mongodb/mongo-go-driver/blob/v1.8.2/LICENSE,Apache-2.0
74-
golang.org/x/crypto,https://cs.opensource.google/go/x/crypto/+/v0.9.0:LICENSE,BSD-3-Clause
75-
golang.org/x/net,https://cs.opensource.google/go/x/net/+/v0.10.0:LICENSE,BSD-3-Clause
76-
golang.org/x/oauth2,https://cs.opensource.google/go/x/oauth2/+/d3ed0bb2:LICENSE,BSD-3-Clause
77-
golang.org/x/sys/unix,https://cs.opensource.google/go/x/sys/+/v0.8.0:LICENSE,BSD-3-Clause
78-
golang.org/x/term,https://cs.opensource.google/go/x/term/+/v0.8.0:LICENSE,BSD-3-Clause
79-
golang.org/x/text,https://cs.opensource.google/go/x/text/+/v0.9.0:LICENSE,BSD-3-Clause
80-
golang.org/x/time/rate,https://cs.opensource.google/go/x/time/+/90d013bb:LICENSE,BSD-3-Clause
81-
google.golang.org/genproto,https://github.com/googleapis/go-genproto/blob/1973136f34c6/LICENSE,Apache-2.0
82-
google.golang.org/grpc,https://github.com/grpc/grpc-go/blob/v1.44.0/LICENSE,Apache-2.0
74+
golang.org/x/crypto,https://cs.opensource.google/go/x/crypto/+/v0.16.0:LICENSE,BSD-3-Clause
75+
golang.org/x/net,https://cs.opensource.google/go/x/net/+/v0.19.0:LICENSE,BSD-3-Clause
76+
golang.org/x/oauth2,https://cs.opensource.google/go/x/oauth2/+/v0.7.0:LICENSE,BSD-3-Clause
77+
golang.org/x/sys/unix,https://cs.opensource.google/go/x/sys/+/v0.15.0:LICENSE,BSD-3-Clause
78+
golang.org/x/term,https://cs.opensource.google/go/x/term/+/v0.15.0:LICENSE,BSD-3-Clause
79+
golang.org/x/text,https://cs.opensource.google/go/x/text/+/v0.14.0:LICENSE,BSD-3-Clause
80+
golang.org/x/time/rate,https://cs.opensource.google/go/x/time/+/v0.3.0:LICENSE,BSD-3-Clause
81+
google.golang.org/genproto,https://github.com/googleapis/go-genproto/blob/daa745c078e1/LICENSE,Apache-2.0
82+
google.golang.org/grpc,https://github.com/grpc/grpc-go/blob/v1.56.3/LICENSE,Apache-2.0
8383
google.golang.org/protobuf,https://github.com/protocolbuffers/protobuf-go/blob/v1.30.0/LICENSE,BSD-3-Clause
8484
gopkg.in/inf.v0,https://github.com/go-inf/inf/blob/v0.9.1/LICENSE,BSD-3-Clause
8585
gopkg.in/jcmturner/aescts.v1,https://github.com/jcmturner/aescts/blob/v1.0.1/LICENSE,Apache-2.0
@@ -88,16 +88,15 @@ gopkg.in/jcmturner/gokrb5.v5,https://github.com/jcmturner/gokrb5/blob/v5.3.0/LIC
8888
gopkg.in/jcmturner/rpc.v0/ndr,https://github.com/jcmturner/rpc/blob/v0.0.2/LICENSE,Apache-2.0
8989
gopkg.in/yaml.v2,https://github.com/go-yaml/yaml/blob/v2.4.0/LICENSE,Apache-2.0
9090
gopkg.in/yaml.v3,https://github.com/go-yaml/yaml/blob/v3.0.1/LICENSE,MIT
91-
k8s.io/api,https://github.com/kubernetes/api/blob/v0.24.3/LICENSE,Apache-2.0
92-
k8s.io/apimachinery/pkg,https://github.com/kubernetes/apimachinery/blob/v0.24.3/LICENSE,Apache-2.0
93-
k8s.io/apimachinery/third_party/forked/golang,https://github.com/kubernetes/apimachinery/blob/v0.24.3/third_party/forked/golang/LICENSE,BSD-3-Clause
91+
k8s.io/api,https://github.com/kubernetes/api/blob/v0.24.17/LICENSE,Apache-2.0
92+
k8s.io/apimachinery/pkg,https://github.com/kubernetes/apimachinery/blob/v0.24.17/LICENSE,Apache-2.0
93+
k8s.io/apimachinery/third_party/forked/golang,https://github.com/kubernetes/apimachinery/blob/v0.24.17/third_party/forked/golang/LICENSE,BSD-3-Clause
9494
k8s.io/client-go,https://github.com/kubernetes/client-go/blob/v0.24.3/LICENSE,Apache-2.0
9595
k8s.io/klog/v2,https://github.com/kubernetes/klog/blob/v2.60.1/LICENSE,Apache-2.0
9696
k8s.io/kube-openapi/pkg,https://github.com/kubernetes/kube-openapi/blob/011e075b9cb8/LICENSE,Apache-2.0
9797
k8s.io/kube-openapi/pkg/validation/spec,https://github.com/kubernetes/kube-openapi/blob/011e075b9cb8/pkg/validation/spec/LICENSE,Apache-2.0
98-
k8s.io/kubernetes/pkg/apis/core,https://github.com/kubernetes/kubernetes/blob/v1.11.1/LICENSE,Apache-2.0
9998
k8s.io/utils,https://github.com/kubernetes/utils/blob/3a6ce19ff2f9/LICENSE,Apache-2.0
10099
k8s.io/utils/internal/third_party/forked/golang/net,https://github.com/kubernetes/utils/blob/3a6ce19ff2f9/internal/third_party/forked/golang/LICENSE,BSD-3-Clause
101100
sigs.k8s.io/json,https://github.com/kubernetes-sigs/json/blob/9f7c6b3444d2/LICENSE,Apache-2.0
102-
sigs.k8s.io/structured-merge-diff/v4,https://github.com/kubernetes-sigs/structured-merge-diff/blob/v4.2.1/LICENSE,Apache-2.0
101+
sigs.k8s.io/structured-merge-diff/v4,https://github.com/kubernetes-sigs/structured-merge-diff/blob/v4.2.3/LICENSE,Apache-2.0
103102
sigs.k8s.io/yaml,https://github.com/kubernetes-sigs/yaml/blob/v1.3.0/LICENSE,MIT

0 commit comments

Comments
 (0)