✨ Controller: Retain the priority#3167
Conversation
This change makes the controller retain the priority if a priority queue is used. The priority queue will still bump the priority if the item gets re-added to it with a higher priority.
|
|
||
| c.Queue = c.NewQueue(c.Name, c.RateLimiter) | ||
| queue := c.NewQueue(c.Name, c.RateLimiter) | ||
| if priorityQueue, isPriorityQueue := queue.(priorityqueue.PriorityQueue[request]); isPriorityQueue { |
There was a problem hiding this comment.
I found it easier to use a wrapper if we don't get a priority queue vs asserting the queue type everywhere where we access it
|
Thx! /lgtm |
|
LGTM label has been added. DetailsGit tree hash: c453d8fd12275bdc0f3999ab27cff1508a75d14f |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, sbueringer The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/cherrypick release-0.20 |
|
@alvaroaleman: new pull request created: #3173 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
This change makes the controller retain the priority if a priority queue is used. The priority queue will still bump the priority if the item gets re-added to it with a higher priority.
Fixes #3157
/assign @sbueringer
/hold