-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Go directive in go.mod not updated when a new dependency requires it #9527
Comments
I just noticed for the first time in a dependabot PR that it's setting the I think which toolchain version is recommended should be a per project decision as there may be subtle differences in behavior. From what I read on https://go.dev/ref/mod#go-mod-file-toolchain the toolchain is set by the go command now automatically based on it's own version. If people agree that the toolchain choice depends on the project this could be an issue for projects like dependabot. Options I see right now are:
LMK if this is unrelated to this issue, I can move it to a new one. |
Piecing together the bits that were seen in the original post: per the Dockerfile
running
Next it looks like |
I see some more context/discussion around the From that thread: dependabot could control updates to the |
Hi everyone,
And looking into the bot code it seems to be reverting this change made by dependabot-core/go_modules/lib/dependabot/go_modules/file_updater/go_mod_updater.rb Line 169 in 313fcff
What would be the recommended way to fix the error above? |
Is there an existing issue for this?
Package ecosystem
go_module
Package manager version
No response
Language version
Go 1.22.0
Manifest location and content before the Dependabot update
No response
dependabot.yml content
Source: https://github.com/utilitywarehouse/manifest-checkers/blob/main/.github/dependabot.yml
Updated dependency
k8s.io/apimachinery
fromv0.29.3
tov0.30.0
What you expected to see, versus what you actually saw
What I expected to see: dependency is updated, the update includes a change that means the dependency requires
go 1.22.0+
so I expectdependabot
to update thego
directive ingo.mod
to reflect this, likego get
does:The diff produced by
dependabot
(see: utilitywarehouse/manifest-checkers#20):This causes issues, e.g. running
go test ./...
errors withgo: updates to go.mod needed; to update it:
Native package manager behavior
See above
Images of the diff or a link to the PR, issue, or logs
Links in expected behaviour above
Smallest manifest that reproduces the issue
No response
The text was updated successfully, but these errors were encountered: