-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Upgrade Golang version v1.24 #1738
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
Upgrade Golang version v1.24 #1738
Conversation
Signed-off-by: dongjiang <dongjiang1989@126.com>
… examples name Signed-off-by: dongjiang <dongjiang1989@126.com>
Signed-off-by: dongjiang <dongjiang1989@126.com>
Signed-off-by: dongjiang <dongjiang1989@126.com>
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.
Thanks for the PR. I have some comments.
@@ -1,6 +1,6 @@ | |||
module github.com/prometheus/client_golang | |||
|
|||
go 1.21 | |||
go 1.22 |
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 don't need to bump this if we don't use any new APIs from 1.22.
We officially support only the last three versions but if we don't use new APIs no need to break compatibly.
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.
Thanks @kakkoyun
I got it
Revert golang version to 1.21
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.
Except we do need to change it if we remove 1.21 from the supported version test matrix.
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.
You’re right—I’m still undecided on this. We could continue testing all versions down to the minimum required API level (1.21) since there’s no downside to doing so.
That said, we could also make the case for upgrading the Go toolchain, given its strong backward compatibility.
Better to stick what we have right now.
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.
Except we do need to change it if we remove 1.21 from the supported version test matrix.
Thanks @SuperQ
I got it.
@@ -1,6 +1,6 @@ | |||
module github.com/prometheus/client_golang | |||
|
|||
go 1.21 | |||
go 1.22 |
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.
You’re right—I’m still undecided on this. We could continue testing all versions down to the minimum required API level (1.21) since there’s no downside to doing so.
That said, we could also make the case for upgrading the Go toolchain, given its strong backward compatibility.
Better to stick what we have right now.
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.
Thanks!
* update golang version Signed-off-by: dongjiang <dongjiang1989@126.com> * fix the new tests analyzer reports common mistakes in declarations of examples name Signed-off-by: dongjiang <dongjiang1989@126.com> * Update .github/workflows/golangci-lint.yml Signed-off-by: dongjiang <dongjiang1989@126.com> * update golanglint list Signed-off-by: dongjiang <dongjiang1989@126.com> --------- Signed-off-by: dongjiang <dongjiang1989@126.com>
This library supports the three most recent major releases of Go. Move golang v1.21
Fix Examples case name: