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

Test Coverage for Deprovisioning #324

Open
12 tasks
njtran opened this issue May 4, 2023 · 8 comments
Open
12 tasks

Test Coverage for Deprovisioning #324

njtran opened this issue May 4, 2023 · 8 comments
Assignees
Labels
good-first-issue Good for newcomers help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/testing Issues that involve adding test coverage operational-excellence

Comments

@njtran
Copy link
Contributor

njtran commented May 4, 2023

Tell us about your request

Multi node consolidation is a core deprovisioner in the deprovisioning controller, but only has 3 suite tests. I also made changes to the core logic and make presubmit didn't notice the change was made, which we should be catching.

Tests

Multi-Node Consolidation

  • Consolidation of "n" (maybe 4) nodes that have pods scheduled and can be deleted onto another node
  • Consolidation converging on the ideal number of machines to consolidate (say 25 machines) on a cluster with a larger number of node (say 50)

Single Node Consolidation

  • Consolidation using TopologySpreadConstraint and "ScheduleAnyway" (Maintaining Preferences)
  • Consolidation using PodAntiAffinity and "PreferredDuringSchedulingIgnoredDuringExecution" (Maintaining Preferences)

Metrics

  • karpenter_deprovisioning_evaluation_duration Should be Fired During Consolidation
  • karpenter_deprovisioning_machine_initialized_seconds Should be Fired During Deprovisoining Replacement
  • karpenter_deprovisioning_actions_performed Should Be Fired correctly for each deprovisioner

Candidate Filtering and Generation (see https://github.com/aws/karpenter-core/blob/main/pkg/controllers/deprovisioning/helpers.go#L180)

  • Should Filter on Initialization
  • Should Filter on Provisioner, Capacity Type, Zone Label
  • Should Filter on Nomination
  • Should Filter on Instance Type Resolution
  • Should Generate the Correct Candidate when pods are scheduled

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@njtran njtran added operational-excellence kind/testing Issues that involve adding test coverage labels May 4, 2023
@jonathan-innis jonathan-innis added the good-first-issue Good for newcomers label May 4, 2023
@khareyash05
Copy link
Member

I would like to add unit tests for the functions

@jonathan-innis jonathan-innis changed the title Increase Coverage of Mutli Node Consolidation suite_tests Increase Coverage in Deprovisioning Suite Tests May 8, 2023
@jonathan-innis jonathan-innis changed the title Increase Coverage in Deprovisioning Suite Tests Test Coverage for Deprovisioning May 11, 2023
@khareyash05
Copy link
Member

khareyash05 commented May 12, 2023

we are talking about singlemachineconsolidation.go and multimachineconsolidation.go right? @jonathan-innis

@jonathan-innis
Copy link
Member

Yes, the tests for these files lives inside of suite_test.go right now. There's handling for multi-node consolidation here and single-node consolidation is all over the file

@Bryce-Soghigian
Copy link
Member

@khareyash05 are you still working on this?

@khareyash05
Copy link
Member

@khareyash05 are you still working on this?

Please go ahead with this

@jonathan-innis jonathan-innis added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Nov 25, 2023
@jonathan-innis
Copy link
Member

jonathan-innis commented Nov 25, 2023

/unassign @khareyash05

I'm going to unassign since it looks like there's been no progress on this since it was assigned.

@Sanskarzz
Copy link

/assign

@Sanskarzz Sanskarzz removed their assignment Jun 12, 2024
@asmit27rai
Copy link

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue Good for newcomers help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/testing Issues that involve adding test coverage operational-excellence
Projects
None yet
Development

No branches or pull requests

6 participants