Skip to content

Conversation

@nalind
Copy link
Member

@nalind nalind commented Sep 10, 2025

What type of PR is this?

/kind other

What this PR does / why we need it:

Update to require Go 1.24, at minimum, now that Go 1.25 is out and 1.23 is no longer supported. Run the "modernize" tool to adopt some newer APIs.

How to verify it

The usual battery of tests.

Which issue(s) this PR fixes:

This should unblock a number of dependency update PRs.

Special notes for your reviewer:

Does this PR introduce a user-facing change?

None

Update the version of Go we suggest in go.mod to 1.24, and update the
one we use for the vendoring CI test to match.

Signed-off-by: Nalin Dahyabhai <[email protected]>
Use the CutPrefix(), SplitSeq(), and FieldsSeq() functions from the
strings package when chopping up or iterating over parts of strings, per
golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize

Signed-off-by: Nalin Dahyabhai <[email protected]>
Use maps.Copy() instead of iterating over a map's keys and values to
copy the keys and values to a new map.  Overdue from
golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize

Signed-off-by: Nalin Dahyabhai <[email protected]>
Drop the "omitempty" tag from the "json" tag on struct members that are
themselves structs, since the JSON encoder doesn't actually do that, per
golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize

Signed-off-by: Nalin Dahyabhai <[email protected]>
Yes, this helper function always returns nil as one of its results, but
that lets the callers not have to remember to do that, so it's shorter
than changing the call sites.

Signed-off-by: Nalin Dahyabhai <[email protected]>
Signed-off-by: Nalin Dahyabhai <[email protected]>
When checking that certain directories are masked, treat the
readable-but-empty case as acceptable, as before, and now also accept
actually-unreadable case, which can happen with crun 1.24.

Signed-off-by: Nalin Dahyabhai <[email protected]>
run_buildah run $cid ls $mask
expect_output "" "Directories should be empty"
run_buildah run $cid sh -c "echo $mask/*" # globbing will fail whether it's simply unreadable, or readable but empty
expect_output "$mask/*" "Directories should be empty"
Copy link
Member Author

Choose a reason for hiding this comment

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

I'll fix this spaces-and-tabs mess if this PR needs to be revised.

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 15, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Luap99, nalind

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

@Luap99
Copy link
Member

Luap99 commented Sep 15, 2025

@flouthoc PTAL

@TomSweeneyRedHat
Copy link
Member

LGTM

@TomSweeneyRedHat
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Sep 15, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 48ac541 into containers:main Sep 15, 2025
40 checks passed
@nalind nalind deleted the go1.24 branch September 16, 2025 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants