console icon indicating copy to clipboard operation
console copied to clipboard

OCPBUGS-23480: Improve PipelineRun list view performance

Open lokanandaprabhu opened this issue 11 months ago • 10 comments

Fixes: https://issues.redhat.com/browse/OCPBUGS-30575

Analysis / Root cause: PipelineRun list view contains Task status column, which shows the overall task status of the pipelinerurn. Inorder to render this column we fetch all the tasksruns of that pipelinerun. Every pipelinerun row will have to have all the related TaskRuns information, which is causing performance issue in the pipelinerun list view.

Solution Description: Fetching TaskRuns only for Failed and Cancelled PipelineRuns. Now TaskRuns status will be calculated from the message value in pipelinerun.status.conditions:

lastTransitionTime: '2023-11-15T07:51:42Z'
message: 'Tasks Completed: 3 (Failed: 0, Cancelled 0), Skipped: 0'
reason: Succeeded
status: 'True'
type: Succeeded

Screen shots / Gifs for design review:

NA

Unit test coverage report:

    ✓ should expect getPipelineRunStatus to return taskruns status object with 1 Succeeded, 1 Failed and 1 Skipped for Cancelled status
    ✓ should expect getPipelineRunStatus to return taskruns status object with 2 Succeeded for Succeeded status (1ms)
    ✓ should expect getPipelineRunStatus to return taskruns status object with 1 Failed for Failed status
    ✓ should expect getPipelineRunStatus to return taskruns status object all 0 values for cancelled status

Test setup:

  1. Create few pipelineruns
  2. Navigate to pipelineruns list view

Browser conformance:

  • [x] Chrome
  • [ ] Firefox
  • [ ] Safari
  • [ ] Edge

lokanandaprabhu avatar Mar 15 '24 12:03 lokanandaprabhu