-
Notifications
You must be signed in to change notification settings - Fork 40.7k
Build k8s using latest commit of golang #132197
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
Build k8s using latest commit of golang #132197
Conversation
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/assign @liggitt @BenTheElder |
@@ -524,6 +524,15 @@ kube::golang::internal::verify_go_version() { | |||
if [ "${GOTOOLCHAIN:-auto}" != 'auto' ]; then | |||
# no-op, just respect GOTOOLCHAIN | |||
: | |||
elif [ "${GO_VERSION:-}" == 'devel' ]; then |
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.
I was sort of hoping we could move towards the GOTOOLCHAIN standard, we have a lot of ways to configure this currently, and it would be nice to rely on go tooling instead of shell/gimmee when possible.
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.
Does https://pkg.go.dev/golang.org/dl/gotip make sense?
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.
possibly, i was trying to stay within the current boundaries and not introduce more things.
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.
we can open an issue and ask for help if needed.
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.
Done! #132204
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.
This still means we've just expanded the surface area of GO_VERSION
.
Is devel
a typical name for this in go?
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.
i saw "devel"
in go repo - https://github.com/search?q=repo%3Agolang%2Fgo%20%2F%22devel%22%2F&type=code
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.
and i did not want to use "master"
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.
ACK. I just worry a little bit about the behemoth of an "API" we have around this, it's kind of like cluster/, very hard to improve because the user API is poorly defined. GOTOOLCHAIN got us close to removing this bit.
@@ -314,8 +314,10 @@ _setup_bootstrap() { | |||
# _compile "dir" | |||
_compile() { | |||
( | |||
if grep -q GOROOT_BOOTSTRAP "${1}/src/make.bash" &>/dev/null; then | |||
_setup_bootstrap || return 1 | |||
if [[ -z "${GOROOT_BOOTSTRAP}" ]]; then |
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.
is there an upstream commit we should sync to instead?
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.
I did not see any changes in this area in upstream @BenTheElder. They had only updated the list of versions above.
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.
previously this code wasn't actually modified IIRC, only copied locally so we don't have to curl | bash
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.
we should probably document any changes we make and consider upstreaming them
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.
pretty static repo, but will try - https://github.com/travis-ci/gimme/commits/master
0126604
to
71817d6
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dims 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 |
/sig testing |
Run "gimme master" and use the newly built binaries. Adjust GOROOT_BOOTSTRAP so we can use the golang that is already on disk to build the new commit from golang. To enable this, edit `.go-version` and set the version to ``` devel ``` and then run `make quick-release` (for example) Signed-off-by: Davanum Srinivas <[email protected]>
71817d6
to
c85ac59
Compare
@BenTheElder opened #132204 for follow up. Are you ok landing this please? need to get back to kubernetes/test-infra#34918 once this lands |
/lgtm |
LGTM label has been added. Git tree hash: 1aaa61079cb2386bd67ffcdc172bd129c1c3f97e
|
Run "gimme master" and use the newly built binaries. Adjust GOROOT_BOOTSTRAP so we can use the golang that is already on disk to build the new commit from golang.
To enable this, edit
.go-version
and set the version toand then run
make quick-release
(for example)/kind cleanup
Context: please see kubernetes/test-infra#34918, We currently build a full
kube-cross
image when it is not really needed at all. It's flaky and we get throttled and it's a mess!. Since we already allow building against different versions of golang, we should just ensure we support this use case as well.What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR is related to:
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: