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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[go1.15] Update to go1.15 #93939

Merged
merged 3 commits into from Aug 12, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/build-image/cross/VERSION
@@ -1 +1 @@
v1.15.0-rc.2-1
v1.15.0-1
14 changes: 5 additions & 9 deletions build/dependencies.yaml
@@ -1,7 +1,7 @@
dependencies:
# Bazel
- name: "repo-infra"
version: 0.0.11
version: 0.0.12
refPaths:
- path: build/root/WORKSPACE
match: strip_prefix = "repo-infra-\d+.\d+.\d+"
Expand Down Expand Up @@ -82,21 +82,17 @@ dependencies:
- path: cluster/images/etcd/migrate/options.go

# Golang
- name: "golang"
version: 1.15.0-rc.2
- name: "golang: upstream version"
version: 1.15
refPaths:
- path: build/build-image/cross/VERSION
- path: build/root/WORKSPACE
match: (override_)?go_version = "((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)"

- name: "golang: upstream container image"
version: 1.15rc2
refPaths:
match: (override_)?go_version = "\d+.\d+(alpha|beta|rc)?\.?\d+"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you want something like:

"\d+\.\d+(alpha\d*|beta\d*|rc\d*|\.\d+)?"
# one or more digits, followed by .
\d+\.
# one or more digits
\d+
# optionally followed by alpha/beta/rc of any number, or a specific patch release
(
  alpha\d*
  |
  beta\d*
  |
  rc\d*
  |
  \.\d+
)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

follow up for this is fine, just noting that the only reason this currently passes 1.15 is:

"\d+.\d+(alpha|beta|rc)?\.?\d+"
"1  .1                     5"

and the . in the regex would match any character, not just a literal .

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, will issue a follow up to clean up some of the regex in dependencies.yaml.
It's a bit Wild Wild West in there at this point.

- path: test/images/Makefile
match: GOLANG_VERSION=\d+.\d+(alpha|beta|rc)?\.?\d+

- name: "k8s.gcr.io/kube-cross: dependents"
version: v1.15.0-rc.2-1
version: v1.15.0-1
refPaths:
- path: build/build-image/cross/VERSION
- path: test/images/sample-apiserver/Dockerfile
Expand Down
12 changes: 4 additions & 8 deletions build/root/WORKSPACE
Expand Up @@ -3,13 +3,12 @@ workspace(name = "io_k8s_kubernetes")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
load("//build:workspace_mirror.bzl", "mirror")

# TODO(go1.15): Update once we've published a repo-infra release that supports go1.15
http_archive(
name = "io_k8s_repo_infra",
strip_prefix = "repo-infra-0.0.11",
sha256 = "93da34ad63b1f95db22980becfef7d1cae6f99a84bdd16467edf68956d4288bb",
strip_prefix = "repo-infra-0.0.12",
sha256 = "e309a655a5b04fd76b6e950b3371aa8636bb929f2860a7ec22fa9b4b0b7c8236",
urls = [
"https://github.com/kubernetes/repo-infra/archive/v0.0.11.tar.gz",
"https://github.com/kubernetes/repo-infra/archive/v0.0.12.tar.gz",
],
)

Expand All @@ -24,10 +23,7 @@ load("@io_k8s_repo_infra//:repos.bzl", repo_infra_configure = "configure", repo_
# 'override_go_version': used to specify an alternate go version provided
# by kubernetes/repo-infra
repo_infra_configure(
# TODO(go1.15): Uncomment once we've published a repo-infra release that supports go1.15
#go_version = "1.15.0",
# TODO(go1.15): Comment out once we've published a repo-infra release that supports go1.15
override_go_version = "1.15.0-rc.2",
go_version = "1.15",
minimum_bazel_version = "2.2.0",
)

Expand Down
2 changes: 1 addition & 1 deletion hack/tools/go.mod
Expand Up @@ -11,5 +11,5 @@ require (
gotest.tools v2.2.0+incompatible
gotest.tools/gotestsum v0.3.5
honnef.co/go/tools v0.0.1-2020.1.4
k8s.io/repo-infra v0.0.11
k8s.io/repo-infra v0.0.12
)
4 changes: 2 additions & 2 deletions hack/tools/go.sum
Expand Up @@ -708,8 +708,8 @@ honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
k8s.io/klog/v2 v2.3.0 h1:WmkrnW7fdrm0/DMClc+HIxtftvxVIPAhlVwMQo5yLco=
k8s.io/klog/v2 v2.3.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
k8s.io/repo-infra v0.0.11 h1:cSxJ7c6qIG4ImjsaJEQ2+FZnh6CbV7x9yz3je6Mme4k=
k8s.io/repo-infra v0.0.11/go.mod h1:WfvjbUCy0f1fsyHq6sF825VYMfAh9pQdkYCa35OZRJc=
k8s.io/repo-infra v0.0.12 h1:i5NvQE7KU7Ky/YkJZPLZJKBDTNgf4ncNXz17XC8uZIE=
k8s.io/repo-infra v0.0.12/go.mod h1:WfvjbUCy0f1fsyHq6sF825VYMfAh9pQdkYCa35OZRJc=
mvdan.cc/gofumpt v0.0.0-20200709182408-4fd085cb6d5f/go.mod h1:9VQ397fNXEnF84t90W4r4TRCQK+pg9f8ugVfyj+S26w=
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I=
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc=
Expand Down
2 changes: 1 addition & 1 deletion test/images/Makefile
Expand Up @@ -16,7 +16,7 @@ REGISTRY ?= gcr.io/kubernetes-e2e-test-images
GOARM ?= 7
DOCKER_CERT_BASE_PATH ?=
QEMUVERSION=v2.9.1
GOLANG_VERSION=1.15rc2
GOLANG_VERSION=1.15.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this just 1.15 or is it 1.15.0?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the docker image includes the .0 馃槣

https://hub.docker.com/_/golang?tab=tags&page=1&name=1.15.0

export

ifndef WHAT
Expand Down
2 changes: 1 addition & 1 deletion test/images/sample-apiserver/Dockerfile
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

ARG BASEIMAGE
FROM k8s.gcr.io/build-image/kube-cross:v1.15.0-rc.2-1 as build_k8s_1_17_sample_apiserver
FROM k8s.gcr.io/build-image/kube-cross:v1.15.0-1 as build_k8s_1_17_sample_apiserver

ENV GOPATH /go
RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin
Expand Down