-
Notifications
You must be signed in to change notification settings - Fork 68
Conversation
@@ -18,8 +18,8 @@ | |||
# Optional. The Go Binary to use | |||
GO ?= go | |||
|
|||
# Optional. Required Go version. | |||
GO_REQUIRED_VERSION ?= 1.18 |
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.
GO_REQUIRED_VERSION
is not referenced in any repo:
Signed-off-by: Aditya Sharma <[email protected]>
Sorry for the delay in getting back, I was taking a little break from the build submodule. Looking at #140, Go 1.18 bump was where we had to pay the price of a newer version of Go breaking the library. I was also running into instances where Github Actions or CircleCI pipelines were missing the Go setup step and were running older versions of Go (defaulting to the versions installed on Github or Circle CI runners) which produced different lint results and other errors compared to the local env. This is the reason why I added the version check/restriction. Go version in the However, I am a bit torn on the version check/restriction. I generally agree with @negz's points in #140. What are your thoughts on deferring to set
If we agree on this, it also makes sense to defer setting all the Go tool versions in the consuming projects as well. |
I think most of the issues were because many things have changed - even linters themselves and which linters are enabled - in go1.18 but I don't expect that to happen frequently that we need to have the guardrail in build submodule. My preference would be not have any check at all and rely on Go's internal checks regarding this. |
Go's internal checks are not sufficient for this purpose.
This was just a result of running same linters, garble versions but with different Go versiosn. Go usually has two major releases a year, so if a project is on the latest version, they will only have to upgrade things once a year (if we keep GO_SUPPORTED_VERSIONS updated with the current, current-1 Go versions). |
Another example of why we need the check: https://github.com/upbound/up/commit/cd977caabcd0d21e9e8ab3bad35cea387e0d93b9 |
I'm very reluctant to add this gate again. I don't think much has changed since last time we had it. I'm skeptical we'll do any better this time around WRT actually removing supported versions from this list as the submodule (and the projects that use it) change. I'm also not sure how valuable needing to explicitly permit newer versions of Go is. Regarding the second point, it seems like the key value of this gate is that when a new version of Go is released someone trying to use that new version will get an explicit "this version isn't supported" error where they might have otherwise run into a bunch of arcane errors that are tricky to diagnose as being because they have a newer Go version than the project is designed for. The issue here is that (anecdotally) it's much more common for new Go versions to "just work" than to need tricky updates, which historically has made this list just an annoyance, or something everyone ends up just working around by running If we do proceed with something like this I would prefer to require that each project be forced to set and maintain its own |
@epk Another thing that could help here is to make |
There are also false negatives like this one where an unrelated command errors out because the local go version is not supported.
I like this option. I really don't want to have the list be the cause of error when it doesn't need to be and this happens a lot, i.e. 1.19 is actually compatible but not supported by the list or go is irrelevant but build submodule is called. |
That's not a false negative, it is the issue of a CI workflow not running the required Go version (as I have pointed out above in a few instances). Would you want your publish/promote steps to build with a different version of Go than rest of the workflows? EDIT: I don't know if |
Go is not involved https://github.com/upbound/build/blob/master/makelib/image.mk#L206 . Even if it was though, if |
Description of your changes
Adds support for Go 1.19. This check now matches rook/rook's makelibs:
Unlike #195, this does not enforce an upgrade to Go 1.19
I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR, as appropriate.How has this code been tested