jenkinsci / jenkinsci/priority-sorter-plugin
[JENKINS-45030] Priority for pipeline jobs
- Dominant language
- Java
- Stars
- 59
- Forks
- 76
- Avg merge
- 2h 4m
- Merged PRs (30d)
- 2
Description
While it is nice that with PrioritySorter 2.5.1 and JENKINS-44014">JENKINS-44014 fixed there are no issues anymore with exceptions, it still does not sort PlaceholderTasks in all cases. The getPriority() in PriorityConfigurationPlaceholderTaskHelper only logs a warning and uses a default configuration. However, any PlaceholderTask belongs to a Run, which belongs to a Job. So in case ownerTask is null, task.run().getParent() or task.runForDisplay().getParent() could be used instead.
Related: JENKINS-45028">JENKINS-45028.
---
Originally reported by rk, imported from: Priority for pipeline jobs
Raw content of original issue
While it is nice that with PrioritySorter 2.5.1 and
JENKINS-44014fixed there are no issues anymore with exceptions, it still does not sort PlaceholderTasks in all cases. The getPriority() in PriorityConfigurationPlaceholderTaskHelper only logs a warning and uses a default configuration. However, any PlaceholderTask belongs to a Run, which belongs to a Job. So in case ownerTask is null, task.run().getParent() or task.runForDisplay().getParent() could be used instead.Related:
JENKINS-45028.
environment
```
Jenkins 2.46.3
PrioritySorter-plugin 2.5.1
```
Contributor guide
Research direction
Start at PriorityConfigurationPlaceholderTaskHelper.getPriority() and trace how PlaceholderTask ownership is resolved when ownerTask is null. Verify that the fallback through the task's Run and Job supplies the priority configuration and that pipeline PlaceholderTasks are sorted instead of using the default configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100