-
Notifications
You must be signed in to change notification settings - Fork 550
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
Add Go 1.20 support #1179
Add Go 1.20 support #1179
Conversation
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.
LGTM (assuming the version format is correct)
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.
arf; looks like some changes are needed (see failures)
028536f
to
8e9adf2
Compare
Added a little extra scope to resolve the errors. Took the opportunity to update the lint tooling from golint to golangci-lint and resolved new errors. Included here since we have the hood open but could split this into a seperate commit/PR if that helps. |
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.
Adding go.mod
explicitly to .gitignore
is a little odd when I don't think anything here generates it (right?), but I don't care about that enough to block this.
The other combined CI fixes/updates seem fine to include here IMO 👍
Good call out I could have explained that better. CI generates them here and just wanted to be sure I didn't accidentally push those. |
Why not use go.mod ? |
I can make this happen. IIRC other specs had them. |
8e9adf2
to
917fe22
Compare
go.mod
Outdated
@@ -0,0 +1,10 @@ | |||
module github.com/opencontainers/runtime-spec |
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.
This has a potential wider impact than updating go versions in CI; do we still need to discuss;
(or was there a concensus on that yet w.r.t. "SemVer from a Go perspective vs Spec perspective")?
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.
image-spec and distribution-spec already have go.mod
:
- https://github.com/opencontainers/image-spec/blob/main/go.mod
- https://github.com/opencontainers/distribution-spec/blob/main/specs-go/go.mod
And these struct definitions are unlikely to have breaking changes (until the spec itself has breaking changes)
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.
@thaJeztah WDYT?
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.
@austinvazquez @thaJeztah
Do we need to split go.mod
to another PR?
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.
I would consider moving it separate yes, as it's not directly related to updating / updating CI to test against a newer go version
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.
Okay, thanks for the feedback. Let me split and push.
917fe22
to
2434407
Compare
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.
Changes look good overall, but they need to be structured.
- Fix using deprecated ioutil.
- Switch to using golangci-lint.
- Modify ci to use matrix of go versions
One other thing, for golangci-lint it is better to use their action directly from .github/workflows rather than through make.
@austinvazquez ↑ PTAL |
Signed-off-by: Austin Vazquez <[email protected]>
@kolyshkin, let me draft up what golangci-lint through github action would look like and you can lmk your thoughts. |
2434407
to
6a5c9eb
Compare
@kolyshkin, I have split commits and changed linting to use github action. PTAL and let me know your thoughts. |
CI is failing |
Signed-off-by: Austin Vazquez <[email protected]>
Adds a Go compiler matrix to CI for testing of latest Go versions. Updates and pins to major version GitHub actions packages. Signed-off-by: Austin Vazquez <[email protected]>
6a5c9eb
to
167ffb4
Compare
Oof I've fallen victim to the go.mod issue. Moved the hack up to resolve. |
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.
LGTM
Signed-off-by: Austin Vazquez [email protected]