Commit c4f083f5 authored by Stan Hu's avatar Stan Hu

Merge branch 'remove-api-caching-tags-ff' into 'master'

Remove api_caching_tags feature flag

See merge request gitlab-org/gitlab!80606
parents 36bc0085 cf0390e9
---
name: api_caching_tags
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/54975
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/324391
milestone: '13.10'
type: development
group: group::source code
default_enabled: false
...@@ -33,11 +33,7 @@ module API ...@@ -33,11 +33,7 @@ module API
paginated_tags = Gitlab::Pagination::GitalyKeysetPager.new(self, user_project).paginate(tags_finder) paginated_tags = Gitlab::Pagination::GitalyKeysetPager.new(self, user_project).paginate(tags_finder)
if Feature.enabled?(:api_caching_tags, user_project, type: :development)
present_cached paginated_tags, with: Entities::Tag, project: user_project, cache_context: -> (_tag) { user_project.cache_key } present_cached paginated_tags, with: Entities::Tag, project: user_project, cache_context: -> (_tag) { user_project.cache_key }
else
present paginated_tags, with: Entities::Tag, project: user_project
end
rescue Gitlab::Git::InvalidPageToken => e rescue Gitlab::Git::InvalidPageToken => e
unprocessable_entity!(e.message) unprocessable_entity!(e.message)
......
...@@ -16,12 +16,11 @@ RSpec.describe API::Tags do ...@@ -16,12 +16,11 @@ RSpec.describe API::Tags do
project.add_developer(user) project.add_developer(user)
end end
describe 'GET /projects/:id/repository/tags' do describe 'GET /projects/:id/repository/tags', :use_clean_rails_memory_store_caching do
before do before do
stub_feature_flags(tag_list_keyset_pagination: false) stub_feature_flags(tag_list_keyset_pagination: false)
end end
shared_examples "get repository tags" do
let(:route) { "/projects/#{project_id}/repository/tags" } let(:route) { "/projects/#{project_id}/repository/tags" }
context 'sorting' do context 'sorting' do
...@@ -196,14 +195,6 @@ RSpec.describe API::Tags do ...@@ -196,14 +195,6 @@ RSpec.describe API::Tags do
end end
end end
end end
end
context ":api_caching_tags flag enabled", :use_clean_rails_memory_store_caching do
before do
stub_feature_flags(api_caching_tags: true)
end
it_behaves_like "get repository tags"
describe "cache expiry" do describe "cache expiry" do
let(:route) { "/projects/#{project_id}/repository/tags" } let(:route) { "/projects/#{project_id}/repository/tags" }
...@@ -252,15 +243,6 @@ RSpec.describe API::Tags do ...@@ -252,15 +243,6 @@ RSpec.describe API::Tags do
it_behaves_like "cache expired" it_behaves_like "cache expired"
end end
end end
end
context ":api_caching_tags flag disabled" do
before do
stub_feature_flags(api_caching_tags: false)
end
it_behaves_like "get repository tags"
end
context 'when gitaly is unavailable' do context 'when gitaly is unavailable' do
let(:route) { "/projects/#{project_id}/repository/tags" } let(:route) { "/projects/#{project_id}/repository/tags" }
......
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