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:
Bolaji Olajide 2023-11-10 12:02:44 +01:00 committed by GitHub
parent 2108b62509
commit 3d5d9bded4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 2 additions and 20 deletions

View File

@ -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

View File

@ -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',

View File

@ -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,
})
})

View File

@ -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

View File

@ -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