Commit f78953b6 authored by David Kim's avatar David Kim

Merge branch 'remove_flag_ci_pipeline_ensure_iid_on_skip' into 'master'

Remove ci_pipeline_ensure_iid_on_skip feature flag [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!61231
parents 8f42da21 bebc4a43
---
title: Ensure iid is set before skipping ci pipeline
merge_request: 61231
author:
type: performance
---
name: ci_pipeline_ensure_iid_on_skip
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/59342
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/327661
milestone: '13.12'
type: development
group: group::code review
default_enabled: false
...@@ -12,12 +12,10 @@ module Gitlab ...@@ -12,12 +12,10 @@ module Gitlab
def perform! def perform!
if skipped? if skipped?
if @command.save_incompleted if @command.save_incompleted
if Feature.enabled?(:ci_pipeline_ensure_iid_on_skip, @pipeline.project, default_enabled: :yaml) # Project iid must be called outside a transaction, so we ensure it is set here
# Project iid must be called outside a transaction, so we ensure it is set here # otherwise it may be set within the state transition transaction of the skip call
# otherwise it may be set within the state transition transaction of the skip call # which it will lock the InternalId row for the whole transaction
# which it will lock the InternalId row for the whole transaction @pipeline.ensure_project_iid!
@pipeline.ensure_project_iid!
end
@pipeline.skip @pipeline.skip
end end
......
...@@ -40,18 +40,6 @@ RSpec.describe Gitlab::Ci::Pipeline::Chain::Skip do ...@@ -40,18 +40,6 @@ RSpec.describe Gitlab::Ci::Pipeline::Chain::Skip do
step.perform! step.perform!
end end
context 'when the ci_pipeline_ensure_iid_on_save feature flag is off' do
before do
stub_feature_flags(ci_pipeline_ensure_iid_on_skip: false)
end
it 'does not call ensure_project_iid explicitly' do
expect(pipeline).not_to receive(:ensure_project_iid!)
step.perform!
end
end
end end
context 'when pipeline has not been skipped' do context 'when pipeline has not been skipped' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment