Skip to content
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

Chore: Upgrade Go to 1.21.3 #77304

Merged
merged 9 commits into from
Nov 1, 2023
Merged

Chore: Upgrade Go to 1.21.3 #77304

merged 9 commits into from
Nov 1, 2023

Conversation

ryantxu
Copy link
Member

@ryantxu ryantxu commented Oct 27, 2023

What is this feature?

Update the min go version to 1.21. (see also #76359)

Why do we need this feature?

This lets us use new features added in 1.21. This lets us use the new standard library functions rather than the ones in `"golang.org/x/exp/..." (eg slices+maps)

Who is this feature for?

Developers

@ryantxu ryantxu added type/chore no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes labels Oct 27, 2023
@ryantxu ryantxu requested a review from a team as a code owner October 27, 2023 16:11
@ryantxu ryantxu requested review from nikimanoledaki, suntala and yangkb09 and removed request for a team October 27, 2023 16:11
@grafana-delivery-bot grafana-delivery-bot bot added this to the 10.3.x milestone Oct 27, 2023
@@ -1,6 +1,3 @@
//go:build go1.3
// +build go1.3
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with these tags, the build results are:

go build -ldflags -w -X main.version=10.3.0-pre -X main.commit=caa185df53 -X main.buildstamp=1698422981 -X main.buildBranch=use-golant-121 -o ./bin/grafana ./pkg/cmd/grafana
# github.com/grafana/grafana/pkg/web
pkg/web/macaron.go:48:14: predeclared any requires go1.18 or later (-lang was set to go1.21; check go.mod)
pkg/web/macaron.go:73:13: cannot use http.NotFound (value of type func(w http.ResponseWriter, r *http.Request)) as Handler value in argument to m.NotFound
pkg/web/macaron.go:107:6: type aliases requires go1.9 or later (-lang was set to go1.21; check go.mod)
pkg/web/macaron.go:122:15: invalid operation: handler (variable of type Handler) is not an interface
exit status 1
exit status 1
make[1]: *** [build-go] Error 1

@ryantxu ryantxu requested review from a team as code owners October 27, 2023 16:18
@ryantxu ryantxu requested review from Jguer, IevaVasiljeva, rwwiv, JacobsonMT, yuri-tceretian and grobinson-grafana and removed request for a team October 27, 2023 16:18
@ryantxu ryantxu marked this pull request as draft October 27, 2023 16:31
@ryantxu ryantxu added add to changelog and removed no-changelog Skip including change in changelog/release notes labels Oct 31, 2023
@grafana-pr-automation grafana-pr-automation bot added type/build-packaging type/ci Tasks related to Continuous Integration workflow labels Oct 31, 2023
@ryantxu ryantxu changed the title Chore: Use golang 1.21 Chore: Upgrade Go to 1.21.3 Oct 31, 2023
go.mod Show resolved Hide resolved
@@ -635,7 +635,6 @@ embed.go @grafana/grafana-as-code
/.github/workflows/issue-opened.yml @grafana/grafana-community-support
/.github/workflows/metrics-collector.yml @torkelo
/.github/workflows/milestone.yml @marefr
/.github/workflows/ox-code-coverage.yml @grafana/explore-squad
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed since not used by explore anymore... see grafana/code-coverage#29 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @grafana/observability-logs was using that workflow to report coverage changes btw.

@ryantxu ryantxu marked this pull request as ready for review November 1, 2023 15:58
@ryantxu ryantxu requested review from a team, DanCech and tolzhabayev as code owners November 1, 2023 15:58
@ryantxu ryantxu requested review from a team and kminehart November 1, 2023 15:58
@ryantxu ryantxu merged commit 5d5f8df into main Nov 1, 2023
15 checks passed
@ryantxu ryantxu deleted the use-golant-121 branch November 1, 2023 16:17
@aangelisc aangelisc modified the milestones: 10.3.x, 10.2.3 Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants