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

Commonize the code for checking if workload is managed by Kueue #4000

Open
mimowo opened this issue Jan 17, 2025 · 4 comments
Open

Commonize the code for checking if workload is managed by Kueue #4000

mimowo opened this issue Jan 17, 2025 · 4 comments
Assignees
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.

Comments

@mimowo
Copy link
Contributor

mimowo commented Jan 17, 2025

What would you like to be cleaned:

As in the comment we have two instances of the same logic:

  1. in WorkloadShouldBeSuspended - first two checks
  2. and in the new LWS PR we have IsManagedByKueue

Why is this needed:

To avoid duplication of complex logic, and so to reduce a chance of bugs.

@mimowo mimowo added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Jan 17, 2025
@mimowo
Copy link
Contributor Author

mimowo commented Jan 17, 2025

/assign @mbobrovskyi

@mimowo
Copy link
Contributor Author

mimowo commented Jan 28, 2025

@mbobrovskyi is it still a valid task?

@mbobrovskyi
Copy link
Contributor

@mbobrovskyi is it still a valid task?

Yes, we need to use IsManagedByKueue function here https://github.com/kubernetes-sigs/kueue/blob/main/pkg/controller/jobframework/defaults.go#L55-L57 and also need to check other places.

@mimowo
Copy link
Contributor Author

mimowo commented Jan 30, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.
Projects
None yet
Development

No branches or pull requests

2 participants