Skip to content
Snippets Groups Projects
Commit 64ac8dba authored by Stan Hu's avatar Stan Hu
Browse files

Merge branch '397738-feature-flag-cleanup-show_tags_on_commits_view' into 'master'

Remove show_tags_on_commits_view feature flag

See merge request !118064



Merged-by: default avatarStan Hu <stanhu@gmail.com>
Approved-by: default avatarStan Hu <stanhu@gmail.com>
Approved-by: default avatarPatrick Cyiza <jpcyiza@gitlab.com>
Co-authored-by: default avatarj.seto <jseto@gitlab.com>
parents 6e94c88c db581e19
No related branches found
No related tags found
2 merge requests!122597doc/gitaly: Remove references to removed metrics,!118064Remove show_tags_on_commits_view feature flag
Pipeline #850012758 canceled
......@@ -91,7 +91,7 @@ def set_commits
@repository.commits(ref, **options)
end
@commits.load_tags if Feature.enabled?(:show_tags_on_commits_view, @project)
@commits.load_tags
@commits.each(&:lazy_author) # preload authors
@commits = @commits.with_markdown_cache.with_latest_pipeline(ref)
......
......@@ -160,23 +160,18 @@ def cherry_pick_projects_data(project)
# This includes a keyed hash for values that can be nil, to prevent invalid cache entries
# being served if the order should change in future.
def commit_partial_cache_key(commit, ref:, merge_request:, request:)
keyed_hash = {
merge_request: merge_request&.cache_key,
pipeline_status: commit.detailed_status_for(ref)&.cache_key,
xhr: request.xhr?,
controller: controller.controller_path,
path: @path # referred to in #link_to_browse_code
}
if Feature.enabled?(:show_tags_on_commits_view, commit.project)
keyed_hash[:referenced_by] = tag_checksum(commit.referenced_by)
end
[
commit,
commit.author,
ref,
keyed_hash
{
merge_request: merge_request&.cache_key,
pipeline_status: commit.detailed_status_for(ref)&.cache_key,
xhr: request.xhr?,
controller: controller.controller_path,
path: @path, # referred to in #link_to_browse_code
referenced_by: tag_checksum(commit.referenced_by)
}
]
end
......
---
name: show_tags_on_commits_view
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/111493
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/392003
milestone: '15.10'
type: development
group: group::source code
default_enabled: true
......@@ -108,22 +108,6 @@
get :show, params: { namespace_id: project.namespace, project_id: project, id: 'master/README.md' }
end
context 'when the show_tags_on_commits_view flag is disabled' do
let(:id) { "master/README.md" }
before do
stub_feature_flags(show_tags_on_commits_view: false)
end
it 'does not load tags' do
expect_next_instance_of(CommitCollection) do |collection|
expect(collection).not_to receive(:load_tags)
end
get :show, params: { namespace_id: project.namespace, project_id: project, id: id }
end
end
context "when the ref name ends in .atom" do
context "when the ref does not exist with the suffix" do
before do
......
......@@ -341,27 +341,6 @@ def standard_expected_data
])
end
context 'when the show_tags_on_commits_view flag is disabled' do
before do
stub_feature_flags(show_tags_on_commits_view: false)
end
specify do
expect(subject).to eq([
commit,
commit.author,
ref,
{
merge_request: merge_request.cache_key,
pipeline_status: pipeline.cache_key,
xhr: true,
controller: "commits",
path: current_path
}
])
end
end
describe "final cache key output" do
subject { ActiveSupport::Cache.expand_cache_key(cache_key) }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment