Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
eca8f951a4
commit
d8f08f84bd
3 changed files with 3 additions and 28 deletions
|
@ -314,13 +314,9 @@ class Environment < ApplicationRecord
|
|||
|
||||
def stop_actions
|
||||
strong_memoize(:stop_actions) do
|
||||
if ::Feature.enabled?(:environment_multiple_stop_actions, project)
|
||||
# Fix N+1 queries it brings to the serializer.
|
||||
# Tracked in https://gitlab.com/gitlab-org/gitlab/-/issues/358780
|
||||
last_deployment_group.map(&:stop_action).compact
|
||||
else
|
||||
[last_deployment&.stop_action].compact
|
||||
end
|
||||
# Fix N+1 queries it brings to the serializer.
|
||||
# Tracked in https://gitlab.com/gitlab-org/gitlab/-/issues/358780
|
||||
last_deployment_group.map(&:stop_action).compact
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
name: environment_multiple_stop_actions
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/84922
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/358911
|
||||
milestone: '14.10'
|
||||
type: development
|
||||
group: group::release
|
||||
default_enabled: false
|
|
@ -683,19 +683,6 @@ RSpec.describe Environment, :use_clean_rails_memory_store_caching do
|
|||
expect(actions.count).to eq(environment.successful_deployments.count)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the feature is disabled' do
|
||||
before do
|
||||
stub_feature_flags(environment_multiple_stop_actions: false)
|
||||
end
|
||||
|
||||
it 'returns the last deployment job stop action' do
|
||||
stop_actions = subject
|
||||
|
||||
expect(stop_actions.first).to eq(close_actions[1])
|
||||
expect(stop_actions.count).to eq(1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue