Skip to content
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

Merged
merged 1 commit into from
Jun 24, 2019

Conversation

nikhita
Copy link
Member

@nikhita nikhita commented Jun 24, 2019

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?:

NONE

/assign @sttts @dims @liggitt

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
@k8s-ci-robot k8s-ci-robot added the release-note-none Denotes a PR that doesn't merit a release note. label Jun 24, 2019
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/release-eng Issues or PRs related to the Release Engineering subproject sig/release Categorizes an issue or PR as relevant to SIG Release. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jun 24, 2019
@nikhita
Copy link
Member Author

nikhita commented Jun 24, 2019

/kind bug

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Jun 24, 2019
@nikhita
Copy link
Member Author

nikhita commented Jun 24, 2019

/priority important-soon

@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jun 24, 2019
@k8s-ci-robot k8s-ci-robot requested review from dims and sttts June 24, 2019 08:45
@@ -216,8 +216,6 @@ rules:
branch: master
- repository: code-generator
branch: master
- repository: component-base
branch: master
Copy link
Member Author

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

Copy link
Contributor

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?

Copy link
Member Author

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.

@sttts
Copy link
Contributor

sttts commented Jun 24, 2019

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 24, 2019
@k8s-ci-robot
Copy link
Contributor

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 24, 2019
@nikhita
Copy link
Member Author

nikhita commented Jun 24, 2019

/test pull-kubernetes-integration

(pod pending timeout)

@k8s-ci-robot k8s-ci-robot merged commit 5fa7d85 into kubernetes:master Jun 24, 2019
@nikhita nikhita deleted the replace-deps-rules branch June 24, 2019 13:18
@liggitt liggitt added this to the v1.16 milestone Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/release Categorizes an issue or PR as relevant to SIG Release. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants