Commit 044d6166 authored by Alex Buijs's avatar Alex Buijs

Remove by default enabled feature flag

Remove the by default enabled
preload_associations_jobs_request_api_endpoint
feature flag, since the have been no issues.

Changelog: other
parent 07f6bb69
......@@ -169,13 +169,9 @@ module Ci
end
def all_dependencies
if Feature.enabled?(:preload_associations_jobs_request_api_endpoint, project, default_enabled: :yaml)
strong_memoize(:all_dependencies) do
dependencies.all
end
else
dependencies.all
end
end
private
......
......@@ -58,11 +58,7 @@ module Ci
# rubocop: disable CodeReuse/ActiveRecord
def all_dependencies
dependencies = super
if Feature.enabled?(:preload_associations_jobs_request_api_endpoint, project, default_enabled: :yaml)
ActiveRecord::Associations::Preloader.new.preload(dependencies, :job_artifacts_archive)
end
dependencies
end
# rubocop: enable CodeReuse/ActiveRecord
......
---
name: preload_associations_jobs_request_api_endpoint
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57694
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/326477
milestone: "13.11"
type: development
group: group::pipeline execution
default_enabled: true
......@@ -506,25 +506,6 @@ RSpec.describe API::Ci::Runner, :clean_gitlab_redis_shared_state do
end
describe 'preloading job_artifacts_archive' do
context 'when the feature flag is disabled' do
before do
stub_feature_flags(preload_associations_jobs_request_api_endpoint: false)
end
it 'queries the ci_job_artifacts table multiple times' do
expect { request_job }.to exceed_all_query_limit(1).for_model(::Ci::JobArtifact)
end
it 'queries the ci_builds table more than three times' do
expect { request_job }.to exceed_all_query_limit(3).for_model(::Ci::Build)
end
end
context 'when the feature flag is enabled' do
before do
stub_feature_flags(preload_associations_jobs_request_api_endpoint: true)
end
it 'queries the ci_job_artifacts table once only' do
expect { request_job }.not_to exceed_all_query_limit(1).for_model(::Ci::JobArtifact)
end
......@@ -534,7 +515,6 @@ RSpec.describe API::Ci::Runner, :clean_gitlab_redis_shared_state do
end
end
end
end
context 'when pipeline have jobs with artifacts' do
let!(:job) { create(:ci_build, :pending, :queued, :tag, :artifacts, pipeline: pipeline, name: 'spinach', stage: 'test', stage_idx: 0) }
......
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