-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
[JENKINS-45927] Truncate verbose CauseOfBlockage messages in queue #11298
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
[JENKINS-45927] Truncate verbose CauseOfBlockage messages in queue #11298
Conversation
When multiple nodes reject a task, CompositeCauseOfBlockage previously joined ALL rejection reasons with "; ", causing extremely verbose tooltips that could fill the entire browser window. This fix truncates the message to show only the first 5 reasons, followed by "... and N more" when there are more than 5 reasons. Signed-off-by: Steve Armstrong <[email protected]>
|
Yay, your first pull request towards Jenkins core was created successfully! Thank you so much! |
|
Please restore (and follow) the PR template: https://github.com/jenkinsci/jenkins/blob/master/.github/PULL_REQUEST_TEMPLATE.md |
|
/label rfe |
The CompositeCauseOfBlockage uses a TreeMap which sorts keys alphabetically, so "Reason 10" comes before "Reason 2". Updated tests to use zero-padded numbers to ensure predictable ordering. Signed-off-by: W0474997SteveArmstrong <[email protected]>
Jenkins Checkstyle rules require static imports to be in their own group at the top, before regular imports. Signed-off-by: W0474997SteveArmstrong <[email protected]>
Done. |
|
This PR is now ready for merge. We will merge it after the master branch is unlocked, if there is no negative feedback. /label ready-for-merge |
|
Tested in the plugin BOM to confirm that it is not breaking tests there. Pull request is: Since this may affect the UI, needs to be tested in acceptance test harness. |
|
Passed acceptance test harness. |
|
Could you provide some screenshots of what it looks like in the usecases you've provided? |
A1exKH
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
|
Congratulations on getting your very first Jenkins core pull request merged 🎉🥳 |
See JENKINS-45927
Testing done
Added comprehensive unit tests in
CompositeCauseOfBlockageTest:Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
@Restrictedor have@since TODOJavadoc.@Deprecated(since = "TODO").Desired reviewers
@timja
Before the changes are marked as
ready-for-merge:Maintainer checklist
upgrade-guide-neededlabel is set and there is a Proposed upgrade guidelines section in the pull request title (see example).lts-candidateto be considered (see query).Summary
When hovering over queued build items, Jenkins displays extremely verbose blockage reasons that can fill the entire browser window. The message lists every node with format: "nodeA doesn't have label X; nodeB doesn't have label X; ..." for ALL nodes.
Changes
CompositeCauseOfBlockage.getShortDescription()to truncate messages when there are more than 5 reasonsBefore/After
Before: "node1 doesn't have label X; node2 doesn't have label X; node3 doesn't have label X; ... (continues for all 100 nodes)"
After: "node1 doesn't have label X; node2 doesn't have label X; node3 doesn't have label X; node4 doesn't have label X; node5 doesn't have label X; ... and 95 more"