Skip to content

downgrade Go version from 1.26.0 to 1.25.8#756

Merged
ilopezluna merged 1 commit into
mainfrom
downgrade-go-version
Mar 17, 2026
Merged

downgrade Go version from 1.26.0 to 1.25.8#756
ilopezluna merged 1 commit into
mainfrom
downgrade-go-version

Conversation

@ilopezluna
Copy link
Copy Markdown
Contributor

required to bump DMR in DD to latest version

@ilopezluna ilopezluna requested a review from a team March 17, 2026 10:26
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • Go version is hard-coded in multiple places (three workflows, Dockerfiles, Makefile, go.mod); consider centralizing it via a reusable workflow input or a shared build arg/variable to avoid divergence on the next version change.
  • The Dockerfile and CLI Dockerfile use ARG GO_VERSION=1.25 while the Makefile/go.mod use 1.25.8; if the intent is to pin to a specific patch version everywhere, consider aligning these to avoid subtle differences between local builds and container builds.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Go version is hard-coded in multiple places (three workflows, Dockerfiles, Makefile, go.mod); consider centralizing it via a reusable workflow input or a shared build arg/variable to avoid divergence on the next version change.
- The Dockerfile and CLI Dockerfile use `ARG GO_VERSION=1.25` while the Makefile/go.mod use `1.25.8`; if the intent is to pin to a specific patch version everywhere, consider aligning these to avoid subtle differences between local builds and container builds.

## Individual Comments

### Comment 1
<location path="go.mod" line_range="3" />
<code_context>
 module github.com/docker/model-runner

-go 1.26.0
+go 1.25.8

 require (
</code_context>
<issue_to_address>
**issue (bug_risk):** The `go` directive should use only major.minor (e.g., `go 1.25`) rather than a full patch version.

Using a patch version in `go.mod` will cause `go` tooling errors (e.g., `invalid go version`). Please change this to `go 1.25` and keep the specific patch level (1.25.8) enforced via CI/Docker or other tooling instead.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread go.mod
module github.com/docker/model-runner

go 1.26.0
go 1.25.8
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

issue (bug_risk): The go directive should use only major.minor (e.g., go 1.25) rather than a full patch version.

Using a patch version in go.mod will cause go tooling errors (e.g., invalid go version). Please change this to go 1.25 and keep the specific patch level (1.25.8) enforced via CI/Docker or other tooling instead.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request aims to downgrade the Go version. However, both the original version (1.26.0) and the new version (1.25.8) are not existing Go releases. This is a critical issue that will cause build failures for anyone using standard Go toolchains or Docker, as the specified Go versions and corresponding Docker images do not exist. I've added comments to all affected files pointing out this issue. Please correct the Go version to a valid, released version across all files.

Comment thread Dockerfile
Comment thread Makefile
Comment thread cmd/cli/Dockerfile
Comment thread go.mod
Copy link
Copy Markdown
Contributor

@doringeman doringeman left a comment

Choose a reason for hiding this comment

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

LGTM!

$ ./scripts/sync-go-version.sh check
Go version from go.mod: 1.25.8

Checking Go version consistency...

All files are in sync.

@ilopezluna ilopezluna merged commit 32d8183 into main Mar 17, 2026
14 checks passed
@ilopezluna ilopezluna deleted the downgrade-go-version branch March 17, 2026 12:44
@thaJeztah
Copy link
Copy Markdown
Member

Was the problem that go.mod required go1.26? If that's the case, then a good option is also to keep the version in go.mod at an older version (generally "latest" and "latest-1" are supported by upstream Go), and for CI you can specify the version separately; also look at;

@doringeman
Copy link
Copy Markdown
Contributor

Thanks! Yes, we downgraded so we can import it in projects that still use 1.25. I'm totally fine with using 1.25, too.

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