Draft: Optimize pipelines serializer
What does this MR do and why?
The purpose of this MR is to optimize pipelines serializer, more specifically the performance of requests to Projects::MergeRequestsController#pipelines.json.
The proposed solution in the issue was to find a not to query stages.action when it is not needed (the pipeline list views).
- Both the
Projects::MergeRequestsController#pipelinesandProjects::Pipeline#indexactions currently pass a param to the serializer set to true -disable_manual_and_scheduled_actions: true - This param is used to bypass loading and exposing
manual_actionsandscheduled_actionsinPipelineDetailsEntity - it was added in this MR to try and resolve a similar issue
The changes in this MR leverage the existing param to further bypass loading actions when they are not required
- add a conditional to
DetailedStatusEntityto not expose action ifdisable_manual_and_scheduled_actions is true - bypass preloading manual and scheduled actions in the PipelineSerializer if
disable_manual_and_scheduled_actions is true
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #525559 (closed)
Edited by Vlad Wolanyk