Skip to content

CI workflow appears to be pulling wrong version of golangci-lint #2214

Closed

Description

@mromaszewicz

Have a look at this CI failure:
https://github.com/oapi-codegen/oapi-codegen/actions/runs/21879432203/job/63258545257?pr=2211

The issue is that a Go 1.26 runtime is running a Go 1.25 linter, and there's a panic due to Golang and linter version mismatch. Funny thing is, previous CI runs on different PR's succeeded ok.

I've retriggered this one, so it's not a transient error. Something must have changed upstream in the linter.

This is the danger of dynamically fetching dependencies, they can change. I'll dig into how we can pin ourselves to a specific version or maybe cache an artifact and only update when needed.

Activity

  1. jamietanna commented on Feb 11, 2026

    @jamietanna
    Member

    That's odd - we're pinning the version of golangci-lint to 2.6.0, so we should be getting the relevant Go 1.25-built binary

    I'm unsure why #2211 is triggering this, as I don't see anything Go 1.26 specific - but I didn't realise today Go 1.26 was released, which may be why we're now hitting that for stable 🫣

  2. jamietanna commented on Feb 11, 2026

    @jamietanna
    Member

    I'd be happy us relaxing the "lint on every version of Go" - we should test on stable, at least, which will correspond to Go 1.26 as of today - we'll need to wait for a golangci-lint version bump (to support Go 1.26+) first

  3. mromaszewicz commented on Feb 11, 2026

    @mromaszewicz
    MemberAuthor

    What if, until then, we simply run the lint on Go 1.25? The output will be the same, it's the linter version, 2.6.0, which governs output.

  4. mromaszewicz commented on Feb 11, 2026

    @mromaszewicz
    MemberAuthor

    It looks like golangci-lint isn't ready just yet, and our CI is broken.

    So, first step, we can parameterize the versions of Go used to lint the codebase:
    oapi-codegen/actions#7

    Once that's in, we can push a release and update the CI for this repo.

  5. mromaszewicz commented on Feb 12, 2026

    @mromaszewicz
    MemberAuthor

    That's odd - we're pinning the version of golangci-lint to 2.6.0, so we should be getting the relevant Go 1.25-built binary

    I'm unsure why #2211 is triggering this, as I don't see anything Go 1.26 specific - but I didn't realise today Go 1.26 was released, which may be why we're now hitting that for stable 🫣

    I just ran a test on my mac. I installed the Go 1.26 tool chain and tried to run golangci-lint 2.6.0 and it crashes in the same way. It actually pokes into the runtime installed on your system to do its work, therefore, you can not have a more recent Go version installed on your system than the version with which golangci-lint was compiled with. I did not did deeper, but it's a strange choice.

    2.6.0 was compiled with 1.25.3 so can't run it on 1.26 and I doubt they'll ever go recompile their old versions. I'm going to send a PR to limit our lint run to Go 1.25 only. We can update it every once in a while as new versions come out. It needs to match the version of the golangci-lint which we are running.

  6. added a commit that references this issue on Feb 12, 2026
    de828cb
  7. added a commit that references this issue on Feb 13, 2026
    db8d6b5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions