rancher / renovate-config

3 stars 5 forks source link

Renovate go mod bumps result in `go get -d -t ./...` failures #272

Open thardeck opened 2 months ago

thardeck commented 2 months ago

We had at least two go mod bump prs by renovate where renovate itself realized that there was an issue but still created them.

https://github.com/rancher/fleet/pull/2304

Command failed: go get -d -t ./...
go: github.com/imdario/mergo@v1.0.0: parsing go.mod:
    module declares its path as: dario.cat/mergo
            but was required as: github.com/imdario/mergo

https://github.com/rancher/fleet/pull/2305

Command failed: go get -d -t ./...
go: gopkg.in/go-playground/webhooks.v6@v6.3.0: parsing go.mod:
    module declares its path as: github.com/go-playground/webhooks/v6
            but was required as: gopkg.in/go-playground/webhooks.v6
pjbgf commented 2 months ago

This is a very specific issue: a dependency changing its module name. IMO these cases are best handled manually.

Now the question is, should a PR be created for this or not? Given that this is configurable via prCreation, I think each team can use whatever option it works best for them. So to avoid noise from failing PRs a team can change their .github/renovate.json to contain: "prCreation": "status-success".

But by default, I think we should continue to open those PRs so at least teams know that there is a dependency to be updated and it contains breaking changes, however they will need to manually create a superseding PR for it.

thardeck commented 1 month ago

@pjbgf just for the records I have another example: https://github.com/rancher/fleet/pull/2447

Command failed: go get -d -t ./...
go: downloading sigs.k8s.io/controller-tools v0.15.0
go: downloading k8s.io/client-go v0.30.1
[...]
go: downloading sigs.k8s.io/kustomize/kyaml v0.17.1
go: downloading sigs.k8s.io/kustomize v2.0.3+incompatible
go: github.com/rancher/fleet/internal/cmd/controller/imagescan/update imports
    sigs.k8s.io/kustomize/kyaml/setters2: cannot find module providing package sigs.k8s.io/kustomize/kyaml/setters2
go: github.com/rancher/fleet/cmd/codegen imports
    github.com/rancher/wrangler/v2/pkg/controller-gen/args imports
    k8s.io/code-generator/cmd/client-gen/path: cannot find module providing package k8s.io/code-generator/cmd/client-gen/path