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

[scheduler cleanup phase 1]:Move scheduler cache interface and implementation to pkg/scheduler/in… #68968

Merged
merged 1 commit into from
Oct 6, 2018

Conversation

wgliang
Copy link
Contributor

@wgliang wgliang commented Sep 22, 2018

…ternal/cache

What this PR does / why we need it:

The scheduler’s cache implementation is not meant to be exported as a golang library outside of the scheduler. It should be moved from k8s.io/kubernetes/pkg/scheduler/cache to k8s.io/kubernetes/pkg/scheduler/internal/cache.

There are some types in the current cache package, namely NodeInfo, which should remain where they are. And all named as node package.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #68961

Special notes for your reviewer:

Release note:

Move scheduler cache interface and implementation to pkg/scheduler/internal/cache.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. 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. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 22, 2018
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 22, 2018
@wgliang wgliang changed the title Move scheduler cache interface and implementation to pkg/scheduler/in… [WIP]Move scheduler cache interface and implementation to pkg/scheduler/in… Sep 22, 2018
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 22, 2018
@wgliang wgliang force-pushed the scheduler2/cleanup-cache branch 3 times, most recently from dc3ee68 to 41f2d4d Compare September 25, 2018 00:36
@wgliang wgliang changed the title [WIP]Move scheduler cache interface and implementation to pkg/scheduler/in… Move scheduler cache interface and implementation to pkg/scheduler/in… Sep 25, 2018
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 25, 2018
@wgliang wgliang changed the title Move scheduler cache interface and implementation to pkg/scheduler/in… [scheduler cleanup phase 1]:Move scheduler cache interface and implementation to pkg/scheduler/in… Sep 25, 2018
@wgliang
Copy link
Contributor Author

wgliang commented Sep 25, 2018

/kind cleanup

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Sep 25, 2018
@wgliang wgliang force-pushed the scheduler2/cleanup-cache branch 3 times, most recently from aa5f872 to bc109ed Compare September 25, 2018 14:57
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 25, 2018
@wgliang wgliang force-pushed the scheduler2/cleanup-cache branch 3 times, most recently from 3046456 to 10b9742 Compare September 26, 2018 00:06
@k8s-ci-robot k8s-ci-robot added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Oct 3, 2018
@wgliang
Copy link
Contributor Author

wgliang commented Oct 3, 2018

/retest

@wgliang wgliang force-pushed the scheduler2/cleanup-cache branch 2 times, most recently from 2b85221 to 137d081 Compare October 4, 2018 00:41
return n.generation
}

// SetGeneration sets the generation on this node.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a comment that it is only to be used for testing. I think we can get rid of this in a future cleanup.

Copy link

@misterikkit misterikkit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 4, 2018
@misterikkit
Copy link

over to @bsalamat or @k82cn to approve.

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Oct 4, 2018

@wgliang: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-local-e2e-containerized c442316e668ed150aa80eff8ba8c413627ce3c46 link /test pull-kubernetes-local-e2e-containerized

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@wgliang
Copy link
Contributor Author

wgliang commented Oct 4, 2018

/retest

@wgliang
Copy link
Contributor Author

wgliang commented Oct 4, 2018

/ping @bsalamat @k82cn for approve

@k82cn
Copy link
Member

k82cn commented Oct 4, 2018

/approve

@@ -122,6 +122,7 @@
"k8s.io/kubernetes/pkg/scheduler/algorithm/priorities/util",
"k8s.io/kubernetes/pkg/scheduler/api",
"k8s.io/kubernetes/pkg/scheduler/cache",
"k8s.io/kubernetes/pkg/scheduler/internal/cache",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's due to a transitive dependency. Obviously that package cannot be imported by kubectl, but this line was needed to make the tooling happy.

/cc @lavalamp

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, import boss doesn't understand about internal packages.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sigh...

Copy link
Member

@apelisse apelisse Oct 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we can't do better ...
/approve

edit: doesn't seem to work from here :-)
edit-edit: Actually it does

@Huang-Wei
Copy link
Member

I think leaving the release note as NONE would be more appropriate as it's internal code refactoring.

@misterikkit
Copy link

I think leaving the release note as NONE would be more appropriate as it's internal code refactoring.

It's okay to put NONE for internal cleanup most of the time, but it doesn't hurt to to have it either. Humans will review release notes before they go out, and decide whether this should be included.

Copy link
Member

@timothysc timothysc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 6, 2018
@wgliang
Copy link
Contributor Author

wgliang commented Oct 6, 2018

It’s awful and there is a conflict. I will rebase immediately.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 6, 2018
@wgliang
Copy link
Contributor Author

wgliang commented Oct 6, 2018

Just rebse.
Need your last lgtm lable.
/ping @misterikkit

@timothysc
Copy link
Member

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: apelisse, k82cn, misterikkit, timothysc, wgliang

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

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/kubeadm area/kubectl area/kubelet cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. 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 Denotes a PR that will be considered when it comes time to generate release notes. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[scheduler cleanup phase 1]: Move scheduler cache interface and implementation to pkg/scheduler/internal/cache