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

reuse logic-1 #38

Merged
merged 13 commits into from
Mar 26, 2023
Merged

reuse logic-1 #38

merged 13 commits into from
Mar 26, 2023

Conversation

asm582
Copy link
Member

@asm582 asm582 commented Mar 16, 2023

No description provided.

// }
scaleDown(aw)
if reuse {
if checkIfExactMatchExists(aw) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why does checkIfExactMatchExists() return a bool "shouldScaleDown" if either way scaleDown() is going to be called the same way? It seems like the "check" part of the function is unused, and it is more so just a means of doing label swapping if a match is found. Also the conditional here seems unnecessary. And for clarification, what exactly is the goal of "annotateToDeleteMachine"? I'm assuming it is to delete all machines for the scaling down AW that didn't have their labels swapped to a new pending AW? I could take a stab at restructuring/simplifying this scaling down portion if you'd like.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good points, If the exact match does not exist, we want to scale down. Machines in Machinesets need to be cherry-picked to be deleted.
Can you create an issue and add the restructuring you are planning to add?

@asm582 asm582 marked this pull request as ready for review March 26, 2023 17:44
@asm582
Copy link
Member Author

asm582 commented Mar 26, 2023

@Maxusmusti I am merging this PR since it was testing on my fork

@asm582 asm582 merged commit db535fe into project-codeflare:main Mar 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants