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

Enable sorting of queue items based on a custom timestamp extracted from an annotation #4415

Open
2 of 3 tasks
gbenhaim opened this issue Feb 26, 2025 · 3 comments
Open
2 of 3 tasks
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@gbenhaim
Copy link

What would you like to be added:

Enable sorting of queue items based on a custom timestamp extracted from an annotation.

Why is this needed:

Queuing plain pods created by Tekton can be highly beneficial for sharing quotas and achieving more consistent scheduling (FIFO based on the pod's creation timestamp). A short demo on this topic can be found here.

The experience could be further improved by allowing pods in the queue to be sorted based on the creation timestamp of the Tekton PipelineRun they belong to.

This would prioritize pods associated with "older" pipelines, helping them complete first and reducing timeouts.

Completion requirements:

  1. Kueue should be able to read a timestamp from an annotation set on the workload and use it for sorting workloads in the queue.

  2. It should be possible to copy annotations from the Job to the Workload, similar to how labels can be copied.

  3. Tekton should set the creation timestamp of the PipelineRun as an annotation on the pods belonging to that PipelineRun (this should be implemented in Tekton).

This enhancement requires the following artifacts:

  • Design doc
  • API change
  • Docs update

The artifacts should be linked in subsequent comments.

@gbenhaim gbenhaim added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 26, 2025
@gbenhaim gbenhaim changed the title Enable sorting of queue items based on a custom timestamp extracted from an annotation. Enable sorting of queue items based on a custom timestamp extracted from an annotation Feb 26, 2025
@kannon92
Copy link
Contributor

I am a bit confused.

https://cloud.google.com/kubernetes-engine/docs/tutorials/kueue-intro

This seems to say that we have support of FIFO for queueing.

@kannon92
Copy link
Contributor

@tenzen-y
Copy link
Member

tenzen-y commented Feb 27, 2025

We have received similar requests many times. However, we could not accept it since such custom timestamp could violate fairness. All workloads should be fair under the Kueue algorithms.

Such annotation allows evil users to prioritize their tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants