Skip to content

Require at least golang 1.23#561

Merged
jnovy merged 1 commit intocontainers:mainfrom
jnovy:go-bump-1.22
Aug 11, 2025
Merged

Require at least golang 1.23#561
jnovy merged 1 commit intocontainers:mainfrom
jnovy:go-bump-1.22

Conversation

@jnovy
Copy link
Collaborator

@jnovy jnovy commented May 5, 2025

No description provided.

@jnovy jnovy requested a review from haircommander May 5, 2025 14:31
@kolyshkin
Copy link
Collaborator

@jnovy you need to run go mod tidy after bumping go version in go.mod.

@kolyshkin
Copy link
Collaborator

Also, go 1.22 is no longer supported since go 1.24 is out (i.e. since February 2025).

@jnovy
Copy link
Collaborator Author

jnovy commented May 7, 2025

Thanks @kolyshkin - silly me forgetting this.

For golang-1.24 we have a bit of a chicken and egg problem - it still hasn't landed to major current distros. E.g we have still go-1.23.6 in CentOS/RHEL.

@rhatdan
Copy link
Member

rhatdan commented Jun 1, 2025

@jnovy Still working on this? At least use go mod tidy

@jnovy
Copy link
Collaborator Author

jnovy commented Jun 2, 2025

Go mod tidy was already done, maybe it makes sense to bump it even more to golang 1.23 now.

@kolyshkin
Copy link
Collaborator

Go mod tidy was already done, maybe it makes sense to bump it even more to golang 1.23 now.

Yes please

@kolyshkin
Copy link
Collaborator

@jnovy please

@jnovy
Copy link
Collaborator Author

jnovy commented Jul 16, 2025

@kolyshkin Maybe we should make this part of your #569 ?

@jnovy
Copy link
Collaborator Author

jnovy commented Aug 7, 2025

@kolyshkin PTAL - golang requirement is now updated to 1.24

@jnovy jnovy changed the title Require golang 1.22 Require golang 1.24 Aug 7, 2025
@jnovy jnovy added the jira label Aug 7, 2025
alljournalout, err := getConmonJournalOutput(pid, -1)
Expect(err).To(BeNil())
fmt.Fprintf(GinkgoWriter, alljournalout+"\n")
fmt.Fprintf(GinkgoWriter, "%s\n", alljournalout)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps it's better/simpler to use fmt.Fprintln here?

Suggested change
fmt.Fprintf(GinkgoWriter, alljournalout+"\n")
fmt.Fprintf(GinkgoWriter, "%s\n", alljournalout)
fmt.Fprintln(GinkgoWriter, alljournalout)

@kolyshkin
Copy link
Collaborator

Currently supported Go versions are 1.23 and 1.24. This will change soon (this month) when Go 1.25 is released.

But for now, I guess, we need to support both Go 1.23 and 1.24.

@jnovy jnovy force-pushed the go-bump-1.22 branch 2 times, most recently from c963ea1 to 17d0f89 Compare August 8, 2025 10:24
@packit-as-a-service
Copy link

Ephemeral COPR build failed. @containers/packit-build please check.

@jnovy
Copy link
Collaborator Author

jnovy commented Aug 8, 2025

@kolyshkin Thanks, I updated the printf statements, I think it's fair to update to 1.25 soon but merge this one first.

@jnovy jnovy requested a review from kolyshkin August 8, 2025 10:26
@jnovy jnovy force-pushed the go-bump-1.22 branch 2 times, most recently from cbc2911 to e1d514f Compare August 8, 2025 13:06
@kolyshkin
Copy link
Collaborator

@kolyshkin Thanks, I updated the printf statements, I think it's fair to update to 1.25 soon but merge this one first.

That's not what I meant. Let me try again.

The go <version> directive in go.mod specifies the minimally required go version. This means that anything older is not supported.

So we should not use 1.24 in there (as we still want 1.23 to be supported), and we should not switch it to 1.25 as soon as it's out (we still want 1.24 to be supported).

In general, we should be conservative here, meaning at the very least support all officially supported Go versions (those are 1.23 and 1.24 now). Meaning, today I would put go 1.23 to go.mod, not go 1.24.

Updated go.mod to require Go 1.23 and fixed format string issues
in tests to comply with stricter Go requirements.

Also update test image to Fedora 42 to ensure it runs recent golang.

Fix broken dnf syntax in integration test.

Signed-off-by: Jindrich Novy <jnovy@redhat.com>
@jnovy jnovy changed the title Require golang 1.24 Require at least golang 1.23 Aug 11, 2025
@jnovy jnovy merged commit 83cfddd into containers:main Aug 11, 2025
29 of 30 checks passed
@jnovy
Copy link
Collaborator Author

jnovy commented Aug 11, 2025

Ok, merging with requiring at least go 1.23 to continue with your PR.

@jnovy jnovy deleted the go-bump-1.22 branch September 1, 2025 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants