Skip to content
代码片段 群组 项目
未验证 提交 0a426914 编辑于 作者: Hordur Freyr Yngvason's avatar Hordur Freyr Yngvason
浏览文件

Skip status preloads in pipeline lists

Completes the rollout of the feature flag
`skip_status_preload_in_pipeline_lists`. This removes a few redundant
preloads from the merge requests pipeline list and the project pipeline
list, improving the load time for large pipelines.

Rollout issue: https://gitlab.com/gitlab-com/gl-infra/production/-/issues/17482

Changelog: performance
上级 6e2cbd3e
No related branches found
No related tags found
无相关合并请求
......@@ -149,27 +149,18 @@ def pipelines
Gitlab::PollingInterval.set_header(response, interval: 10_000)
serializer_options = {
disable_coverage: true,
disable_failed_builds: true,
preload: true
}
if Feature.enabled?(:skip_status_preload_in_pipeline_lists, @project, type: :gitlab_com_derisk)
serializer_options.merge!(
disable_manual_and_scheduled_actions: true,
preload_statuses: false,
preload_downstream_statuses: false
)
end
render json: {
pipelines: PipelineSerializer
.new(project: @project, current_user: @current_user)
.with_pagination(request, response)
.represent(
@pipelines,
**serializer_options
disable_coverage: true,
disable_failed_builds: true,
disable_manual_and_scheduled_actions: true,
preload: true,
preload_statuses: false,
preload_downstream_statuses: false
),
count: {
all: @pipelines.count
......
......@@ -226,26 +226,17 @@ def downloadable_artifacts
private
def serialize_pipelines
serializer_options = {
disable_coverage: true,
disable_manual_and_scheduled_actions: true,
preload: true
}
if Feature.enabled?(:skip_status_preload_in_pipeline_lists, @project, type: :gitlab_com_derisk)
serializer_options.merge!(
disable_failed_builds: true,
preload_statuses: false,
preload_downstream_statuses: false
)
end
PipelineSerializer
.new(project: @project, current_user: @current_user)
.with_pagination(request, response)
.represent(
@pipelines,
**serializer_options
disable_coverage: true,
disable_failed_builds: true,
disable_manual_and_scheduled_actions: true,
preload: true,
preload_statuses: false,
preload_downstream_statuses: false
)
end
......
---
name: skip_status_preload_in_pipeline_lists
feature_issue_url:
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/142947
rollout_issue_url: https://gitlab.com/gitlab-com/gl-infra/production/-/issues/17482
milestone: '16.9'
group: group::pipeline execution
type: gitlab_com_derisk
default_enabled: false
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册