Skip to content

Conversation

@erikgb
Copy link
Member

@erikgb erikgb commented Sep 15, 2025

The Renovate gomodTidy post 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-vendor makes the Renovate run really heavy/slow. But I don't know if it can be avoided?

Copy link

Copilot AI left a 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 gomodTidy post update option for Go modules
  • Adds **/go.mod files to the post upgrade tasks that run make 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.
Copy link

Copilot AI Sep 15, 2025

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.

Suggested change
'**/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).

Copilot uses AI. Check for mistakes.
@erikgb
Copy link
Member Author

erikgb commented Sep 15, 2025

/cc @ThatsMrTalbot @hjoshi123 @inteon

@ThatsMrTalbot
Copy link

/lgtm
/approve

@cert-manager-prow
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cert-manager-prow cert-manager-prow bot merged commit 6b95dd7 into cert-manager:main Sep 15, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants