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

feat: add woop apply threshold strategy to tf scaling policy #438

Merged
merged 8 commits into from
Jan 20, 2025
Merged

Conversation

UOndro
Copy link
Contributor

@UOndro UOndro commented Jan 14, 2025

No description provided.

@UOndro UOndro requested a review from a team as a code owner January 14, 2025 16:49
@UOndro UOndro requested review from jansyk13 and mszostok and removed request for a team and jansyk13 January 14, 2025 16:49
@@ -567,13 +680,37 @@ func toWorkloadScalingPoliciesMap(p sdk.WorkloadoptimizationV1ResourcePolicies)
m[FieldLimitStrategy] = []map[string]any{limit}
}

if v, ok := previousCfg["apply_threshold"].(float64); ok && v > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit I would extract that into a func similar to what you did with resolveApplyThresholdStrategy. Then, place both functions close to each other and include a "business" comment explaining why it’s done this way, or just add a link to a gh comments, so even after N months, we’ll still be able to quickly understand “what the hell..” 😄

Copy link
Contributor

@mszostok mszostok left a comment

Choose a reason for hiding this comment

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

Tested all the different edge cases, and it worked like a charm 😄

italian-si

@UOndro UOndro merged commit 7c2c4cc into master Jan 20, 2025
10 checks passed
@UOndro UOndro deleted the WOOP-605 branch January 20, 2025 08:47
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.

3 participants