Preload downstream_pipeline in StageEntity
This fixes an N+1 for the commit status dropdown in places such as the stages controller, which is used to display a list of jobs on pipelines. The additional preloads are needed for policy checks and path rendering. In order to make this work, we also had to extend `CommitStatusPreloader` with support for nested associations. The change is behind the feature flag `preload_ci_bridge_downstream_pipelines`, disabled by default.
显示
- app/models/preloaders/commit_status_preloader.rb 18 个添加, 1 个删除app/models/preloaders/commit_status_preloader.rb
- app/serializers/stage_entity.rb 9 个添加, 4 个删除app/serializers/stage_entity.rb
- config/feature_flags/gitlab_com_derisk/preload_ci_bridge_downstream_pipelines.yml 8 个添加, 0 个删除...lab_com_derisk/preload_ci_bridge_downstream_pipelines.yml
- spec/models/preloaders/commit_status_preloader_spec.rb 7 个添加, 1 个删除spec/models/preloaders/commit_status_preloader_spec.rb
- spec/serializers/stage_entity_spec.rb 30 个添加, 0 个删除spec/serializers/stage_entity_spec.rb
加载中
想要评论请 注册 或 登录