-
Notifications
You must be signed in to change notification settings - Fork 1
Run 'make generate' on all go.mod updates #20
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
Conversation
Signed-off-by: Erik Godding Boye <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR modifies Renovate configuration to handle multi-module Go projects by replacing the gomodTidy post update option with a more comprehensive approach that runs make generate on all go.mod updates.
- Removes the
gomodTidypost update option for Go modules - Adds
**/go.modfiles to the post upgrade tasks that runmake generate - Includes a comment acknowledging the dependency on makefile-modules
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| }, | ||
| { | ||
| matchFileNames: [ | ||
| '**/go.mod', // This will break all projects using this preset, but not makefile-module. |
Copilot
AI
Sep 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment states this will break projects not using makefile-modules, but the change is being implemented anyway. Consider either: 1) Creating a separate preset for makefile-modules projects, 2) Adding conditional logic to check for makefile presence, or 3) Updating the comment to explain the rationale for this breaking change and migration path for affected projects.
| '**/go.mod', // This will break all projects using this preset, but not makefile-module. | |
| '**/go.mod', | |
| '**/Makefile', // Only run postUpgradeTasks if both go.mod and Makefile are present (proxy for makefile-modules usage). |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ThatsMrTalbot The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The Renovate
gomodTidypost update option is not enough for dealing with multi-module Go projects. Example failing PR: cert-manager/csi-lib#114.I wish multi-module projects were better supported in Go, and not "bolted on", as it appears to be now.
Ref. the comment I added, I would prefer to avoid tying this even more to makefile-modules, as it will make the preset unusable in projects not using makefile-modules. https://github.com/cert-manager/sample-external-issuer is such an example. I think the workaround will be to just not use this preset when makefile-modules is not enabled on the project.
Also, the currently required
make go-vendormakes the Renovate run really heavy/slow. But I don't know if it can be avoided?