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

feature(NodeAffinity): return Skip in PreScore when nothing to do in Score #117024

Merged

Conversation

sanposhiho
Copy link
Member

@sanposhiho sanposhiho commented Mar 31, 2023

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR make NodeAffinity PreScore returning Skip when nothing to do in NodeAffinity Score

Which issue(s) this PR fixes:

part of #115745

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Scheduler skips NodeAffinity Score plugin when NodeAffinity Score plugin has nothing to do with a Pod.
You might notice an increase in the metric plugin_execution_duration_seconds for extension_point=score plugin=NodeAffinity, because the plugin will only run when the plugin is relevant

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


@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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 31, 2023
@k8s-ci-robot
Copy link
Contributor

Please note that we're already in Test Freeze for the release-1.27 branch. This means every merged PR will be automatically fast-forwarded via the periodic ci-fast-forward job to the release branch of the upcoming v1.27.0 release.

Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Thu Mar 30 22:31:05 UTC 2023.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 31, 2023
@k8s-ci-robot k8s-ci-robot added sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 31, 2023
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

@k8s-ci-robot k8s-ci-robot added needs-priority Indicates a PR lacks a `priority/foo` label and requires one. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Mar 31, 2023
@AxeZhan
Copy link
Member

AxeZhan commented Mar 31, 2023

Fixes #115745

Part of #115745?

@sanposhiho
Copy link
Member Author

@denkensk @chendave Can you have time to take a look at it?

@sanposhiho
Copy link
Member Author

/retest

Copy link
Member

@chendave chendave left a comment

Choose a reason for hiding this comment

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

sorry for missing this one, just some suggestion otherwise LGTM.

@sanposhiho
Copy link
Member Author

@chendave @ahg-g Sorry, I completely forgot about this PR. I addressed your comments, PTAL 🙏

@ahg-g
Copy link
Member

ahg-g commented May 17, 2023

@chendave @ahg-g Sorry, I completely forgot about this PR. I addressed your comments, PTAL 🙏

integration tests are failing

@sanposhiho sanposhiho force-pushed the nodeaffinity-pre-score-skip branch from 56920fd to 9f1e29c Compare May 27, 2023 10:25
@sanposhiho
Copy link
Member Author

OK, there is a bug on the framework side... 😓

@sanposhiho
Copy link
Member Author

sanposhiho commented May 27, 2023

The failing e2e will be resolved by #118297.

Given the bug happens in an extremely minor case, I make a change in e2e rather than changing the framework side.

@k8s-ci-robot k8s-ci-robot added area/test sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels May 27, 2023
@sanposhiho sanposhiho force-pushed the nodeaffinity-pre-score-skip branch from d294a3d to c337b63 Compare May 28, 2023 00:40
@k8s-ci-robot k8s-ci-robot removed the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 28, 2023
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 2, 2023
@sanposhiho
Copy link
Member Author

@ahg-g @chendave PTAL 🙏

@chendave
Copy link
Member

chendave commented Dec 6, 2023

/assign

Copy link
Member

@chendave chendave 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 Dec 7, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: f74a13eae7cec1e6111e9421420444c65fa2a872

@sanposhiho
Copy link
Member Author

sanposhiho commented Dec 7, 2023

/hold

It's better to go thru the approver's review as well.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 7, 2023
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 16, 2023
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 18, 2023
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 18, 2023
@sanposhiho
Copy link
Member Author

Fixed @chendave 's point.

@kubernetes/sig-scheduling-approvers Please anyone take a look for /approve

@alculquicondor
Copy link
Member

It may affect some metrics values related to the NodeAffinity Score plugin.

what do you mean by this?

@alculquicondor
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 Dec 18, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 43df7748a53e7c3481858c5a7ab02b9d2bdbe7a8

@sanposhiho
Copy link
Member Author

what do you mean by this?

In metrics, after this PR is merged, it probably looks like NodeAffinity's Score plugin's latency go increasing because we execute NodeAffinity Score plugin only when it calculates something.

@alculquicondor
Copy link
Member

Ok, that's not very clear in the release notes. Maybe reword like this:

You might notice an increase in the metric <name-of-metric> for endpoint(?)=score, because the plugin will only run when the plugin is relevant

@sanposhiho
Copy link
Member Author

@alculquicondor Updated.

@alculquicondor
Copy link
Member

/lgtm

@alculquicondor
Copy link
Member

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 27, 2023
@k8s-ci-robot k8s-ci-robot merged commit afa3f11 into kubernetes:master Dec 27, 2023
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.30 milestone Dec 27, 2023
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. needs-triage Indicates an issue or PR lacks a `triage/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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

6 participants