Skip to content

chore: Update CI Go versions#9

Open
mromaszewicz wants to merge 2 commits intooapi-codegen:mainfrom
mromaszewicz:chore/go-versions
Open

chore: Update CI Go versions#9
mromaszewicz wants to merge 2 commits intooapi-codegen:mainfrom
mromaszewicz:chore/go-versions

Conversation

@mromaszewicz
Copy link
Member

With Go 1.26 releasing, we're advancing our supported Go versions to [1.24, 1.25, and 1.26]. I removed "stable" and "oldstable" since they overlap with "1.26" and "1.25", respectively, and it doesn't make sense to double up on the CI. New versions of Go happen so seldom, and we change this requirement so infrequently, that I think it's ok to use fixed versions.

With Go 1.26 releasing, we're advancing our supported Go versions
to [1.24, 1.25, and 1.26]. I removed "stable" and "oldstable" since
they overlap with "1.26" and "1.25", respectively, and it doesn't
make sense to double up on the CI. New versions of Go happen so seldom,
and we change this requirement so infrequently, that I think it's ok
to use fixed versions.
@mromaszewicz mromaszewicz requested a review from jamietanna March 2, 2026 19:02
- id: versions
run: |
# versions of Go that this module can still be built with (and therefore are "supported" by this project) and actively supported versions of Go
all_versions='["1.22", "1.23", "1.24", "1.25", "stable", "oldstable"]'
Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer we keep stable and oldstable` - yes we don't change that often, but also between release day and when we next update these versions, it does allow us to make sure we're testing the relevant versions

Copy link
Member Author

Choose a reason for hiding this comment

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

How about, then, replacing 1.25 and 1.26 with oldstable and stable, and then, when go 1.27 comes out, we'll start missing go 1.25 coverage until we can patch this code, but it would have been well tested up until that point, so it's no omission.

Copy link
Member Author

Choose a reason for hiding this comment

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

Have a look at what I did - we can query all the Go versions that are released after a minimum cutoff, so we can dynamically discover the full list.

What I don't like is running 2 precommit builds per PR redundantly. I'm fine going back to that, if you think this is too complex. Have a look at the 2nd commit in the PR for the change. I can back it out and replace with stable and oldstable in the list if you really like it that way.

Instead of maintaining a hardcoded list of Go versions, fetch stable
releases from https://go.dev/dl/?mode=json and test all minor versions
at or above a configurable minimum (default 1.24). New Go releases are
picked up automatically without workflow changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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