Commit 63f53da0 authored by Marc Shaw's avatar Marc Shaw

Remove the ci_pipeline_ensure_iid_on_drop feature flag

MR: gitlab.com/gitlab-org/gitlab/-/merge_requests/59626
Issue: gitlab.com/gitlab-org/gitlab/-/issues/326886
parent 8b407f0a
---
title: Ensure the project iid is set before dropping pipeline
merge_request: 59626
author:
type: performance
---
name: ci_pipeline_ensure_iid_on_drop
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57783
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/326886
milestone: '13.11'
type: development
group: group::code review
default_enabled: false
......@@ -31,12 +31,10 @@ module Gitlab
return if pipeline.readonly?
if drop_reason && command.save_incompleted
if Feature.enabled?(:ci_pipeline_ensure_iid_on_drop, pipeline.project, default_enabled: :yaml)
# 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 drop! call
# which it will lock the InternalId row for the whole transaction
pipeline.ensure_project_iid!
end
pipeline.drop!(drop_reason)
else
......
......@@ -57,14 +57,5 @@ RSpec.describe Gitlab::Ci::Pipeline::Chain::Helpers do
end
end
end
context 'when the ci_pipeline_ensure_iid_on_drop feature flag is false' do
it 'does not ensure the project iid' do
stub_feature_flags(ci_pipeline_ensure_iid_on_drop: false)
expect(pipeline).to receive(:ensure_project_iid!).once
subject.error(message, config_error: true)
end
end
end
end
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