jenkinsci / jenkinsci/priority-sorter-plugin
[JENKINS-65603] Priority Strategy Job Triggered by a Upstream Build not Working
- Dominant language
- Java
- Stars
- 59
- Forks
- 76
- Avg merge
- 2h 4m
- Merged PRs (30d)
- 2
Description
I am facing the same problem as JENKINS-42584">JENKINS-42584, though I am using a new version of Priority Sorter.
Priority sorter global configuration:
- Strategy: Absolute
- Number of priorities: 5
- Default priority: 3
Job priorities: A single job group:
- Jobs to include: All
- Priority: Default
- Use additional rules when assigning a priority to a Job: checked
The additional strategies from top to bottom are "Job Triggered by a Upstream Build" and "Use Priority from Build Parameter Build Parameter Name". The parameter is called BuildPriority.
Jobs:
I have a pipeline called "priority test trigger" which has the parameter BuildPriority and will call another pipeline "priority test" by groovy script
build(job:"first folder/prioity test",wait:true)
When I run "priority test trigger" with BuildPriority 1, here is my logs with Logger: PrioritySorter.Queue.Items and FINER level.
May 11, 2021 5:10:07 PM FINER PrioritySorter.Queue.Items
New Item: Id: 1224, JobName: prioity test trigger, jobGroupId: 0, reason: Use Priority from Build Parameter, priority: 1, weight: 1.0, status: WAITING
Evaluating JobGroup [0] ...
Evaluating strategies ...
Evaluating strategy [Job Triggered by a Upstream Build] ...
Evaluating strategy [Use Priority from Build Parameter] ...
Strategy is applicable
May 11, 2021 5:10:07 PM FINE PrioritySorter.Queue.Items
Starting: Id: 1224, JobName: prioity test trigger, jobGroupId: 0, reason: Use Priority from Build Parameter, priority: 1, weight: 1.0, status: WAITING
May 11, 2021 5:10:07 PM FINER PrioritySorter.Queue.Items
New Item: Id: 1225, JobName: prioity test, jobGroupId: 0, reason: Job Triggered by a Upstream Build, priority: 3, weight: 3.0, status: WAITING
Evaluating JobGroup [0] ...
Evaluating strategies ...
Evaluating strategy [Job Triggered by a Upstream Build] ...
Strategy is applicable
May 11, 2021 5:10:16 PM FINE PrioritySorter.Queue.Items
Starting: Id: 1225, JobName: prioity test, jobGroupId: 0, reason: Job Triggered by a Upstream Build, priority: 3, weight: 3.0, status: WAITING
May 11, 2021 5:10:17 PM FINER PrioritySorter.Queue.Items
New Item: Id: 1226, JobName: part of first folder » prioity test #12, jobGroupId: -1, reason: , priority: 3, weight: 3.0, status: WAITING
May 11, 2021 5:10:17 PM FINE PrioritySorter.Queue.Items
Buildable: Id: 1226, JobName: part of first folder » prioity test #12, jobGroupId: -1, reason: , priority: 3, weight: 3.0, status: BUILDABLE
May 11, 2021 5:10:17 PM FINE PrioritySorter.Queue.Items
Starting: Id: 1226, JobName: part of first folder » prioity test #12, jobGroupId: -1, reason: , priority: 3, weight: 3.0, status: BUILDABLE
---
Originally reported by pzhy13, imported from: Priority Strategy Job Triggered by a Upstream Build not Working
Raw content of original issue
I am facing the same problem as
JENKINS-42584, though I am using a new version of Priority Sorter.Priority sorter global configuration:
- Strategy: Absolute
- Number of priorities: 5
- Default priority: 3
Job priorities: A single job group:
- Jobs to include: All
- Priority: Default
- Use additional rules when assigning a priority to a Job: checked
The additional strategies from top to bottom are "Job Triggered by a Upstream Build" and "Use Priority from Build Parameter Build Parameter Name". The parameter is called BuildPriority.
Jobs:
I have a pipeline called "priority test trigger" which has the parameter BuildPriority and will call another pipeline "priority test" by groovy script
build(job:"first folder/prioity test",wait:true)
When I run "priority test trigger" with BuildPriority 1, here is my logs with Logger: PrioritySorter.Queue.Items and FINER level.
May 11, 2021 5:10:07 PM FINER PrioritySorter.Queue.Items
New Item: Id: 1224, JobName: prioity test trigger, jobGroupId: 0, reason: Use Priority from Build Parameter, priority: 1, weight: 1.0, status: WAITING
Evaluating JobGroup [0] ...
Evaluating strategies ...
Evaluating strategy [Job Triggered by a Upstream Build] ...
Evaluating strategy [Use Priority from Build Parameter] ...
Strategy is applicable
May 11, 2021 5:10:07 PM FINE PrioritySorter.Queue.Items
Starting: Id: 1224, JobName: prioity test trigger, jobGroupId: 0, reason: Use Priority from Build Parameter, priority: 1, weight: 1.0, status: WAITING
May 11, 2021 5:10:07 PM FINER PrioritySorter.Queue.Items
New Item: Id: 1225, JobName: prioity test, jobGroupId: 0, reason: Job Triggered by a Upstream Build, priority: 3, weight: 3.0, status: WAITING
Evaluating JobGroup [0] ...
Evaluating strategies ...
Evaluating strategy [Job Triggered by a Upstream Build] ...
Strategy is applicable
May 11, 2021 5:10:16 PM FINE PrioritySorter.Queue.Items
Starting: Id: 1225, JobName: prioity test, jobGroupId: 0, reason: Job Triggered by a Upstream Build, priority: 3, weight: 3.0, status: WAITING
May 11, 2021 5:10:17 PM FINER PrioritySorter.Queue.Items
New Item: Id: 1226, JobName: part of first folder » prioity test #12, jobGroupId: -1, reason: <none>, priority: 3, weight: 3.0, status: WAITING
May 11, 2021 5:10:17 PM FINE PrioritySorter.Queue.Items
Buildable: Id: 1226, JobName: part of first folder » prioity test #12, jobGroupId: -1, reason: <none>, priority: 3, weight: 3.0, status: BUILDABLE
May 11, 2021 5:10:17 PM FINE PrioritySorter.Queue.Items
Starting: Id: 1226, JobName: part of first folder » prioity test #12, jobGroupId: -1, reason: <none>, priority: 3, weight: 3.0, status: BUILDABLE
- environment:
Windows 10, Jenkins 2.253, Priority Sorter 4.0.0
Contributor guide
Research direction
The report concerns the Priority Sorter job-trigger and upstream-build strategies, using the logged queue events as its concrete reproduction. Start by reproducing the pipeline trigger with BuildPriority set to 1 and inspect the strategy evaluation and queue-priority handling. Done means the triggered downstream build receives the intended priority rather than the default priority of 3.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100