Deduplicate build causes in queue tooltip and build overview#26392
Deduplicate build causes in queue tooltip and build overview#26392mawinter69 wants to merge 4 commits intojenkinsci:masterfrom
Conversation
andreahlert
left a comment
There was a problem hiding this comment.
causeBag is transient and only set in the constructors. When we load a build from disk we don’t run those, so for any build with upstream causes getCauseCounts() will NPE when the jelly uses it. Need to init causeBag when it’s null (e.g. in getCauseCounts() call fillCauseBag() first).
Loading from disk runs through the |
Checked the PR branch. the callback does call uc.fillCauseBag(), so causeBag is initialized after deserialization. Withdrawing the NPE concern. |
When a job is in the queue for longer time it might get triggered several times, e.g. by timer, a user or another job.
Having several such jobs in the queue with a long list of triggers can lead to noticeable loading delays of the dashboard.
The trigger list on the build overview page can also become very long when that happened for an upstream build.
This change will remove any duplicate causes from the tooltip und in the display of upstream causes.
The persistence of upstream causes is not changed here as many plugins use the
getUpstreamCausesmethod and changing that might cause undesired side effects.fixes #16557
Testing done
Interactive testing
Screenshots (UI changes only)
Before
After
Proposed changelog entries
Proposed changelog category
/label rfe,web-ui
Proposed upgrade guidelines
N/A
Submitter checklist
@Restrictedor have@since TODOJavadocs, as appropriate.@Deprecated(since = "TODO")or@Deprecated(forRemoval = true, since = "TODO"), if applicable.evalto ease future introduction of Content Security Policy (CSP) directives (see documentation).Desired reviewers
@mention
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.