-
Notifications
You must be signed in to change notification settings - Fork 480
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
Update to go1.17 #4822
Update to go1.17 #4822
Conversation
I think, we need to decide, whether to merge this one or #4825 first, because it will conflict (see #4825 (comment)) |
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.
/lgtm
TODOs after merging this PR:
Update the go.mod to go1.17
Can you open an issue for it? :)
@timebertt In the Daily we agreed to merge #4825 first and then @ialidzhikov can rebase this PR. |
Signed-off-by: ialidzhikov <[email protected]>
Signed-off-by: ialidzhikov <[email protected]>
Signed-off-by: ialidzhikov <[email protected]>
Signed-off-by: ialidzhikov <[email protected]>
3c1c4d6
to
7aa4b5b
Compare
As expected the verify step will continue to fail until we update the @rfranzke can you check whether ialidzhikov/gardener@4200bf9 will do the trick for pipeline update for go1.17? Thanks in advance. |
I think it looks good @ialidzhikov. Shall we go ahead merging this PR? |
The PR looks fine to me. Thank you for checking the branch.cfg change and for the approval. I am in general not in a hurry with this PR. After merging this PR new verify runs of existing PRs will fail (they will need to rebase). So to make it 1 idea less breaking for the other PRs, I can proceed with it on Friday evening (when I don't expect a high ratio of PR updates). I first plan to update |
OK, sounds good, thank you very much! |
* Update the go version in the Dockerfile * Update the go version in the TestDefinitions * make generate * Format the ./hack dir
* Update the go version in the Dockerfile * Update the go version in the TestDefinitions * make generate * Format the ./hack dir
* Update the go version in the Dockerfile * Update the go version in the TestDefinitions * make generate * Format the ./hack dir
* Update the go version in the Dockerfile * Update the go version in the TestDefinitions * make generate * Format the ./hack dir
/area open-source
/kind enhancement
This PR consists of the following parts:
make generate
changes caused by gofmt that synchronizes //go:build lines with // +build lines - ref https://golang.org/doc/go1.17#gofmtmake format
for the ./hack dir to synchronizes the build lines there as wellI didn't update the go version of the module (the one in go.mod) because to be honest I am not able to completely follow the changes to the module graph pruning. go1.17 should be able to work with go1.16 module. This is actually also how kubernetes/kubernetes upgraded to go1.17 - the go runtime version is go1.17 but the module version is still go1.16 - ref kubernetes/kubernetes#103692. So it should not be a problem if we delay to module version update to another PR.
TODOs before merging this:
branch.cfg
to use go1.17 for the master branch and go1.16 for the release branches that still require go1.16 (and example commit with the adaptation - ialidzhikov@4200bf9) -> e204deeTODOs after merging this PR:
Special notes for your reviewer:
net
pkg - the ParseIP and ParseCIDR functions now reject IPv4 addresses which contain decimal components with leading zeros (ref https://golang.org/doc/go1.17#net). The change tackles the following CVE - https://nvd.nist.gov/vuln/detail/CVE-2021-29923.kubernetes/kubernetes decided to preserve the backwards compatibility and K8s will still allow IPv4 addresses that contain decimal components with leading zeros (ref golang 1.17 fails to parse IPs with leading zeros kubernetes/kubernetes#104368).
So from a Gardener side it is a little bit tricky how to tackle this breaking change - from one side we have a breaking change, on the other side if we decide to take approach like kubernetes/kubernetes to preserve the compatibility we will be still affected by the high CVE. I decided to take the first approach and "accept the breaking change". But if someone has suggestions/objections, they are more than welcome.
Release note: