-
Notifications
You must be signed in to change notification settings - Fork 84
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support overriding go_sdk versions #202
Conversation
e52115b
to
8bf157a
Compare
/check-cla |
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
8bf157a
to
6c1ece2
Compare
) | ||
load( | ||
"@io_k8s_repo_infra//go:sdk_versions.bzl", | ||
"OVERRIDE_GO_VERSIONS", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to put this in a different file rather than in here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fejta -- Mostly long-term maintenance. This puts us on a path to support Go pre-releases and that list is going to get pretty long. I didn't want to clutter up our primary logic with all of the pre-release tuples.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fejta, justaugustus The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold cancel |
(Suggested in #197 (comment).)
I've roughly borrowed this pattern from rules_go (h/t @jayconrod).
See: https://github.com/bazelbuild/rules_go/blob/9dc42edc13c67d8a70a14e262a7b128ed26a3e54/go/private/sdk.bzl#L23-L28 and https://github.com/bazelbuild/rules_go/blob/9dc42edc13c67d8a70a14e262a7b128ed26a3e54/go/private/sdk_list.bzl#L19
Here we extend the
configure
function inrepos.bzl
to accept anoverride_go_version
parameter.If
override_go_version
is specified,configure
will make a call togo_download_sdk
as follows:OVERRIDE_GO_VERSIONS
is a map that can contain multiple alternate go_sdk versions.This PR populates the map with go1.15beta1 /
1.15.0-beta.1
, which can be used to test the kubernetes/kubernetes upgrade to go1.15 in kubernetes/kubernetes#93264.A consumer can leverage this new functionality as follows:
You can see a test of this functionality in kubernetes/kubernetes#93395.