Commit 1ccb939f authored by Shinya Maeda's avatar Shinya Maeda

Merge branch 'remove_ci_expose_arbitrary_artifacts_in_mr_feature_flag' into 'master'

Remove `ci_expose_arbitrary_artifacts_in_mr` feature flag

Closes #34317

See merge request gitlab-org/gitlab!29363
parents db2e6389 91fdf8c3
......@@ -1350,8 +1350,6 @@ class MergeRequest < ApplicationRecord
end
def has_exposed_artifacts?
return false unless Feature.enabled?(:ci_expose_arbitrary_artifacts_in_mr, default_enabled: true)
actual_head_pipeline&.has_exposed_artifacts?
end
......
---
title: Remove ci_expose_arbitrary_artifacts_in_mr feature flag
merge_request: 29363
author: Lee Tickett
type: other
......@@ -50,8 +50,6 @@ module Gitlab
end
def expose_as_present?
return false unless Feature.enabled?(:ci_expose_arbitrary_artifacts_in_mr, default_enabled: true)
# This duplicates the `validates :config, type: Hash` above,
# but Validatable currently doesn't halt the validation
# chain if it encounters a validation error.
......
......@@ -935,34 +935,6 @@ describe Projects::MergeRequestsController do
}])
end
end
context 'when feature flag :ci_expose_arbitrary_artifacts_in_mr is disabled' do
let(:job_options) do
{
artifacts: {
paths: ['ci_artifacts.txt'],
expose_as: 'Exposed artifact'
}
}
end
let(:report) { double }
before do
stub_feature_flags(ci_expose_arbitrary_artifacts_in_mr: false)
end
it 'does not send polling interval' do
expect(Gitlab::PollingInterval).not_to receive(:set_header)
subject
end
it 'returns 204 HTTP status' do
subject
expect(response).to have_gitlab_http_status(:no_content)
end
end
end
context 'when pipeline does not have jobs with exposed artifacts' do
......
......@@ -123,28 +123,6 @@ describe Gitlab::Ci::Config::Entry::Artifacts do
end
end
end
context 'when feature flag :ci_expose_arbitrary_artifacts_in_mr is disabled' do
before do
stub_feature_flags(ci_expose_arbitrary_artifacts_in_mr: false)
end
context 'when syntax is correct' do
let(:config) { { expose_as: 'Test results', paths: ['test.txt'] } }
it 'is valid' do
expect(entry.errors).to be_empty
end
end
context 'when syntax for :expose_as is incorrect' do
let(:config) { { paths: %w[results.txt], expose_as: '' } }
it 'is valid' do
expect(entry.errors).to be_empty
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