-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Disable go version updates by default #16715
Comments
I understand your position but this can also lead to regular upgrades failing whenever any dependency needs a newer version of go too. In other words if you stay on an old minimum version of go forever you'll eventually get stuck behind on most dependencies. |
I support the request of @harryzcy. The current implementation is really annoying and creates lots of issues inherent to the way There are many side-effects introduced regularly by newer go releases on how the
as the format of So I need to do manually run As the primary goal of the On some other repositories, that make use of Moreover, it's true the introduction of the generics in the 1.18 release decided a lot of project to switch to this release, but from my point of view it's pretty rare to have so interesting new features and projects are rather used to stay on a given go release forever. So the go version update introduced does more harm than good to the community, because even projects that don't require a new release of go will fail to compile with previous go releases just because renovatebot choose to make the update, by default, even if it's not required. Either the functionality should be better implemented (by updating the |
i don't agree, we need to check which command needs to be run to update the sum file, so the update works like any other go mod update. you can always disable those updates yourself or require dashboard approval to have visibility. |
If this can be acceptable for an end user project, as the only implication is that this project requires a recent compiler, what about libraries? With this option enabled by default, unconscious developers using renovatebot will force others end user projects (using renovatebot or not) to update their Of course this feature need to be fixed in renovatebot, but this is not the point here: There is no security implication to not update this value, it only reduces compatibility artificially. |
it was a community feature request/ implementation to support updating go. you can always close / ignore those PR's. or disable those updates via config. we can maybe provide a helper preset to easily disable those updates. |
It's not the feature that is criticized, but its activation by default. As @rarkins mention, people need that to perform usual modules update smoothly. And I'll be glad not to have to manually change my We ask that it be disabled by default, while a better solution is implemented. So people that need this can activate it, but knowing the implications. I can certainly disabled it on my repos, but I don't want to create thousand issues requesting to revert such changes, on dependencies I don't own, when this is unneeded. Just because the dev merge such PR without calculating the implications regarding the compatibility. The fact is the vast majority of module update can be performed without updating the |
Please provide links/references for your last sentence so we can assess. |
This is what @harryzcy writes in first post: https://go.dev/doc/modules/gomod-ref#go-syntax
minimum version is what we ask for. latest version is what renovatebot performs currently. In a project using
In a project using |
That's purely syntax, not any justification or argument. It does not alone imply that you should avoid updating it |
Will you accept a pull request implementing a smarter |
Perhaps you should consider this example: go 1.19 will be out next month. All projects (end user project and modules on which end user projects depends) will move to a But in august, who will have a go 1.19 compiler? Ubuntu users will be on 1.18 until Ubuntu 22.10 in October (and some people prefer to stay on LTS, so on go 1.18 for the next 2 years), so even if they don't need the new features, you'll impose them to download an install a new compiler without any reason... Same for Debian, Alpine, ... And your link shows that go 1.17 is still officially supported, but this renovatebot feature forces all modules/libraries to use 1.18. How can someone which is still on 1.17.12 use a github module managed by renovatebot? Also you should consider RedHat Enterprise users, they have an old go compilers in their repository (no more supported officially), some people develops for those users and fix things. They also need their dependency to be compatible with the minimum version. |
Is your concern about your own projects, or because Go module authors you rely on may use Renovate and update their modules to a version you can't support? |
Yes, this is all about Go module authors I and Go people rely on. For our own projects, the impact of this feature is negligible as we can choose to not merge it until we are ready, as always with others renovatebot PR. But the compatibility we are talking about is Github authors who merge this without knowing their work is used by people that can't update their compiler for any reason: as this creates artificial incompatibility with older go release. If this feature is disabled by default, people can be warned that if they write go module used by others, they shouldn't use this feature. The best world would be |
@bcmills you have provided valuable recommendations here in the past, hope you don't mind me @'ing you here. You can perhaps skip the above content if you wish, as I will summarize here:
BTW I think this also raises an interesting difference between how the npm ecosystem and Go ecosystem treat compatibility and breaking changes. Today, many/most npm package authors increment a major version whenever they drop support for an old version of Node.js. However, there is no such guideline - or practice to my awareness - of Go modules bumping a major version whenever they drop support for older versions of Go. |
The Instead, I would think of the It also isn't strictly necessary to update your Personally, I would recommend setting the |
Thanks @bcmills. Considering that a Setting aside automation, let's say that a module author wants to do the "right thing" in the ecosystem. In that case would it be:
|
If that helps anyone: for now, if you would like to opt-out, you can use a package rule: {
"packageRules": [
{
"description": "Opt-out minimum Go version updates: https://github.com/renovatebot/renovate/issues/16715",
"matchManagers": ["gomod"],
"matchDepTypes": ["golang"],
"enabled": false
}
]
} |
Just got hit by this. Renovate just updated Go version in the go.mod files in our manually vendored third-party dependencies and merged everything. We also are using Nix + nix-shell for local development, where we pin the version of all the tools, including Go. And for now it's Go 1.18. Upgrading this requirement automatically now prevents us from interacting with modules using Also, AFAIK, Go 1.19 doesn't bring new features that would require setting 1.19 in the I believe, that having this enabled automatically and by default might have some undesired implications for the overall community. E.g. if you maintain a library that other people use, and you do this, then you just blocked all the people from being able to use the library without upgrading their version of Go. And I agree with the statement that there's no need to require latest versions without really needing (like if you want to do a package using generics, you must require at least Go 1.18). |
Maybe we need to do this:
In turn this would mean:
|
Need to support non-latest Go version as a library. renovatebot/renovate#16715
Need to support non-latest Go version as library. renovatebot/renovate#16715
I think the proposed workaround (above) is wrong, won't that turn off all go updates? The way I worked around this was: "golang": {
"packageRules": [
{
"matchDatasources": ["golang-version"],
"enabled": false
},
"...other rules..."
]
} |
No, the type in "matchDepTypes": ["golang"], The type for Go modules in a The rule you shared is wider and would block any updates from the mentioned datasource, even outside the |
Doesn't being under a top-level "golang" object guarantee it only applies to golang stuffs? |
(not trying to argue, trying to understand Renovate configuration better) |
Oh okay, I think I follow now. So this will work for us then (since we have a bunch of other golang rules): "golang": {
"packageRules": [
{
"matchDepTypes": ["golang"],
"enabled": false
},
"...other rules..."
]
} |
|
don't nest package rules, it will/ can have unwanted side effects |
Need to support non-latest Go version as library. renovatebot/renovate#16715
Thanks for the tip. And thanks @maxbrunet for the explanation. |
Is this plan by the maintainer enough to get to |
🎉 This issue has been resolved in version 34.61.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This is now rolled out in the app and is autoclosing Go upgrades as expected, e.g. https://togithub.com/pion/logging/pull/85 |
How are you running Renovate?
Mend Renovate hosted app on github.com
If you're self-hosting Renovate, tell us what version of Renovate you run.
No response
Please select which platform you are using if self-hosting.
No response
If you're self-hosting Renovate, tell us what version of the platform you run.
No response
Was this something which used to work for you, and then stopped?
It used to work, and then stopped
Describe the bug
A recent change #16541 cause renovate to update go version in
go.mod
by default, which shouldn't be the case.Per go.mod file reference, version should be the minimum version supported, not an update-to-date one. So the feature to update go version should be disabled by default, and only enabled via configurations.
Relevant debug logs
No response
Have you created a minimal reproduction repository?
No reproduction repository
The text was updated successfully, but these errors were encountered: