Skip to content
代码片段 群组 项目
提交 695e5c1f 编辑于 作者: Rémy Coutable's avatar Rémy Coutable
浏览文件

Merge branch '363023-rm-ff-last-deployment-group' into 'master'

Remove FF for last-deployment-group

See merge request gitlab-org/gitlab!92976
No related branches found
No related tags found
无相关合并请求
...@@ -331,11 +331,7 @@ def stop_actions ...@@ -331,11 +331,7 @@ def stop_actions
end end
def last_deployment_group def last_deployment_group
if ::Feature.enabled?(:batch_load_environment_last_deployment_group, project) Deployment.last_deployment_group_for_environment(self)
Deployment.last_deployment_group_for_environment(self)
else
legacy_last_deployment_group
end
end end
def reset_auto_stop def reset_auto_stop
......
...@@ -56,10 +56,6 @@ def batch_load(resource) ...@@ -56,10 +56,6 @@ def batch_load(resource)
resource = resource.preload(environment_associations.except(:last_deployment, :upcoming_deployment)) resource = resource.preload(environment_associations.except(:last_deployment, :upcoming_deployment))
if ::Feature.enabled?(:batch_load_environment_last_deployment_group, resource.first&.project)
temp_deployment_associations[:deployable][:pipeline][:latest_successful_builds] = []
end
Preloaders::Environments::DeploymentPreloader.new(resource) Preloaders::Environments::DeploymentPreloader.new(resource)
.execute_with_union(:last_deployment, temp_deployment_associations) .execute_with_union(:last_deployment, temp_deployment_associations)
...@@ -72,10 +68,8 @@ def batch_load(resource) ...@@ -72,10 +68,8 @@ def batch_load(resource)
environment.last_deployment&.commit&.try(:lazy_author) environment.last_deployment&.commit&.try(:lazy_author)
environment.upcoming_deployment&.commit&.try(:lazy_author) environment.upcoming_deployment&.commit&.try(:lazy_author)
if ::Feature.enabled?(:batch_load_environment_last_deployment_group, environment.project) # Batch loading last_deployment_group which is called later by environment.stop_actions
# Batch loading last_deployment_group which is called later by environment.stop_actions environment.last_deployment_group
environment.last_deployment_group
end
end end
end end
end end
...@@ -101,7 +95,8 @@ def deployment_associations ...@@ -101,7 +95,8 @@ def deployment_associations
metadata: [], metadata: [],
pipeline: { pipeline: {
manual_actions: [:metadata, :deployment], manual_actions: [:metadata, :deployment],
scheduled_actions: [:metadata] scheduled_actions: [:metadata],
latest_successful_builds: []
}, },
project: project_associations, project: project_associations,
deployment: [] deployment: []
......
---
name: batch_load_environment_last_deployment_group
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/86584/
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/363023
milestone: '15.1'
type: development
group: group::release
default_enabled: true
...@@ -856,16 +856,6 @@ ...@@ -856,16 +856,6 @@
it 'returns the successful deployment jobs for the last deployment pipeline' do it 'returns the successful deployment jobs for the last deployment pipeline' do
expect(subject.pluck(:id)).to contain_exactly(deployment_a.id, deployment_b.id) expect(subject.pluck(:id)).to contain_exactly(deployment_a.id, deployment_b.id)
end end
context 'when the feature flag is disabled' do
before do
stub_feature_flags(batch_load_environment_last_deployment_group: false)
end
it 'returns the successful deployment jobs for the last deployment pipeline' do
expect(subject.pluck(:id)).to contain_exactly(deployment_a.id, deployment_b.id)
end
end
end end
end end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册