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

Move predicate types from algorithm to predicates #71978

Merged
merged 1 commit into from Dec 22, 2018

Conversation

@denkensk
Copy link
Contributor

denkensk commented Dec 12, 2018

What type of PR is this?
/kind cleanup
/sig scheduling

What this PR does / why we need it:
The predicate types in pkg/scheduler/algorithm (FitPredicate, PredicateMetadata, etc.) should be moved to the package that implements these types, pkg/scheduler/algorithm/predicates. This is a relatively minor change, but having all the predicate stuff in one package will make it easier to refactor in future cleanup.

Which issue(s) this PR fixes:
Fixes #71864
Addresses #68951

Special notes for your reviewer:
@misterikkit

none
@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Dec 12, 2018

Hi @denkensk. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@@ -84,8 +85,9 @@ type ScheduleAlgorithm interface {
Preempt(*v1.Pod, NodeLister, error) (selectedNode *v1.Node, preemptedPods []*v1.Pod, cleanupNominatedPods []*v1.Pod, err error)
// Predicates() returns a pointer to a map of predicate functions. This is
// exposed for testing.
Predicates() map[string]FitPredicate
Predicates() map[string]predicates.FitPredicate

This comment has been minimized.

@denkensk

denkensk Dec 12, 2018

Contributor

@misterikkit There is an import loop because pkg/scheduler/algorithm import pkg/scheduler/algorithm/predicates.

@denkensk

This comment has been minimized.

Copy link
Contributor

denkensk commented Dec 12, 2018

@k8s-ci-robot k8s-ci-robot requested a review from misterikkit Dec 12, 2018

@denkensk denkensk force-pushed the denkensk:move-predicate-types branch from a72d46e to 60fb4ec Dec 15, 2018

@denkensk denkensk force-pushed the denkensk:move-predicate-types branch 5 times, most recently from 703c4a6 to 5cf752e Dec 15, 2018

@denkensk denkensk changed the title [WIP] Move predicate types from algorithm to predicates Move predicate types from algorithm to predicates Dec 15, 2018

@k82cn

This comment has been minimized.

Copy link
Member

k82cn commented Dec 15, 2018

/ok-to-test

@denkensk denkensk force-pushed the denkensk:move-predicate-types branch from 5cf752e to b066701 Dec 15, 2018

@denkensk denkensk force-pushed the denkensk:move-predicate-types branch 2 times, most recently from 9c1b936 to d9211a7 Dec 19, 2018

@denkensk

This comment has been minimized.

Copy link
Contributor

denkensk commented Dec 19, 2018

/test pull-kubernetes-local-e2e-containerized

@misterikkit
Copy link
Contributor

misterikkit left a comment

/lgtm

@bsalamat
Copy link
Contributor

bsalamat left a comment

/lgtm
/approve

@denkensk

This comment has been minimized.

Copy link
Contributor

denkensk commented Dec 20, 2018

/retest

@denkensk

This comment has been minimized.

Copy link
Contributor

denkensk commented Dec 20, 2018

/test pull-kubernetes-local-e2e-containerized

@misterikkit

This comment has been minimized.

Copy link
Contributor

misterikkit commented Dec 20, 2018

/assign @k82cn for daemonset approval.
/cc @kubernetes/sig-node-pr-reviews for kubelet approval

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Dec 20, 2018

@misterikkit: GitHub didn't allow me to request PR reviews from the following users: approval, for, kubelet.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/assign @k82cn for daemonset approval.
/cc @kubernetes/sig-node-pr-reviews for kubelet approval

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.

@vikaschoudhary16

This comment has been minimized.

Copy link
Member

vikaschoudhary16 commented Dec 21, 2018

/lgtm

@denkensk denkensk force-pushed the denkensk:move-predicate-types branch from d9211a7 to b82a1d4 Dec 21, 2018

@k8s-ci-robot k8s-ci-robot removed the lgtm label Dec 21, 2018

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Dec 21, 2018

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

Test name Commit Details Rerun command
pull-kubernetes-local-e2e-containerized b82a1d4 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.

@yujuhong

This comment has been minimized.

Copy link
Contributor

yujuhong commented Dec 21, 2018

/approve
for changes in the kubelet package

@k82cn

This comment has been minimized.

Copy link
Member

k82cn commented Dec 21, 2018

/approve

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Dec 21, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bsalamat, denkensk, k82cn, yujuhong

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

@denkensk

This comment has been minimized.

Copy link
Contributor

denkensk commented Dec 22, 2018

There is a conflict. Just rebase. Need your last lgtm lable. /ping @misterikkit thank you~~

@misterikkit

This comment has been minimized.

Copy link
Contributor

misterikkit commented Dec 22, 2018

/lgtm
happy (early) new year 🎆

@k8s-ci-robot k8s-ci-robot added the lgtm label Dec 22, 2018

@k8s-ci-robot k8s-ci-robot merged commit 37dc678 into kubernetes:master Dec 22, 2018

18 of 19 checks passed

pull-kubernetes-local-e2e-containerized Job failed.
Details
cla/linuxfoundation denkensk authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gke Skipped
pull-kubernetes-e2e-kops-aws Job succeeded.
Details
pull-kubernetes-e2e-kubeadm-gce Skipped
pull-kubernetes-godeps Skipped
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
tide In merge pool.
Details
@hobbeslee

This comment has been minimized.

Copy link

hobbeslee commented Jan 1, 2019

@denkensk denkensk deleted the denkensk:move-predicate-types branch Jan 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment