Advanced Search: Obsolete results
Summary
In Slack, @jessieay has reported
Recently, searches for code in gitlab/gitlab-org have regularly been returning results that are "no longer on master" when clicked
Steps to reproduce
- Open https://gitlab.com/search?search=OBSERVABILITY_SCOPES&nav_source=navbar&project_id=278964&group_id=9970&search_code=true&repository_ref=master
- Click
doc/architecture/blueprints/observability/tracing/index.md
- You'll see that the file is no longer available.
What is the current bug behavior?
What is the expected correct behavior?
Relevant logs and/or screenshots
[ gprd ] production> project.index_status
=>
#<IndexStatus:0x00007f3f595d34d8
id: 1857196,
project_id: 278964,
indexed_at: Fri, 14 Jul 2023 09:38:09.175171000 UTC +00:00,
note: nil,
last_commit: "68c2672125d374b51aa1454f20580fde6a6557aa",
created_at: Tue, 04 Feb 2020 12:29:12.476235000 UTC +00:00,
updated_at: Fri, 14 Jul 2023 09:38:09.176824000 UTC +00:00,
last_wiki_commit: "0000000000000000000000000000000000000000",
wiki_indexed_at: Tue, 04 Feb 2020 13:43:12.931557000 UTC +00:00>
Click to see raw query and response
POST gitlab-production/_search?routing=project_278964&timeout=30s
{ "query": { "bool": { "must": { "simple_query_string": { "_name": "blob:match:search_terms", "fields": [ "blob.content", "blob.file_name", "blob.path" ], "query": "OBSERVABILITY_SCOPES", "default_operator": "and" } }, "must_not": [], "should": [], "filter": [ { "bool": { "should": [ { "bool": { "filter": [ { "terms": { "_name": "blob:authorized:project:membership:id", "project_id": [ 278964 ] } }, { "terms": { "_name": "blob:authorized:project:repository:enabled_or_private", "repository_access_level": [ 20, 10 ] } } ] } } ], "_name": "blob:authorized:project" } }, { "term": { "type": { "_name": "doc:is_a:blob", "value": "blob" } } }, { "terms": { "_name": "blob:related:repositories", "blob.rid": [ 278964 ] } } ] } }, "size": 20, "from": 0, "sort": [ "_score" ], "highlight": { "pre_tags": [ "gitlabelasticsearch→" ], "post_tags": [ "←gitlabelasticsearch" ], "number_of_fragments": 0, "fields": { "blob.content": {}, "blob.file_name": {} } } }
Possible fixes
Backport plan
In gitlab-elasticsearch-indexer
repo
-
create a realease-4.3.8 branch built off the 4.3.8 tag, add protection for it -
create MR to merge the fix into that branch gitlab-elasticsearch-indexer!253 (merged) (merged) -
create MR to bump the version & changelog: gitlab-elasticsearch-indexer!265 (merged) -
create a new tag 4.3.10 for the branch once the two MRs are merged
In gitlab
repo
-
create MR in 16-3-ee-release branch, update indexer version to 4.3.10 !131073 (merged)
Edited by Terri Chu