Commit c1f99e6f authored by Shinya Maeda's avatar Shinya Maeda

Merge branch 'morefice/remove-ci-safe-artifact-content-type-ff' into 'master'

Remove ci_safe_artifact_content_type feature flag

See merge request gitlab-org/gitlab!84457
parents d05ce1ae 03c43e46
......@@ -81,11 +81,7 @@ class Projects::ArtifactsController < Projects::ApplicationController
path = Gitlab::Ci::Build::Artifacts::Path.new(params[:path])
if ::Feature.enabled?(:ci_safe_artifact_content_type, project, default_enabled: :yaml)
send_artifacts_entry(artifacts_file, path)
else
legacy_send_artifacts_entry(artifacts_file, path)
end
end
def keep
......
......@@ -35,12 +35,6 @@ module WorkhorseHelper
head :ok
end
# Send an entry from artifacts through Workhorse
def legacy_send_artifacts_entry(file, entry)
headers.store(*Gitlab::Workhorse.send_artifacts_entry(file, entry))
head :ok
end
# Send an entry from artifacts through Workhorse and set safe content type
def send_artifacts_entry(file, entry)
headers.store(*Gitlab::Workhorse.send_artifacts_entry(file, entry))
......
---
name: ci_safe_artifact_content_type
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/83826
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/357664
milestone: '14.10'
type: development
group: group::pipeline insights
default_enabled: false
......@@ -60,11 +60,7 @@ module API
bad_request! unless path.valid?
if ::Feature.enabled?(:ci_safe_artifact_content_type, build&.project, default_enabled: :yaml)
send_artifacts_entry(build.artifacts_file, path)
else
legacy_send_artifacts_entry(build.artifacts_file, path)
end
end
desc 'Download the artifacts archive from a job' do
......
......@@ -381,18 +381,6 @@ RSpec.describe Projects::ArtifactsController do
let(:store) { ObjectStorage::Store::LOCAL }
let(:archive_path) { JobArtifactUploader.root }
end
context 'when ci_safe_artifact_content_type is disabled' do
before do
stub_feature_flags(ci_safe_artifact_content_type: false)
end
it 'does not let workhorse set content type' do
subject
expect(response.headers).not_to include('Gitlab-Workhorse-Detect-Content-Type')
end
end
end
context 'when the artifact is not zip' do
......
......@@ -561,16 +561,6 @@ RSpec.describe API::Ci::JobArtifacts do
'Gitlab-Workhorse-Send-Data' => /artifacts-entry/,
'Gitlab-Workhorse-Detect-Content-Type' => 'true')
end
context 'when ci_safe_artifact_content_type is disabled' do
before do
stub_feature_flags(ci_safe_artifact_content_type: false)
end
it 'does not let workhorse set content type' do
expect(response.headers).not_to include('Gitlab-Workhorse-Detect-Content-Type')
end
end
end
context 'when project is public with builds access disabled' 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