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

Using float value > 0 as the activation criterium #47

Merged
merged 1 commit into from
Jan 13, 2025
Merged

Conversation

jkremser
Copy link
Member

No description provided.

@jkremser jkremser requested a review from a team as a code owner January 13, 2025 14:40
res := &externalscaler.GetMetricsResponse{
MetricValues: []*externalscaler.MetricValue{
{
MetricName: metricRequest.GetMetricName(),
MetricValue: int64(math.Round(value)),
MetricValue: int64(math.Ceil(value)),
Copy link
Contributor

Choose a reason for hiding this comment

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

side note: we should fix the external scaler interface, KEDA internal scalers support float here, eg: https://github.com/kedacore/keda/blob/cd595a1c3fd56ca17806ff8331a1cd6ed7549e12/pkg/scalers/activemq_scaler.go#L208

Copy link
Member Author

Choose a reason for hiding this comment

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

yep, I wanted to ask about that.. so I can make a pr to the proto as well and once it's there, throw away the float -> int function. I used the ceil instead of Round here to make the scale out use case faster

Copy link
Contributor

Choose a reason for hiding this comment

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

If you ment kedacore proto, then yeah. But we should also maintain a backwards compatibility somehow, there are existing external scalers that rely on int param there.

Copy link
Member Author

Choose a reason for hiding this comment

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

pr upstream - kedacore/keda#6482

@jkremser jkremser merged commit ffb181d into main Jan 13, 2025
3 checks passed
@jkremser jkremser deleted the better-is-active branch January 13, 2025 15:51
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