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

Modify scale down set processor to add reasons to unremovable nodes #7307

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

abdelrahman882
Copy link
Contributor

@abdelrahman882 abdelrahman882 commented Sep 24, 2024

What type of PR is this?

/kind bug
/kind cleanup

What this PR does / why we need it:

Modify scale down set processor to add reasons to unremovable nodes so that planner can have these nodes excluded as unremovable nodes with reasons

Special notes for your reviewer:

  1. Moved NewTestProcessors to be under processors/test to avoid the following circular dependency : nodes (ScaleDownSetProcessor)-> ScaleDownContext-> resource -> test (core/test/common)-> nodes (ScaleDownSetProcessor)
  2. On adding unit tests for planner I noticed that MaxNodesProcessor is being called before AtomicResizeFilteringProcessor which might cause filtering removable nodes on both calls ending up with less nodes to be deleted than we should be deleting, created an issue for it cluster-autoscaler : MaxNodesProcessor is being called before AtomicResizeFilteringProcessor #7342

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 24, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @abdelrahman882. 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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Sep 24, 2024
Copy link
Member

@bskiba bskiba left a comment

Choose a reason for hiding this comment

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

Thank you for the change! Especially for adding unit tests where they were missing.

I've got some suggestions but the comments are all relatively minor.

cluster-autoscaler/processors/processors.go Outdated Show resolved Hide resolved
cluster-autoscaler/processors/nodes/types.go Outdated Show resolved Hide resolved
cluster-autoscaler/simulator/cluster.go Outdated Show resolved Hide resolved
cluster-autoscaler/processors/test/common.go Outdated Show resolved Hide resolved
@abdelrahman882 abdelrahman882 force-pushed the total_min_size branch 2 times, most recently from 9053d15 to 35e5e2e Compare October 14, 2024 06:24
Copy link
Member

@bskiba bskiba 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 21, 2024
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 25, 2024
@abdelrahman882 abdelrahman882 requested a review from x13n October 28, 2024 10:43
@bskiba
Copy link
Member

bskiba commented Oct 28, 2024

I think you can remove the isValidCandidatesFiltering function now. Otherwise
/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 28, 2024
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 28, 2024
@bskiba
Copy link
Member

bskiba commented Oct 28, 2024

/lgtm

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 28, 2024
Copy link
Member

@x13n x13n left a comment

Choose a reason for hiding this comment

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

Overall looks good, just minor comments.

/approve

cluster-autoscaler/processors/processors.go Outdated Show resolved Hide resolved
cluster-autoscaler/processors/test/common.go Outdated Show resolved Hide resolved
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abdelrahman882, bskiba, x13n

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 29, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 29, 2024
@x13n
Copy link
Member

x13n commented Oct 29, 2024

/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 29, 2024
@k8s-ci-robot k8s-ci-robot merged commit a6a77b3 into kubernetes:master Oct 29, 2024
6 checks passed
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/cluster-autoscaler cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. 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. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. 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.

4 participants