From ef90e6cbb387d1d25e45316557abaddffddef987 Mon Sep 17 00:00:00 2001 From: Nikhita Raghunath Date: Fri, 24 Jul 2020 13:36:18 +0530 Subject: [PATCH 1/2] publishing: remove go 1.13.9 for master branch for controller-manager The rules now use `default-go-version` at the top of the rules file to define the go version used globally for all master branches. https://github.com/kubernetes/kubernetes/blob/8a3fc2d7e2043bc980bb5301d2f4292020f1a2dd/staging/publishing/rules.yaml#L7 --- staging/publishing/rules.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/staging/publishing/rules.yaml b/staging/publishing/rules.yaml index 9f91e20b831..0bcb7db02e8 100644 --- a/staging/publishing/rules.yaml +++ b/staging/publishing/rules.yaml @@ -1640,7 +1640,6 @@ rules: branch: master dir: staging/src/k8s.io/controller-manager name: master - go: 1.13.9 - source: branch: release-1.19 dir: staging/src/k8s.io/controller-manager From 1dffb870374b2c71cff3f49a1253675eb8f4b62f Mon Sep 17 00:00:00 2001 From: Nikhita Raghunath Date: Fri, 24 Jul 2020 14:33:05 +0530 Subject: [PATCH 2/2] hack: ensure go version is not specified for master in publishing rules The go version for all master branches is defined in `default-go-version` locally. Note that this validation isn't added to publishing-bot directly because we still want to give users of the publishing-bot the ability to specify specific go versions for the master branch if they need, but we want to explicitly disallow this for kubernetes repos. --- hack/verify-publishing-bot.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hack/verify-publishing-bot.py b/hack/verify-publishing-bot.py index 6881efb7e93..fdab858d13f 100755 --- a/hack/verify-publishing-bot.py +++ b/hack/verify-publishing-bot.py @@ -86,6 +86,11 @@ def main(): if branch["source"]["branch"] != "master": raise Exception("cannot find master source branch for destination %s" % rule["destination"]) + # we specify the go version for all master branches through `default-go-version` + # so ensure we don't specify explicit go version for master branch in rules + if "go" in branch: + raise Exception("go version must not be specified for master branch for destination %s" % rule["destination"]) + print("processing : %s" % rule["destination"]) if rule["destination"] not in gomod_dependencies: raise Exception("missing go.mod for %s" % rule["destination"])