-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
publishing: use deps in replace directive in rules #79330
Conversation
The list of dependencies for a repo right now is equal to the list of deps mentioned in the require directive in the repo's go.mod file. This means that we loose all transitive deps mentioned in the replace directive in go.mod files. So instead use all deps mentioned in the replace directive, and prune any extra dependencies. Also add a test for this in verify-publishing-bot.py
/kind bug |
/priority important-soon |
@@ -216,8 +216,6 @@ rules: | |||
branch: master | |||
- repository: code-generator | |||
branch: master | |||
- repository: component-base | |||
branch: master |
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.
I think it was ok to have extra deps listed in rules with godeps, but with go modules it leads to an awkward go.mod file: https://github.com/kubernetes/sample-controller/blob/d4d703847b23378cf5779831533cd96175d95632/go.mod#L28
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.
Is this check by the verify script now?
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.
Yes, the "extra deps" check.
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nikhita, sttts 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 |
/test pull-kubernetes-integration (pod pending timeout) |
The list of deps in rules for a repo right now is equal to the list of deps
mentioned in the require directive in the repo's
go.mod
file.This means that we loose all transitive deps mentioned in the replace
directive in
go.mod
files.So instead use all deps mentioned in the replace directive, and prune
any extra dependencies.
Also add a test for this in
verify-publishing-bot.py
.Does this PR introduce a user-facing change?:
/assign @sttts @dims @liggitt