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

Update to go1.17, and bring up linter, and deps #209

Merged
merged 4 commits into from
Jan 9, 2023
Merged

Update to go1.17, and bring up linter, and deps #209

merged 4 commits into from
Jan 9, 2023

Conversation

bnevis-i
Copy link
Contributor

@bnevis-i bnevis-i commented Jan 4, 2023

Resolves CVE-2022-41717 and CVE-2022-32149 and general housekeeping

Signed-off-by: Bryon Nevis [email protected]

Copy link
Member

@azdagron azdagron left a comment

Choose a reason for hiding this comment

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

Looks good. I'm going to file an issue to run tests against all supported go versions so we can ensure we keep go1.13 compat.

@azdagron
Copy link
Member

azdagron commented Jan 9, 2023

Oh, already filed #206 :)

@bnevis-i
Copy link
Contributor Author

bnevis-i commented Jan 9, 2023

Error: ../../../../go/pkg/mod/golang.org/x/[email protected]/http2/transport.go:19:2: package io/fs is not in GOROOT (/opt/hostedtoolcache/go/1.13.15/x64/src/io/fs)

Github action isn't using the same Go version that is specified in the Makefile.

v2/go.mod Outdated
@@ -3,11 +3,11 @@ module github.com/spiffe/go-spiffe/v2
go 1.13
Copy link
Collaborator

Choose a reason for hiding this comment

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

update version to 1.18 here too

Copy link
Collaborator

Choose a reason for hiding this comment

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

same for workflow

@bnevis-i
Copy link
Contributor Author

bnevis-i commented Jan 9, 2023

Looks good. I'm going to file an issue to run tests against all supported go versions so we can ensure we keep go1.13 compat.

What are the supported go versions? io/fs was introduced in 1.16 and anything less than 1.18 isn't supported anymore.

@azdagron
Copy link
Member

azdagron commented Jan 9, 2023

I think we should move to go1.17. That is the version that most of our dependencies use as a minimum.

@azdagron
Copy link
Member

azdagron commented Jan 9, 2023

Users are sometimes constrained and can't immediately move to new versions (supported or not). 1.13 is obviously way too old at this point.

@bnevis-i
Copy link
Contributor Author

bnevis-i commented Jan 9, 2023

Stand by. 1.17 version coming.

@bnevis-i
Copy link
Contributor Author

bnevis-i commented Jan 9, 2023

what compat mode do you want for the go tidy?

v2/go.mod Outdated
@@ -1,13 +1,27 @@
module github.com/spiffe/go-spiffe/v2

go 1.13
go 1.18
Copy link
Member

Choose a reason for hiding this comment

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

I think we should use go1.17. We should also update the workflow version to match for now until we get a version matrix.

@bnevis-i
Copy link
Contributor Author

bnevis-i commented Jan 9, 2023

Just pushed a version tidied with -go=1.16 AND -go=1.17. Let me know if you want -compat=1.17

@azdagron
Copy link
Member

azdagron commented Jan 9, 2023

I think running with -go=1.17 is correct.

@azdagron
Copy link
Member

azdagron commented Jan 9, 2023

We just need to update the .github/workflows/pr_build.yaml to use go1.17 instead of go1.13.

Resolves CVE-2022-41717 and CVE-2022-32149 and general housekeeping

Signed-off-by: Bryon Nevis <[email protected]>
@bnevis-i
Copy link
Contributor Author

bnevis-i commented Jan 9, 2023

We just need to update the .github/workflows/pr_build.yaml to use go1.17 instead of go1.13.

Amended

GO_VERSION: 1.17

@bnevis-i
Copy link
Contributor Author

bnevis-i commented Jan 9, 2023

I think this PR needs to be put on hold in order to deal with linter issues. Lots of issues upgrading the linter :-(

@azdagron
Copy link
Member

azdagron commented Jan 9, 2023

Yikes. Noticed that. Is that something you are planning to work on @bnevis-i? Or should one of us pick it up?

@bnevis-i
Copy link
Contributor Author

bnevis-i commented Jan 9, 2023

Yikes. Noticed that. Is that something you are planning to work on @bnevis-i? Or should one of us pick it up?

I can give it a shot. Unfortunately, a good number of the findings require subjective decisions, like what is the min tls version, how much ReadHeaderTimeout is needed. I can put up a draft PR and get feedback on the right values to use, or I can just wait for someone on the project who knows what the right values are to take care of it. Which would you like?

@azdagron
Copy link
Member

azdagron commented Jan 9, 2023

I can toss up a a PR real quick

@azdagron
Copy link
Member

azdagron commented Jan 9, 2023

Actually, i'll just push a commit on top of this PR. Then maybe we can rename it something more inclusive of the actual changes we're making.

@azdagron azdagron changed the title build(deps): Update dependencies to resolve Snyk findings Update to go1.17, and bring up linter, and deps Jan 9, 2023
Signed-off-by: Andrew Harding <[email protected]>
@bnevis-i
Copy link
Contributor Author

bnevis-i commented Jan 9, 2023

@azdagron Nice job. I've got to learn to push onto someone else's PR someday. Neat trick. It was the right call to resolve the linters yourself. I would have done every one differently!

@azdagron
Copy link
Member

azdagron commented Jan 9, 2023

I've got to learn to push onto someone else's PR someday.

It's not terribly hard. You have to add a new local remote to the forked repo, fetch, and then you can just push onto remote PR branch. You can delete the remote afterwards. You of course have to be a codeowner of the repo that is forked, AND it has to be enabled on the PR by the author (which default is controlled by the user? or maybe the org? I don't recall).

Copy link
Collaborator

@MarcosDY MarcosDY left a comment

Choose a reason for hiding this comment

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

LGTM!!!

@azdagron azdagron merged commit 4c8771f into spiffe:main Jan 9, 2023
@bnevis-i bnevis-i deleted the dependency-updates branch January 9, 2023 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants