Commit e9dfb832 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'id-fix-timeout-query' into 'master'

Reduce number of scanned commits for code intelligence

See merge request gitlab-org/gitlab!36093
parents b64b4cb3 94aee0e4
---
title: Reduce number of scanned commits for code intelligence
merge_request: 36093
author:
type: performance
...@@ -5,7 +5,7 @@ module Gitlab ...@@ -5,7 +5,7 @@ module Gitlab
include Gitlab::Utils::StrongMemoize include Gitlab::Utils::StrongMemoize
include Gitlab::Routing include Gitlab::Routing
LATEST_COMMITS_LIMIT = 10 LATEST_COMMITS_LIMIT = 2
def initialize(project, commit_sha) def initialize(project, commit_sha)
@project = project @project = project
......
...@@ -5,7 +5,7 @@ require 'spec_helper' ...@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec.describe Gitlab::CodeNavigationPath do RSpec.describe Gitlab::CodeNavigationPath do
context 'when there is an artifact with code navigation data' do context 'when there is an artifact with code navigation data' do
let_it_be(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
let_it_be(:sha) { project.repository.commits('master', limit: 5).last.id } let_it_be(:sha) { project.repository.commits('master', limit: Gitlab::CodeNavigationPath::LATEST_COMMITS_LIMIT).last.id }
let_it_be(:pipeline) { create(:ci_pipeline, project: project, sha: sha) } let_it_be(:pipeline) { create(:ci_pipeline, project: project, sha: sha) }
let_it_be(:job) { create(:ci_build, pipeline: pipeline) } let_it_be(:job) { create(:ci_build, pipeline: pipeline) }
let_it_be(:artifact) { create(:ci_job_artifact, :lsif, job: job) } let_it_be(:artifact) { create(:ci_job_artifact, :lsif, job: job) }
......
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