-
Notifications
You must be signed in to change notification settings - Fork 18k
x/build: catch problems in x/ repos gated by module go directive version sooner #67791
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
Comments
This is a great idea. I suspect x/tools will pick up some problems when its go.mod directive is updated. |
A sketch of how this can be implemented:
Using x/build as an example, it would have a new post-submit builder named: x_build-gotip-linux-amd64-tiplang And the top-level module test sequence would have this one extra command: [...] # discover modules to test, download module dependencies in advance, etc.
+go get go@1.24
go test ./... I think we can target doing this this at tip, one builder per x/ repo, and afterwards can consider if there's a benefit to doing it for release branches and/or more than just linux/amd64. We'll also need to find a good place where the 1.24 value is determined (config vs golangbuild), aiming to make it easier to maintain the value over time. This can be a starting point. |
golangbuild already has logic to fetch the latest release version from go.dev for perf builders, so we can reuse that and not have any configuration at all. Is that sufficient? Or is the problem that it's always one more than whatever that is? (We can always increment it in golangbuild from the latest one.) |
Yeah, determining it automatically without configuration, like for perf builders, sounds good. (If we later on realize we want more flexibility for some reason, we can add that flexibility afterwards; no need to do it pre-emptively.) Note that the most canonical source of the "latest tip version" is probably the internal/goversion package itself, and we also have code that reads that (e.g., here). golangbuild might be able to just read that file from disk after fetching the toolchain. (But going through the go.dev/dl/?mode=json API is probably also fine for this.) One correction to my previous comment – I realized now that |
Change https://go.dev/cl/643316 mentions this issue: |
This change adds tiplang builders for subrepos which upgrade the repository's go.mod to the next Go version (tip toolchain's version) before running tests. Only for post-submit and non-special subrepos. (For now?) For golang/go#67791. Change-Id: If56bcaf49c27458309989ebdee4421c2382c2490 Reviewed-on: https://go-review.googlesource.com/c/build/+/643316 Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
The build-side work for this is all done now, but I haven't closed the issue because I want to confirm that this build which ran in the new mode (ignore the builder name) has a real failure (it should be showing up soon in postsubmit as well). |
Looks real; it reproduces consistently with go1.24rc2 darwin/arm64. Glad to see it paying off already!
|
Change https://go.dev/cl/647776 mentions this issue: |
Annotate those builders with corresponding tracking issues. Since these findings are not necessarily causing a problem today, it might be some time before they're investigated and fixed. This will also unblock the golang.org/x tagging workflow. For golang/go#67791. Change-Id: I048f08b05df546c10ff42fc267cd645eb3fb049f Reviewed-on: https://go-review.googlesource.com/c/build/+/647776 Reviewed-by: Michael Knyszek <mknyszek@google.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
I think this is done! Closing. |
Issue #67783 is an example of a test failure that happened only at tip (future Go 1.23 to be) and when the go directive in x/net is increased to Go language version 1.23. Bumping x/net go directive to 1.23 will not happen on its own soon since Go 1.22 and 1.21 are still supported now, but it would be good to have at least one builder that could catch such problems sooner anyway. This is a tracking issue for that.
Edit: Discussion here shows another case where having this implemented would help, by letting vet changes be rolled out more gradually without delay in signal.
More examples of issues that this could help with:
CC @golang/release.
The text was updated successfully, but these errors were encountered: