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

make sure target is always between min and max #588

Merged
merged 2 commits into from
Jun 6, 2022
Merged

Conversation

lgfa29
Copy link
Contributor

@lgfa29 lgfa29 commented May 26, 2022

The current policy evaluation always attempts to query the APM for
metrics and apply the policy strategy before making a scaling decision.

But in some situations the target may be out of the specified min and
max range from the beginning. In these situations, we would want to
correct the target first so it's in within the expected range before
applying the rest of the policy.

This change short-circuits the most the policy evaluation if the target
count status is outside this range.

Closes #577

lgfa29 added a commit that referenced this pull request May 26, 2022
@lgfa29 lgfa29 marked this pull request as ready for review May 26, 2022 23:13
@lgfa29 lgfa29 requested a review from a team May 26, 2022 23:13
@lgfa29 lgfa29 requested review from smacfarlane and alvin-huang and removed request for a team May 26, 2022 23:13
Base automatically changed from crt to main June 3, 2022 21:23
The current policy evaluation always attempts to query the APM for
metrics and apply the policy strategy before making a scaling decision.

But in some situations the target may be out of the specified min and
max range from the beginning. In these situations, we would want to
correct the target first so it's in within the expected range before
applying the rest of the policy.

This change short-circuits the most the policy evaluation if the target
count status is outside this range.
Copy link

@DerekStrickland DerekStrickland left a comment

Choose a reason for hiding this comment

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

:shipit:

Copy link
Member

@jrasell jrasell left a comment

Choose a reason for hiding this comment

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

LGTM!

@lgfa29 lgfa29 merged commit b26d678 into main Jun 6, 2022
@lgfa29 lgfa29 deleted the f-check-limits branch June 6, 2022 15:46
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.

Suggestion: check limits even if policy fails to evaluate
3 participants