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

Refactor scheduler's framework permit API #83756

Merged
merged 1 commit into from
Oct 19, 2019

Conversation

hex108
Copy link
Contributor

@hex108 hex108 commented Oct 11, 2019

What type of PR is this?
/kind feature

What this PR does / why we need it:
As said in #82385:

At the high-level, we need to change the permit API so that an accept is done for a specific plugin, and the pod will be accepted only after all plugins that issued wait get an accept. We also may want to keep adjusting the timeout every time the pod gets accepted by a plugin

Design doc: https://docs.google.com/document/d/1ftrPlERI5GVzWh0qAM_fChrhcpsBTYyyCleVvmMNEJ4/edit?usp=sharing

Which issue(s) this PR fixes:

Fixes #82385

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Refactor scheduler's framework permit API.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


/sig scheduling

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Oct 11, 2019
@k8s-ci-robot k8s-ci-robot added area/test sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Oct 11, 2019
@hex108
Copy link
Contributor Author

hex108 commented Oct 11, 2019

/retest

Copy link
Contributor

@Adirio Adirio left a comment

Choose a reason for hiding this comment

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

Some minor tweaks

pkg/scheduler/framework/v1alpha1/waiting_pods_map.go Outdated Show resolved Hide resolved
pkg/scheduler/framework/v1alpha1/waiting_pods_map.go Outdated Show resolved Hide resolved
pkg/scheduler/framework/v1alpha1/waiting_pods_map.go Outdated Show resolved Hide resolved
pkg/scheduler/framework/v1alpha1/waiting_pods_map.go Outdated Show resolved Hide resolved
Copy link
Contributor

@Adirio Adirio left a comment

Choose a reason for hiding this comment

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

LGTM

@hex108
Copy link
Contributor Author

hex108 commented Oct 11, 2019

/assign @ahg-g

@hex108
Copy link
Contributor Author

hex108 commented Oct 17, 2019

/retest

@liu-cong
Copy link
Contributor

/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 18, 2019
Copy link
Member

@ahg-g ahg-g left a comment

Choose a reason for hiding this comment

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

can you add a test that tests multiple permit plugins returning wait for the same pod?

pkg/scheduler/framework/v1alpha1/interface.go Show resolved Hide resolved
@ahg-g
Copy link
Member

ahg-g commented Oct 18, 2019

This is great by the way.

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

hex108 commented Oct 19, 2019

Add a test. PTAL @ahg-g

Copy link
Member

@ahg-g ahg-g left a comment

Choose a reason for hiding this comment

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

couple of nits

test/integration/scheduler/framework_test.go Outdated Show resolved Hide resolved
test/integration/scheduler/framework_test.go Outdated Show resolved Hide resolved
@ahg-g
Copy link
Member

ahg-g commented Oct 19, 2019

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 19, 2019
@ahg-g
Copy link
Member

ahg-g commented Oct 19, 2019

/retest

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahg-g, hex108

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 Oct 19, 2019
@k8s-ci-robot k8s-ci-robot merged commit 7e53c9d into kubernetes:master Oct 19, 2019
@k8s-ci-robot k8s-ci-robot added this to the v1.17 milestone Oct 19, 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/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rethink the Scheduler's Framework Permit API
6 participants