Repository navigation
fix(sdk): always add queue label regardless of queue existence - #3221
Conversation
|
🎉 Welcome to the Kubeflow Trainer! 🎉 Thanks for opening your first PR! We're happy to have you as part of our community 🚀 Here's what happens next:
Join the community:
Feel free to ask questions in the comments if you need any help or clarification! |
jiayuzhao05
left a comment
There was a problem hiding this comment.
suggestions: consider guarding against empty queue names (e.g. if queue_name and queue_name.strip():) to avoid writing an empty queue-name label.
|
/ok-to-test |
astefanutti
left a comment
There was a problem hiding this comment.
@puwun thanks!
@abhijeet-dhumal do you remember if there is a reason why we decided to skip the Kueue label in that case when you worked on #2636?
@astefanutti Actually the original logic in #2636 was designed around a "fail-safe" - if we couldn't confirm the queue exists (404), we'd skip the label to avoid the job being stuck waiting for a non-existent queue. But this was wrong thinking:
This is the context IIRC, But would be happy to discuss it further whether this decision decision seems correct? |
|
@puwun LGTM with one nit - Add the empty string guard as suggested by @jiayuzhao05.
This was a mistake - the label should always be added when the user explicitly requests queue management. |
|
@abhijeet-dhumal thanks for the feedback. @puwun can you please handle the empty string case as suggested by @jiayuzhao05 so it can be merged. |
Fixes kubeflow#2775 Signed-off-by: Pavan More <pavansmore05@gmail.com>
c5669a8 to
de303c8
Compare
|
Thanks all, updated with the changes 👍🏼 |
astefanutti
left a comment
There was a problem hiding this comment.
Thanks @puwun!
/lgtm
/approve
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andreyvelich, astefanutti 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 |
|
Will manually merge it. |
What this PR does / why we need it:
create_job()skips adding thekueue.x-k8s.io/queue-namelabel when the specified local-queue doesn't exist, preventing Kueue from ever managing the job. Removed the conditional gate so the label is always added whenqueue_nameis provided.Changes:
if queue_exists is not Falsecondition that gated label addition,_check_queue_exists()is still called for its side effects (warning logs, error handling)Which issue(s) this PR fixes:
Fixes #2775