-
Notifications
You must be signed in to change notification settings - Fork 117
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
github/workflows: migrate CI to Go 1.19 and fix linting issues #2426
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fsouza
commented
Oct 20, 2022
fsouza
changed the title
github/workflows: enable Go 1.19 in CI
github/workflows: enable Go 1.19 in CI and fix linting issues
Oct 20, 2022
fsouza
changed the title
github/workflows: enable Go 1.19 in CI and fix linting issues
github/workflows: migrate CI to Go 1.19 and fix linting issues
Oct 21, 2022
fsouza
force-pushed
the
go-1.19-in-ci
branch
4 times, most recently
from
October 27, 2022 15:14
3024558
to
1f5a1cc
Compare
This PR has been marked as stale after 7 or more days of inactivity. Please have a maintainer add the |
dschaller
reviewed
Nov 7, 2022
dschaller
reviewed
Nov 7, 2022
dschaller
reviewed
Nov 7, 2022
dschaller
reviewed
Nov 7, 2022
dschaller
reviewed
Nov 7, 2022
To avoid issues, golangci-lint should be compile with the same version of the Go.
We want to make sure we can safely migrate to 1.19, so let's run it in CI.
gofmt has changed comments quite a bit. Also use `go fix` to get rid of the legacy build tags.
Unfortunately, the output has changed from Go 1.17 to Go 1.19, so that step can only run with one of the two versions. Let's prefer the most recent one.
Removed deprecated linters, and also remove goimports (gci is a superset of goimports).
It was deprecated in Go 1.16.
danielhochman
approved these changes
Nov 14, 2022
mikecutalo
approved these changes
Nov 14, 2022
colek319
approved these changes
Nov 14, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
We want to make sure we can safely migrate to 1.19, so let's run it in CI. This PR ended-up being a bit big because it does multiple things (see individual commits for more details):
set-output
is now deprecated)setup-go
has built-in cache support, we probably don't need to useactions/cache
directly, but I didn't want to change the config too much)golangci-lint run --fix
for violations that can be fixed automaticallyioutil
deprecationnolint
for a false positive and one code change where we passReadHeaderTimeout
tohttp.Server
).golangci.yml
I'd be happy to split it apart. Each of the items above could be a separate PR, but to be honest since many of the changes are either automatic or simple search and replace, I wonder if that's really necessary? Let me know either way and I'll adjust.
One note is that clutch is already distributed with Go 1.19 via the Docker image, but I'm unsure about who are the consumers of that.
Testing Performed
GitHub will test it for us :)