Skip to content

Commit

Permalink
Merge pull request opendatahub-io#56 from DharmitD/go-version-cve
Browse files Browse the repository at this point in the history
UPSTREAM: <carry>: Upgrade go version to 1.21 and go.mod package versions
  • Loading branch information
HumairAK committed Jun 14, 2024
2 parents ea68150 + f46e510 commit dadfb38
Show file tree
Hide file tree
Showing 16 changed files with 181 additions and 667 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.20.x'
go-version: '1.21.x'
- name: Run Unit Test
working-directory: ${{ github.workspace }}/backend/src
env:
Expand Down
4 changes: 1 addition & 3 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
# Build arguments
ARG SOURCE_CODE=.

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

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

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

WORKDIR /bin
Expand Down
2 changes: 1 addition & 1 deletion backend/Dockerfile.cacheserver
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

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

RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh gcc musl-dev
Expand Down
2 changes: 1 addition & 1 deletion backend/Dockerfile.conformance
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

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

RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh gcc musl-dev
Expand Down
4 changes: 1 addition & 3 deletions backend/Dockerfile.driver
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
ARG SOURCE_CODE=.

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


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

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

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

WORKDIR /bin
Expand Down
4 changes: 1 addition & 3 deletions backend/Dockerfile.launcher
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ ARG CI_CONTAINER_VERSION="unknown"


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


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

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

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

WORKDIR /bin
Expand Down
4 changes: 1 addition & 3 deletions backend/Dockerfile.persistenceagent
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ ARG CI_CONTAINER_VERSION="unknown"


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

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

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

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

Expand Down
4 changes: 1 addition & 3 deletions backend/Dockerfile.scheduledworkflow
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
ARG SOURCE_CODE=.

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

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion backend/Dockerfile.viewercontroller
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.20.4-alpine3.17 as builder
FROM golang:1.21.4-alpine3.17 as builder

RUN apk update && apk upgrade
RUN apk add --no-cache git gcc musl-dev
Expand Down
2 changes: 1 addition & 1 deletion backend/src/v2/test/components/build_go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ metadata:
author: Yuan Gong <[email protected]>
implementation:
container:
image: golang:1.20-alpine
image: golang:1.21-alpine
command:
- sh
- -exc
Expand Down
6 changes: 3 additions & 3 deletions backend/src/v2/test/presubmit-v2-go-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ PROJECT="${PROJECT:-kfp-ci}"
# The current directory is /home/prow/go/src/github.com/kubeflow/pipelines
# 1. install go in /home/prow/go1.15.10
cd /home/prow
mkdir go1.20.4
cd go1.20.4
mkdir go1.21.4
cd go1.21.4
curl -LO https://dl.google.com/go/go1.20.4.linux-amd64.tar.gz
tar -xf go1.20.4.linux-amd64.tar.gz
tar -xf go1.21.4.linux-amd64.tar.gz
export PATH="/home/prow/go1.20.4/go/bin:${PATH}"
cd /home/prow/go/src/github.com/kubeflow/pipelines/backend/src/v2
# 2. Check go modules are tidy
Expand Down
1 change: 0 additions & 1 deletion backend/third_party_licenses/apiserver.csv
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ github.com/klauspost/cpuid,https://github.com/klauspost/cpuid/blob/v1.3.1/LICENS
github.com/klauspost/pgzip,https://github.com/klauspost/pgzip/blob/v1.2.5/LICENSE,MIT
github.com/kubeflow/pipelines/api/v2alpha1/go,https://github.com/kubeflow/pipelines/blob/758c91f76784/api/LICENSE,Apache-2.0
github.com/kubeflow/pipelines/backend,https://github.com/kubeflow/pipelines/blob/HEAD/LICENSE,Apache-2.0
github.com/kubeflow/pipelines/kubernetes_platform/go/kubernetesplatform,https://github.com/kubeflow/pipelines/blob/8b2a099e8c9f/kubernetes_platform/LICENSE,Apache-2.0
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
github.com/lann/builder,https://github.com/lann/builder/blob/47ae307949d0/LICENSE,MIT
github.com/lann/ps,https://github.com/lann/ps/blob/62de8c46ede0/LICENSE,MIT
Expand Down
43 changes: 21 additions & 22 deletions backend/third_party_licenses/cache_server.csv
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ github.com/argoproj/pkg,https://github.com/argoproj/pkg/blob/v0.11.0/LICENSE,Apa
github.com/asaskevich/govalidator,https://github.com/asaskevich/govalidator/blob/f21760c49a8d/LICENSE,MIT
github.com/beorn7/perks/quantile,https://github.com/beorn7/perks/blob/v1.0.1/LICENSE,MIT
github.com/cenkalti/backoff,https://github.com/cenkalti/backoff/blob/v2.2.1/LICENSE,MIT
github.com/cespare/xxhash/v2,https://github.com/cespare/xxhash/blob/v2.1.2/LICENSE.txt,MIT
github.com/cespare/xxhash/v2,https://github.com/cespare/xxhash/blob/v2.2.0/LICENSE.txt,MIT
github.com/colinmarc/hdfs,https://github.com/colinmarc/hdfs/blob/9746310a4d31/LICENSE.txt,MIT
github.com/davecgh/go-spew/spew,https://github.com/davecgh/go-spew/blob/v1.1.1/LICENSE,ISC
github.com/doublerebel/bellows,https://github.com/doublerebel/bellows/blob/f177d92a03d3/LICENSE,MIT
github.com/emicklei/go-restful/v3,https://github.com/emicklei/go-restful/blob/v3.8.0/LICENSE,MIT
github.com/go-logr/logr,https://github.com/go-logr/logr/blob/v1.2.2/LICENSE,Apache-2.0
github.com/go-logr/logr,https://github.com/go-logr/logr/blob/v1.2.4/LICENSE,Apache-2.0
github.com/go-openapi/errors,https://github.com/go-openapi/errors/blob/v0.20.2/LICENSE,Apache-2.0
github.com/go-openapi/jsonpointer,https://github.com/go-openapi/jsonpointer/blob/v0.19.5/LICENSE,Apache-2.0
github.com/go-openapi/jsonreference,https://github.com/go-openapi/jsonreference/blob/v0.19.6/LICENSE,Apache-2.0
Expand All @@ -24,10 +24,10 @@ github.com/go-openapi/swag,https://github.com/go-openapi/swag/blob/v0.19.15/LICE
github.com/go-sql-driver/mysql,https://github.com/go-sql-driver/mysql/blob/v1.6.0/LICENSE,MPL-2.0
github.com/go-stack/stack,https://github.com/go-stack/stack/blob/v1.8.1/LICENSE.md,MIT
github.com/gogo/protobuf,https://github.com/gogo/protobuf/blob/v1.3.2/LICENSE,BSD-3-Clause
github.com/golang/glog,https://github.com/golang/glog/blob/v1.0.0/LICENSE,Apache-2.0
github.com/golang/protobuf,https://github.com/golang/protobuf/blob/v1.5.2/LICENSE,BSD-3-Clause
github.com/golang/glog,https://github.com/golang/glog/blob/v1.1.0/LICENSE,Apache-2.0
github.com/golang/protobuf,https://github.com/golang/protobuf/blob/v1.5.3/LICENSE,BSD-3-Clause
github.com/google/gnostic,https://github.com/google/gnostic/blob/v0.5.7-v3refs/LICENSE,Apache-2.0
github.com/google/go-cmp/cmp,https://github.com/google/go-cmp/blob/v0.5.7/LICENSE,BSD-3-Clause
github.com/google/go-cmp/cmp,https://github.com/google/go-cmp/blob/v0.6.0/LICENSE,BSD-3-Clause
github.com/google/gofuzz,https://github.com/google/gofuzz/blob/v1.2.0/LICENSE,Apache-2.0
github.com/google/uuid,https://github.com/google/uuid/blob/v1.3.0/LICENSE,BSD-3-Clause
github.com/gorilla/websocket,https://github.com/gorilla/websocket/blob/v1.5.0/LICENSE,BSD-2-Clause
Expand All @@ -40,12 +40,12 @@ github.com/jinzhu/gorm,https://github.com/jinzhu/gorm/blob/v1.9.1/License,MIT
github.com/jinzhu/inflection,https://github.com/jinzhu/inflection/blob/v1.0.0/LICENSE,MIT
github.com/josharian/intern,https://github.com/josharian/intern/blob/v1.0.0/license.md,MIT
github.com/json-iterator/go,https://github.com/json-iterator/go/blob/v1.1.12/LICENSE,MIT
github.com/klauspost/compress/flate,https://github.com/klauspost/compress/blob/v1.14.2/LICENSE,Apache-2.0
github.com/klauspost/compress/flate,https://github.com/klauspost/compress/blob/v1.15.9/LICENSE,Apache-2.0
github.com/klauspost/pgzip,https://github.com/klauspost/pgzip/blob/v1.2.5/LICENSE,MIT
github.com/kubeflow/pipelines/backend,https://github.com/kubeflow/pipelines/blob/HEAD/LICENSE,Apache-2.0
github.com/lestrrat-go/strftime,https://github.com/lestrrat-go/strftime/blob/v1.0.4/LICENSE,MIT
github.com/mailru/easyjson,https://github.com/mailru/easyjson/blob/v0.7.7/LICENSE,MIT
github.com/mattn/go-sqlite3,https://github.com/mattn/go-sqlite3/blob/v1.14.16/LICENSE,MIT
github.com/mattn/go-sqlite3,https://github.com/mattn/go-sqlite3/blob/v1.14.18/LICENSE,MIT
github.com/matttproud/golang_protobuf_extensions/pbutil,https://github.com/matttproud/golang_protobuf_extensions/blob/c182affec369/LICENSE,Apache-2.0
github.com/mitchellh/copystructure,https://github.com/mitchellh/copystructure/blob/v1.2.0/LICENSE,MIT
github.com/mitchellh/mapstructure,https://github.com/mitchellh/mapstructure/blob/v1.4.3/LICENSE,MIT
Expand All @@ -65,21 +65,21 @@ github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg,https://github.
github.com/prometheus/procfs,https://github.com/prometheus/procfs/blob/v0.7.3/LICENSE,Apache-2.0
github.com/robfig/cron/v3,https://github.com/robfig/cron/blob/v3.0.1/LICENSE,MIT
github.com/shopspring/decimal,https://github.com/shopspring/decimal/blob/v1.2.0/LICENSE,MIT
github.com/sirupsen/logrus,https://github.com/sirupsen/logrus/blob/v1.8.1/LICENSE,MIT
github.com/sirupsen/logrus,https://github.com/sirupsen/logrus/blob/v1.9.0/LICENSE,MIT
github.com/spf13/cast,https://github.com/spf13/cast/blob/v1.4.1/LICENSE,MIT
github.com/spf13/pflag,https://github.com/spf13/pflag/blob/v1.0.5/LICENSE,BSD-3-Clause
github.com/valyala/bytebufferpool,https://github.com/valyala/bytebufferpool/blob/v1.0.0/LICENSE,MIT
github.com/valyala/fasttemplate,https://github.com/valyala/fasttemplate/blob/v1.2.1/LICENSE,MIT
go.mongodb.org/mongo-driver,https://github.com/mongodb/mongo-go-driver/blob/v1.8.2/LICENSE,Apache-2.0
golang.org/x/crypto,https://cs.opensource.google/go/x/crypto/+/v0.9.0:LICENSE,BSD-3-Clause
golang.org/x/net,https://cs.opensource.google/go/x/net/+/v0.10.0:LICENSE,BSD-3-Clause
golang.org/x/oauth2,https://cs.opensource.google/go/x/oauth2/+/d3ed0bb2:LICENSE,BSD-3-Clause
golang.org/x/sys/unix,https://cs.opensource.google/go/x/sys/+/v0.8.0:LICENSE,BSD-3-Clause
golang.org/x/term,https://cs.opensource.google/go/x/term/+/v0.8.0:LICENSE,BSD-3-Clause
golang.org/x/text,https://cs.opensource.google/go/x/text/+/v0.9.0:LICENSE,BSD-3-Clause
golang.org/x/time/rate,https://cs.opensource.google/go/x/time/+/90d013bb:LICENSE,BSD-3-Clause
google.golang.org/genproto,https://github.com/googleapis/go-genproto/blob/1973136f34c6/LICENSE,Apache-2.0
google.golang.org/grpc,https://github.com/grpc/grpc-go/blob/v1.44.0/LICENSE,Apache-2.0
golang.org/x/crypto,https://cs.opensource.google/go/x/crypto/+/v0.16.0:LICENSE,BSD-3-Clause
golang.org/x/net,https://cs.opensource.google/go/x/net/+/v0.19.0:LICENSE,BSD-3-Clause
golang.org/x/oauth2,https://cs.opensource.google/go/x/oauth2/+/v0.7.0:LICENSE,BSD-3-Clause
golang.org/x/sys/unix,https://cs.opensource.google/go/x/sys/+/v0.15.0:LICENSE,BSD-3-Clause
golang.org/x/term,https://cs.opensource.google/go/x/term/+/v0.15.0:LICENSE,BSD-3-Clause
golang.org/x/text,https://cs.opensource.google/go/x/text/+/v0.14.0:LICENSE,BSD-3-Clause
golang.org/x/time/rate,https://cs.opensource.google/go/x/time/+/v0.3.0:LICENSE,BSD-3-Clause
google.golang.org/genproto,https://github.com/googleapis/go-genproto/blob/daa745c078e1/LICENSE,Apache-2.0
google.golang.org/grpc,https://github.com/grpc/grpc-go/blob/v1.56.3/LICENSE,Apache-2.0
google.golang.org/protobuf,https://github.com/protocolbuffers/protobuf-go/blob/v1.30.0/LICENSE,BSD-3-Clause
gopkg.in/inf.v0,https://github.com/go-inf/inf/blob/v0.9.1/LICENSE,BSD-3-Clause
gopkg.in/jcmturner/aescts.v1,https://github.com/jcmturner/aescts/blob/v1.0.1/LICENSE,Apache-2.0
Expand All @@ -88,16 +88,15 @@ gopkg.in/jcmturner/gokrb5.v5,https://github.com/jcmturner/gokrb5/blob/v5.3.0/LIC
gopkg.in/jcmturner/rpc.v0/ndr,https://github.com/jcmturner/rpc/blob/v0.0.2/LICENSE,Apache-2.0
gopkg.in/yaml.v2,https://github.com/go-yaml/yaml/blob/v2.4.0/LICENSE,Apache-2.0
gopkg.in/yaml.v3,https://github.com/go-yaml/yaml/blob/v3.0.1/LICENSE,MIT
k8s.io/api,https://github.com/kubernetes/api/blob/v0.24.3/LICENSE,Apache-2.0
k8s.io/apimachinery/pkg,https://github.com/kubernetes/apimachinery/blob/v0.24.3/LICENSE,Apache-2.0
k8s.io/apimachinery/third_party/forked/golang,https://github.com/kubernetes/apimachinery/blob/v0.24.3/third_party/forked/golang/LICENSE,BSD-3-Clause
k8s.io/api,https://github.com/kubernetes/api/blob/v0.24.17/LICENSE,Apache-2.0
k8s.io/apimachinery/pkg,https://github.com/kubernetes/apimachinery/blob/v0.24.17/LICENSE,Apache-2.0
k8s.io/apimachinery/third_party/forked/golang,https://github.com/kubernetes/apimachinery/blob/v0.24.17/third_party/forked/golang/LICENSE,BSD-3-Clause
k8s.io/client-go,https://github.com/kubernetes/client-go/blob/v0.24.3/LICENSE,Apache-2.0
k8s.io/klog/v2,https://github.com/kubernetes/klog/blob/v2.60.1/LICENSE,Apache-2.0
k8s.io/kube-openapi/pkg,https://github.com/kubernetes/kube-openapi/blob/011e075b9cb8/LICENSE,Apache-2.0
k8s.io/kube-openapi/pkg/validation/spec,https://github.com/kubernetes/kube-openapi/blob/011e075b9cb8/pkg/validation/spec/LICENSE,Apache-2.0
k8s.io/kubernetes/pkg/apis/core,https://github.com/kubernetes/kubernetes/blob/v1.11.1/LICENSE,Apache-2.0
k8s.io/utils,https://github.com/kubernetes/utils/blob/3a6ce19ff2f9/LICENSE,Apache-2.0
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
sigs.k8s.io/json,https://github.com/kubernetes-sigs/json/blob/9f7c6b3444d2/LICENSE,Apache-2.0
sigs.k8s.io/structured-merge-diff/v4,https://github.com/kubernetes-sigs/structured-merge-diff/blob/v4.2.1/LICENSE,Apache-2.0
sigs.k8s.io/structured-merge-diff/v4,https://github.com/kubernetes-sigs/structured-merge-diff/blob/v4.2.3/LICENSE,Apache-2.0
sigs.k8s.io/yaml,https://github.com/kubernetes-sigs/yaml/blob/v1.3.0/LICENSE,MIT
Loading

0 comments on commit dadfb38

Please sign in to comment.