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 go 1.22 #5715

Merged
merged 4 commits into from
Sep 4, 2024
Merged

Update to go 1.22 #5715

merged 4 commits into from
Sep 4, 2024

Conversation

Luap99
Copy link
Member

@Luap99 Luap99 commented Sep 3, 2024

What type of PR is this?

/kind api-change
/kind bug
/kind cleanup
/kind deprecation
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

/kind other

What this PR does / why we need it:

Update golang so we can keep updating dependecies

How to verify it

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Buildah now requires go 1.22 to build.

Signed-off-by: Paul Holzinger <[email protected]>
The fedora version where wrong in the name causing the task names to
show the wrong distro versions.

Signed-off-by: Paul Holzinger <[email protected]>
The golang version is not new enough, this needs to be turned back on
when we upgrade VMs to f41/40 so it is only commented out.

Signed-off-by: Paul Holzinger <[email protected]>
Fedora 39 and epel 9 contains go 1.21 which we no longer build on,
fedora 39 will likely never be updated but epel 9 should get a golang
update at some point.

Signed-off-by: Paul Holzinger <[email protected]>
@Luap99
Copy link
Member Author

Luap99 commented Sep 3, 2024

@edsantiago @nalind PTAL

@rhatdan
Copy link
Member

rhatdan commented Sep 3, 2024

LGTM

Copy link
Member

@edsantiago edsantiago left a comment

Choose a reason for hiding this comment

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

LGTM with one question

@@ -1,21 +1,8 @@
module github.com/containers/buildah

// Minimum required golang version
go 1.21.0 // ***** ATTENTION WARNING CAUTION DANGER ******
// Warning: Ensure the "go" and "toolchain" versions match exactly to prevent unwanted auto-updates
Copy link
Member

Choose a reason for hiding this comment

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

Will it be obvious to future maintainers what "toolchain" means? The string "toolchain" does not appear anywhere else in this file. My guess was, this means test/tools/go.mod, but that file has go 1.21

Copy link
Member Author

Choose a reason for hiding this comment

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

It is the same comment we have in podman and c/common and yes a go dev should now what these mean I would say, https://go.dev/doc/modules/gomod-ref#toolchain
Though I am happy to alter this comment to something else that makes it more clear, generally speaking we never want toolchain to be newer than the go version and it seems at some point the go vendor process decided to not add toolchain if it matches the exact go version, i.e. if we try to add toolchain go1.22.0 make vendor removes it again. Only if you have something like toolchain go1.22.1 it stays but this is not something we want.

So I guess we should simplify this comment and say we never ever want a toolchain directive in this file.

Copy link
Member Author

Choose a reason for hiding this comment

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

Can you merge this for now?
I have some outstanding discussions around the handling of patch versions in the go line with @mtrmac so I like to wait for whatever we decide on and then update the comments based on that

@edsantiago
Copy link
Member

/lgtm

@edsantiago
Copy link
Member

/approve

@edsantiago
Copy link
Member

Looks like I don't have approve privs in this repo

@rhatdan
Copy link
Member

rhatdan commented Sep 4, 2024

/approve

Copy link
Contributor

openshift-ci bot commented Sep 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: edsantiago, Luap99, rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Sep 4, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 101d5ea into containers:main Sep 4, 2024
33 checks passed
@Luap99 Luap99 deleted the go-1.22 branch September 4, 2024 12:56
@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators Dec 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants