blueocean-plugin icon indicating copy to clipboard operation
blueocean-plugin copied to clipboard

Only fetch job queue in getCauseOfBlockage

Open schiasileon opened this issue 7 months ago • 7 comments

Description

This fixes a performance issue on large Jenkins instances with huge queues.

Before this fix, blueocean would fetch all Jenkins queue items when cause of blockage is needed just to find out which item the run belongs to. While doing this, Jenkins has to execute a permission check on all queued Items, possibly leading to performance issues.

We documented and tested this issue on one of our Jenkins instances with 1000+ queue items. The permission check lead to the azure-ad plugin taking up a lot of CPU. Also see previous fix attempts here.

Unit test not needed as this doesn't change any behavior.

Submitter checklist

  • [ x ] Link to JIRA ticket in description, if appropriate.
  • [ x ] Change is code complete and matches issue description
  • [ x ] Appropriate unit or acceptance tests or explanation to why this change has no tests
  • [ x ] Reviewer's manual test instructions provided in PR description. See Reviewer's first task below.

Reviewer checklist

  • [ ] Run the changes and verified the change matches the issue description
  • [ ] Reviewed the code
  • [ ] Verified that the appropriate tests have been written or valid explanation given

schiasileon avatar Jul 30 '24 12:07 schiasileon