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

Fix #67 only leader should do scaling #72

Merged
merged 4 commits into from
Feb 7, 2024
Merged

Fix #67 only leader should do scaling #72

merged 4 commits into from
Feb 7, 2024

Conversation

samos123
Copy link
Contributor

@samos123 samos123 commented Feb 7, 2024

Only the leader should be responsible for scale up and scale down. The only exception is "AtLeastOne" call in proxy handler. Any other scale ups / scale down should not be allowed in the replicas that are not the leader. That's why UpdateState should not be calling compareScales which can cause scale ups/downs.

@samos123 samos123 changed the title Fix #67 and refactor scaler Fix #67 only leader should do scaling Feb 7, 2024
@samos123 samos123 requested a review from nstogner February 7, 2024 07:01
Copy link
Contributor

@nstogner nstogner left a comment

Choose a reason for hiding this comment

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

LGTM, it could use some variations in the test cases (where expectedScaleFunc is false)... but not necessary.

@samos123
Copy link
Contributor Author

samos123 commented Feb 7, 2024

highest priority of test cases is to properly test scale down but couldn't get that to work... I would like some help on that, but will merge this first. I figured better start with some test case than have 0

@samos123 samos123 merged commit 6f7cd86 into main Feb 7, 2024
4 checks passed
@samos123 samos123 deleted the refactor-scaler.go branch February 7, 2024 17:16
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