Commit 9a1a777e authored by Alex Kalderimis's avatar Alex Kalderimis

Remove jira_sync_builds feature flag

This enables the Jira sync builds feature.
parent 9ba5b578
...@@ -262,8 +262,6 @@ module Ci ...@@ -262,8 +262,6 @@ module Ci
end end
after_transition any => any do |pipeline| after_transition any => any do |pipeline|
next unless Feature.enabled?(:jira_sync_builds, pipeline.project)
pipeline.run_after_commit do pipeline.run_after_commit do
# Passing the seq-id ensures this is idempotent # Passing the seq-id ensures this is idempotent
seq_id = ::Atlassian::JiraConnect::Client.generate_update_sequence_id seq_id = ::Atlassian::JiraConnect::Client.generate_update_sequence_id
......
...@@ -14,7 +14,6 @@ module JiraConnect ...@@ -14,7 +14,6 @@ module JiraConnect
pipeline = Ci::Pipeline.find_by_id(pipeline_id) pipeline = Ci::Pipeline.find_by_id(pipeline_id)
return unless pipeline return unless pipeline
return unless Feature.enabled?(:jira_sync_builds, pipeline.project)
::JiraConnect::SyncService ::JiraConnect::SyncService
.new(pipeline.project) .new(pipeline.project)
......
---
title: Sync pipeline builds to Jira
merge_request: 51627
author:
type: added
---
name: jira_sync_builds
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/49348
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/292013
milestone: '13.7'
type: development
group: group::ecosystem
default_enabled: false
...@@ -69,8 +69,6 @@ module Atlassian ...@@ -69,8 +69,6 @@ module Atlassian
end end
def store_build_info(project:, pipelines:, update_sequence_id: nil) def store_build_info(project:, pipelines:, update_sequence_id: nil)
return unless Feature.enabled?(:jira_sync_builds, project)
builds = pipelines.map do |pipeline| builds = pipelines.map do |pipeline|
build = ::Atlassian::JiraConnect::Serializers::BuildEntity.represent( build = ::Atlassian::JiraConnect::Serializers::BuildEntity.represent(
pipeline, pipeline,
......
...@@ -384,24 +384,6 @@ RSpec.describe Atlassian::JiraConnect::Client do ...@@ -384,24 +384,6 @@ RSpec.describe Atlassian::JiraConnect::Client do
subject.send(:store_build_info, project: project, pipelines: pipelines.take(1)) subject.send(:store_build_info, project: project, pipelines: pipelines.take(1))
end end
it 'does not call the API if the feature flag is not enabled' do
stub_feature_flags(jira_sync_builds: false)
expect(subject).not_to receive(:post)
subject.send(:store_build_info, project: project, pipelines: pipelines)
end
it 'does call the API if the feature flag enabled for the project' do
stub_feature_flags(jira_sync_builds: project)
expect(subject).to receive(:post)
.with('/rest/builds/0.1/bulk', { builds: Array })
.and_call_original
subject.send(:store_build_info, project: project, pipelines: pipelines)
end
context 'there are errors' do context 'there are errors' do
let(:failures) do let(:failures) do
[{ errors: [{ message: 'X' }, { message: 'Y' }] }, { errors: [{ message: 'Z' }] }] [{ errors: [{ message: 'X' }, { message: 'Y' }] }, { errors: [{ message: 'Z' }] }]
......
...@@ -1261,26 +1261,6 @@ RSpec.describe Ci::Pipeline, :mailer, factory_default: :keep do ...@@ -1261,26 +1261,6 @@ RSpec.describe Ci::Pipeline, :mailer, factory_default: :keep do
pipeline.send(event) pipeline.send(event)
end end
context 'the feature is disabled' do
it 'does not trigger a worker' do
stub_feature_flags(jira_sync_builds: false)
expect(worker).not_to receive(:perform_async)
pipeline.send(event)
end
end
context 'the feature is enabled for this project' do
it 'does trigger a worker' do
stub_feature_flags(jira_sync_builds: pipeline.project)
expect(worker).to receive(:perform_async)
pipeline.send(event)
end
end
end end
end end
end end
......
...@@ -32,29 +32,5 @@ RSpec.describe ::JiraConnect::SyncBuildsWorker do ...@@ -32,29 +32,5 @@ RSpec.describe ::JiraConnect::SyncBuildsWorker do
subject subject
end end
end end
context 'when the feature flag is disabled' do
before do
stub_feature_flags(jira_sync_builds: false)
end
it 'does not call the sync service' do
expect_next(::JiraConnect::SyncService).not_to receive(:execute)
subject
end
end
context 'when the feature flag is enabled for this project' do
before do
stub_feature_flags(jira_sync_builds: pipeline.project)
end
it 'calls the sync service' do
expect_next(::JiraConnect::SyncService).to receive(:execute)
subject
end
end
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