Add a validation script to verify go.mod is in sync with k/k
sbueringer opened this issue · comments
xref: #2765 (comment)
Idea is to verify on PRs (pre-submit) that our go.mod file doesn't go out of sync with Kubernetes (with the k/k version we use). The goal is to avoid issues like this: #2742 which can easily sneak in when we just merge dependabot PRs.
(we might want to consider exceptions for a few dependencies like ginkgo / gomega but that is TBD)
/assign
@sbueringer I created a small tool to verify go.mod and added it to the verify-modules
make target. To proceed with enabling this verification in PRs, is it better to create a new dedicated workflow? Or add the tool to kubernetes-sigs/kubebuilder-release-tools?
We already run make verify-modules as part of our test job (https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_controller-runtime/2774/pull-controller-runtime-test/1779757108166660096).
This should be fine