Skip to content
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

Added Log output for LocalQueue and ClusterQueue #3605

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/controller/core/workload_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ func (r *WorkloadReconciler) Update(e event.UpdateEvent) bool {
// function.
if immediate {
if !r.queues.AddOrUpdateWorkloadWithoutLock(wlCopy) {
log.V(2).Info("LocalQueue for workload didn't exist or not active; ignored for now")
log.V(2).Info("Workload could not be added or updated; ignoring for now", "workload", wlCopy.Name)
}
}
})
Expand Down
2 changes: 2 additions & 0 deletions pkg/queue/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,14 @@ func (m *Manager) AddOrUpdateWorkloadWithoutLock(w *kueue.Workload) bool {
qKey := workload.QueueKey(w)
q := m.localQueues[qKey]
if q == nil {
fmt.Println("LocalQueue for workload not found")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
fmt.Println("LocalQueue for workload not found")
return ErrQueueDoesNotExist

Copy link
Author

Choose a reason for hiding this comment

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

okay!

return false
}
wInfo := workload.NewInfo(w, m.workloadInfoOptions...)
q.AddOrUpdate(wInfo)
cq := m.hm.ClusterQueues[q.ClusterQueue]
if cq == nil {
fmt.Println("ClusterQueue for workload not found")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
fmt.Println("ClusterQueue for workload not found")
return ErrClusterQueueDoesNotExist

Copy link
Author

Choose a reason for hiding this comment

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

okay!

Copy link
Author

Choose a reason for hiding this comment

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

if we do this then we have to change the type of the function cause it was returning a bool and after adding this it should return error ..
so should I add it like you mentioned or anything other?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, sure.

Copy link
Author

Choose a reason for hiding this comment

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

okay!

return false
}
cq.PushOrUpdate(wInfo)
Expand Down