Commit bebc4a43 authored by Marc Shaw's avatar Marc Shaw

Remove ci_pipeline_ensure_iid_on_skip feature flag

MR: gitlab.com/gitlab-org/gitlab/-/merge_requests/61231
Issue: gitlab.com/gitlab-org/gitlab/-/issues/327661

Changelog: performance
parent 8f42da21
---
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
def perform!
if skipped?
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
# 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
@pipeline.ensure_project_iid!
end
# 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
# which it will lock the InternalId row for the whole transaction
@pipeline.ensure_project_iid!
@pipeline.skip
end
......
......@@ -40,18 +40,6 @@ RSpec.describe Gitlab::Ci::Pipeline::Chain::Skip do
step.perform!
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
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