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

[Draft] Add concept of priority to job templates and jobs #15889

Open
wants to merge 3 commits into
base: devel
Choose a base branch
from

Conversation

kdelee
Copy link
Member

@kdelee kdelee commented Mar 11, 2025

SUMMARY

This adds concept of priority to jobs.
The task manager now orders on priority, then created. All rules around instance group capacity etc still apply. So even if a job has very high priority, if there is not available capacity in the available instance groups, it will not be scheduled.

Higher number is higher priority.
Default priority is 0.

For dependencies like project updates + inventory source updates spawned from other jobs, assign them the priority of the job that caused them to be created.

ISSUE TYPE
  • New or Enhanced Feature
COMPONENT NAME
  • API
ADDITIONAL INFORMATION

Not currently addressed/questions:

  • Should jobs launched from workflows inherit priority from workflow? That is not happening here
  • Should we add this to prompt on launch parameters?

@kdelee
Copy link
Member Author

kdelee commented Mar 11, 2025

example ordering of how jobs would be looked at by the task manager:
image
....notice high priority jobs created later are listed before lower priority jobs created earlier

@AlanCoding
Copy link
Member

Doesn't this carry a core assumption that multiple jobs are processed in a single task manager run? It is likely that the task manager dispatches one job at a time, in which case it goes in the order the task manager gets them, and this priority metric would not matter at all.

@kdelee
Copy link
Member Author

kdelee commented Mar 18, 2025

yes this is only applicable when there are many jobs in pending. So it only really applies when you have more jobs in pending than you have capacity to run.

kdelee added 3 commits March 18, 2025 09:14
This adds concept of priority to jobs.
The task manager now orders on priority, then created.
All rules around instance group capacity etc still apply. So even if a
job has very high priority, if there is not available capacity in the
available instance groups, it will not be scheduled.

Higher number is higher priority.
Default priority is 0.

For dependencies spawned from other jobs, assign them the priority of
the job that caused them to be created.

Still need to add prompt on launch stuff for priority to be consistent.
@kdelee kdelee force-pushed the priority_task_manager branch from 3aab0cb to d65ab1c Compare March 18, 2025 13:14
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants