jenkinsci / jenkinsci/priority-sorter-plugin

[JENKINS-45030] Priority for pipeline jobs

Open
#604 2 comments 0 reactions 0 assignees View on GitHub
component:prioritysorter-plugin imported-jira-issue pipeline priority:minor resolution:unresolved
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


  • status: Open
  • priority: Minor
  • component(s): prioritysorter-plugin
  • label(s): pipeline
  • resolution: Unresolved
  • votes: 3
  • watchers: 5
  • imported: 20251211-071809

Raw content of original issue

While it is nice that with PrioritySorter 2.5.1 and 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.

environment

```
Jenkins 2.46.3

PrioritySorter-plugin 2.5.1

```

Contributor guide

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.