Skip to content

Proposal for placement sort order and score visibility #143

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bhperry
Copy link
Contributor

@bhperry bhperry commented May 22, 2025

Enhancement proposal for making PlacementDecision scores easily visible to consumers, and supporting different sort orders in the decisions.

@openshift-ci openshift-ci bot requested review from deads2k and qiujian16 May 22, 2025 16:54
@bhperry
Copy link
Contributor Author

bhperry commented May 22, 2025

/assign @haoqing0110 @qiujian16


## Proposal

Add `SortBy` to `PlacementSpec` to configure the sort order for PlacementDecision. This field
Copy link
Member

Choose a reason for hiding this comment

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

one of the issue with sorting by score is that if the score changed to frequently, the decision result will be updated frequently also. We need to think about some approach to avoid that, or at least some document to notice users.

Copy link
Contributor Author

@bhperry bhperry May 27, 2025

Choose a reason for hiding this comment

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

Including that note in the description of SortBy: Score perhaps?

What is the main concern with decision results updating frequently? Including score in the decision results will result in the same number of updates (although not reordering without SortBy). In terms of API pressure, OCM already creates events for each score update. Are there expensive reconcilers that run on update to PlacementDecision?

Copy link
Member

@qiujian16 qiujian16 left a comment

Choose a reason for hiding this comment

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

looks good in general.

Signed-off-by: Ben Perry <[email protected]>
Copy link

openshift-ci bot commented May 27, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bhperry
Once this PR has been reviewed and has the lgtm label, please ask for approval from qiujian16. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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