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 first fit #122435

Merged

Conversation

aleksandra-malinowska
Copy link
Contributor

Resubmit of #122058, reverted in #122317 due to a flaky test

Test is fixed now - there was a typo, node3 instead of node2 was listed as one of expected results.

What type of PR is this?

/kind bug

What this PR does / why we need it:

Skip looking for extra nodes if no scoring plugins are defined. As there's no difference in priority between nodes when we don't score them, there's no point in searching for multiple fitting nodes.

Which issue(s) this PR fixes:

Fixes #122057

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Improves scheduler performance when no scoring plugins are defined.

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


/sig scheduling
/cc @ahg-g

@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/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Dec 21, 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 the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Dec 21, 2023
@aleksandra-malinowska
Copy link
Contributor Author

Flakes should be gone now:

~/go/src/k8s.io/kubernetes/pkg/scheduler$ go test -count 100 -run TestSchedulerSchedulePod
PASS
ok      k8s.io/kubernetes/pkg/scheduler 274.489s

@ahg-g
Copy link
Member

ahg-g commented Dec 21, 2023

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

LGTM label has been added.

Git tree hash: dfc829cf71cd090cfd82a8d8f582343fe1fe8fc0

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 Dec 21, 2023
@k8s-ci-robot k8s-ci-robot merged commit c8c845a into kubernetes:master Dec 21, 2023
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.30 milestone Dec 21, 2023
@pacoxu
Copy link
Member

pacoxu commented Dec 28, 2023

~/go/src/k8s.io/kubernetes/pkg/scheduler$ go test -count 100 -run TestSchedulerSchedulePod
PASS
ok k8s.io/kubernetes/pkg/scheduler 274.489s

Have you tried stress to reproduce the flake? stress can reproduce the flake in high load and multi times runnings.
See https://gist.github.com/liggitt/6a3a2217fa5f846b52519acfc0ffece0#running-unit-tests-to-reproduce-flakes for more details.

This adding test https://prow.k8s.io/view/gs/kubernetes-jenkins/logs/ci-kubernetes-unit/1740254928200273920 flakes in master blocking test grid.

I opened #122505 to track the new flake.

Read more in https://github.com/kubernetes/community/blob/master/contributors/devel/sig-testing/flaky-tests.md.

@aleksandra-malinowska
Copy link
Contributor Author

This was reverted in #123290

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. 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. 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. 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.

Scheduler evaluates many nodes even if there are no scoring plugins defined
4 participants