kubewharf / godel-scheduler

a unified scheduler for online and offline tasks
Apache License 2.0
377 stars 58 forks source link

fix the function name for add/update/delete events on assumed or bound pods in scheduler #30

Closed yuey002 closed 3 months ago

yuey002 commented 3 months ago

For assumed/bound pods, during add, update, and delete events, they do not enter the scheduler queue but instead trigger the AssignedPodAdded function. If, due to pod affinity-related reasons, a pod in the unschedulable queue becomes schedulable, then this unschedulable pod can be moved from the unschedulable queue to the ready or backoff queue for scheduling retries.

Therefore, the current naming of addAssumedOrBoundPodToQueue/updateAssumedOrBoundPodInQueue/deleteAssumedOrBoundPodInQueue is ambiguous, because the pod is not actually added to the scheduler queue, but triggers an update from the unschedulable queue to the ready/backoff queue. Hence, the functions are renamed to triggerQueueOnAssumedOrBoundPodAdd/triggerQueueOnAssumedOrBoundPodUpdate/triggerQueueOnAssumedOrBoundPodDelete.

NickrenREN commented 3 months ago

@zryfish two checks are still red, please take a look

zryfish commented 3 months ago

@yuey002 Please rebase the code to the main branch, and push again

yuey002 commented 3 months ago

@NickrenREN All CI checks have passed. Could you help merge this MR when getting a chance? Thank you.

NickrenREN commented 3 months ago

@yuey002 sure, merged, thanks for this fix