mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 20:51:43 +00:00
remove search-ranking feature flag (#58120)
* remove search-ranking feature flag * revert * update tests and remove ranking feature flag * add changelog * fix failing tests
This commit is contained in:
parent
2108b62509
commit
3d5d9bded4
@ -43,6 +43,7 @@ All notable changes to Sourcegraph are documented in this file.
|
||||
- The GitHub Proxy service is no longer required and has been removed from deployment options. [#55290](https://github.com/sourcegraph/sourcegraph/issues/55290)
|
||||
- The VSCode search extension "Sourcegraph for VS Code" has been sunset and removed from Sourcegraph
|
||||
repository. [#58023](https://github.com/sourcegraph/sourcegraph/pull/58023)
|
||||
- The feature flag `search-ranking` is now completely removed. [#58156](https://github.com/sourcegraph/sourcegraph/pull/58156)
|
||||
- The notepad UI, notebook creation feature. [#58217](https://github.com/sourcegraph/sourcegraph/pull/58217)
|
||||
|
||||
## Unreleased 5.2.3
|
||||
|
||||
@ -18,7 +18,6 @@ export const FEATURE_FLAGS = [
|
||||
'accessible-symbol-tree',
|
||||
'accessible-file-tree-always-load-ancestors',
|
||||
'enable-ownership-panels',
|
||||
'search-ranking',
|
||||
'blob-page-switch-areas-shortcuts',
|
||||
'clone-progress-logging',
|
||||
'sourcegraph-operator-site-admin-hide-maintenance',
|
||||
|
||||
@ -196,7 +196,6 @@ describe('StreamingSearchResults', () => {
|
||||
assert.calledWith(logSpy, 'search.ranking.result-clicked', {
|
||||
index: 0,
|
||||
type: 'fileMatch',
|
||||
ranked: false,
|
||||
resultsLength: 3,
|
||||
})
|
||||
|
||||
@ -205,7 +204,6 @@ describe('StreamingSearchResults', () => {
|
||||
assert.calledWith(logSpy, 'search.ranking.result-clicked', {
|
||||
index: 2,
|
||||
type: 'fileMatch',
|
||||
ranked: false,
|
||||
resultsLength: 3,
|
||||
})
|
||||
})
|
||||
|
||||
@ -91,7 +91,6 @@ export const StreamingSearchResults: FC<StreamingSearchResultsProps> = props =>
|
||||
const prefetchFileEnabled = useExperimentalFeatures(features => features.enableSearchFilePrefetch ?? false)
|
||||
const [enableSearchResultsKeyboardNavigation] = useFeatureFlag('search-results-keyboard-navigation', true)
|
||||
const [enableRepositoryMetadata] = useFeatureFlag('repository-metadata', true)
|
||||
const [rankingEnabled] = useFeatureFlag('search-ranking')
|
||||
const [sidebarCollapsed, setSidebarCollapsed] = useTemporarySetting('search.sidebar.collapsed', false)
|
||||
|
||||
const showOnboardingTour = useShowOnboardingTour({ authenticatedUser, isSourcegraphDotCom })
|
||||
@ -141,10 +140,9 @@ export const StreamingSearchResults: FC<StreamingSearchResultsProps> = props =>
|
||||
index,
|
||||
type,
|
||||
resultsLength,
|
||||
ranked: rankingEnabled,
|
||||
})
|
||||
},
|
||||
[telemetryService, resultsLength, rankingEnabled]
|
||||
[telemetryService, resultsLength]
|
||||
)
|
||||
|
||||
// Log view event on first load
|
||||
|
||||
@ -90,20 +90,6 @@ func TestSearch(t *testing.T) {
|
||||
})
|
||||
|
||||
testSearchOther(t)
|
||||
|
||||
// Run the search tests with file-based ranking disabled
|
||||
err = client.SetFeatureFlag("search-ranking", false)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
t.Run("graphql with file ranking", func(t *testing.T) {
|
||||
testSearchClient(t, client)
|
||||
})
|
||||
|
||||
t.Run("stream with file ranking", func(t *testing.T) {
|
||||
testSearchClient(t, streamClient)
|
||||
})
|
||||
}
|
||||
|
||||
// searchClient is an interface so we can swap out a streaming vs graphql
|
||||
|
||||
Loading…
Reference in New Issue
Block a user