-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
storage: update rule solver candidates to have 2 scores and a valid bool #11702
Conversation
Not finished reviewing this yet, just sending out some initial comments. Review status: 0 of 3 files reviewed at latest revision, 3 unresolved discussions, all commit checks successful. pkg/storage/allocator.go, line 310 at r3 (raw file):
pkg/storage/allocator.go, line 322 at r3 (raw file):
pkg/storage/allocator.go, line 325 at r3 (raw file):
Comments from Reviewable |
Cool. Review status: 0 of 3 files reviewed at latest revision, 3 unresolved discussions, all commit checks successful. pkg/storage/allocator.go, line 310 at r3 (raw file): Previously, petermattis (Peter Mattis) wrote…
Done. pkg/storage/allocator.go, line 322 at r3 (raw file): Previously, petermattis (Peter Mattis) wrote…
Done. pkg/storage/allocator.go, line 325 at r3 (raw file): Previously, petermattis (Peter Mattis) wrote…
done, that's much cleaner. Comments from Reviewable |
Review status: 0 of 3 files reviewed at latest revision, 1 unresolved discussion, some commit checks failed. pkg/storage/allocator.go, line 407 at r4 (raw file):
Don't you need Comments from Reviewable |
9c48f83
to
af7cfda
Compare
This commit splits the scores returned in the rule solver into a constraint and a balance score.
Solve now returns all candidates instead of just the valid ones. To get only the valid candidates, the new function onlyValid and new type alias condidateList have also been added. This change allows us to use solve for removeTarget. It also cleans up the logic in removeTarget to more closely match the non-rule solver version.
replaced by #12165 |
Do not merge until after #11695.
Ignore the first commit, it is part of #11695.
Two commits:
storage: convert rule solver rules to return 2 scores
This commit splits the scores returned in the rule solver into a constraint and a balance score.
storage: add a valid field to rule solver's candidates
Solve now returns all candidates instead of just the valid ones. To
get only the valid candidates, the new function onlyValid and new type
alias condidateList have also been added.
This change allows us to use solve for removeTarget. It also cleans
up the logic in removeTarget to more closely match the non-rule solver
version.
This change is