From 18404e701d99fdf9d91dcf0c38496961eb6be89e Mon Sep 17 00:00:00 2001 From: Brian Williams Date: Thu, 16 Mar 2023 13:32:31 -0500 Subject: [PATCH] Remove full_path_project_search feature flag Changelog: other --- app/assets/javascripts/api/projects_api.js | 2 +- .../development/full_path_project_search.yml | 8 -------- doc/user/search/index.md | 10 ++++------ lib/gitlab/gon_helper.rb | 1 - spec/frontend/api/projects_api_spec.js | 18 +----------------- .../frequent_items/components/app_spec.js | 1 - .../frequent_items/store/actions_spec.js | 1 - .../components/import_history_app_spec.js | 1 - 8 files changed, 6 insertions(+), 36 deletions(-) delete mode 100644 config/feature_flags/development/full_path_project_search.yml diff --git a/app/assets/javascripts/api/projects_api.js b/app/assets/javascripts/api/projects_api.js index 5c0d101ef5bf56..5a794dcd0355d9 100644 --- a/app/assets/javascripts/api/projects_api.js +++ b/app/assets/javascripts/api/projects_api.js @@ -21,7 +21,7 @@ export function getProjects(query, options, callback = () => {}) { defaults.membership = true; } - if (gon.features.fullPathProjectSearch && query?.includes('/')) { + if (query?.includes('/')) { defaults.search_namespaces = true; } diff --git a/config/feature_flags/development/full_path_project_search.yml b/config/feature_flags/development/full_path_project_search.yml deleted file mode 100644 index 19ce8d055022fa..00000000000000 --- a/config/feature_flags/development/full_path_project_search.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: full_path_project_search -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/108906 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/388473 -milestone: '15.9' -type: development -group: group::threat insights -default_enabled: true diff --git a/doc/user/search/index.md b/doc/user/search/index.md index 310d733800a204..f6733abd305ad0 100644 --- a/doc/user/search/index.md +++ b/doc/user/search/index.md @@ -95,12 +95,10 @@ To filter code search results by one or more languages: ## Search for projects by full path -> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/108906) in GitLab 15.9 [with a flag](../../administration/feature_flags.md) named `full_path_project_search`. Disabled by default. - -FLAG: -On self-managed GitLab, by default this feature is not available. -To make it available, ask an administrator to [enable the feature flag](../../administration/feature_flags.md) named `full_path_project_search`. -On GitLab.com, this feature is not available. +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/108906) in GitLab 15.9 [with a flag](../../administration/feature_flags.md) named `full_path_project_search`. Disabled by default. +> - [Enabled](https://gitlab.com/gitlab-org/gitlab/-/issues/388473) on GitLab.com in GitLab 15.9. +> - [Enabled](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/111808) on self-managed GitLab 15.10. +> - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114932) in GitLab 15.11. Feature flag `full_path_project_search` removed. You can search for a project by entering its full path (including the namespace it belongs to) in the search box. As you type the project path, [autocomplete suggestions](#autocomplete-suggestions) are displayed. diff --git a/lib/gitlab/gon_helper.rb b/lib/gitlab/gon_helper.rb index d7d06aa52713a1..63fbbf48556e9f 100644 --- a/lib/gitlab/gon_helper.rb +++ b/lib/gitlab/gon_helper.rb @@ -66,7 +66,6 @@ def add_gon_variables push_frontend_feature_flag(:new_header_search) push_frontend_feature_flag(:source_editor_toolbar) push_frontend_feature_flag(:vscode_web_ide, current_user) - push_frontend_feature_flag(:full_path_project_search, current_user) end # Exposes the state of a feature flag to the frontend code. diff --git a/spec/frontend/api/projects_api_spec.js b/spec/frontend/api/projects_api_spec.js index 2de56fae0c20d1..2d54d6173fde26 100644 --- a/spec/frontend/api/projects_api_spec.js +++ b/spec/frontend/api/projects_api_spec.js @@ -9,14 +9,11 @@ describe('~/api/projects_api.js', () => { let mock; const projectId = 1; - const setfullPathProjectSearch = (value) => { - window.gon.features.fullPathProjectSearch = value; - }; beforeEach(() => { mock = new MockAdapter(axios); - window.gon = { api_version: 'v7', features: { fullPathProjectSearch: true } }; + window.gon = { api_version: 'v7' }; }); afterEach(() => { @@ -68,19 +65,6 @@ describe('~/api/projects_api.js', () => { expect(data.data).toEqual(expectedProjects); }); }); - - it('does not search namespaces if fullPathProjectSearch is disabled', () => { - setfullPathProjectSearch(false); - const expectedParams = { params: { per_page: 20, search: 'group/project1', simple: true } }; - const query = 'group/project1'; - - mock.onGet(expectedUrl).reply(HTTP_STATUS_OK, { data: expectedProjects }); - - return projectsApi.getProjects(query, options).then(({ data }) => { - expect(axios.get).toHaveBeenCalledWith(expectedUrl, expectedParams); - expect(data.data).toEqual(expectedProjects); - }); - }); }); describe('importProjectMembers', () => { diff --git a/spec/frontend/frequent_items/components/app_spec.js b/spec/frontend/frequent_items/components/app_spec.js index 4f5788dcb773b8..a8ae72eb4b3541 100644 --- a/spec/frontend/frequent_items/components/app_spec.js +++ b/spec/frontend/frequent_items/components/app_spec.js @@ -33,7 +33,6 @@ describe('Frequent Items App Component', () => { const createComponent = (props = {}) => { const session = currentSession[TEST_NAMESPACE]; gon.api_version = session.apiVersion; - gon.features = { fullPathProjectSearch: true }; wrapper = mountExtended(App, { store, diff --git a/spec/frontend/frequent_items/store/actions_spec.js b/spec/frontend/frequent_items/store/actions_spec.js index c228bca4973b5f..2feb488da2cb9f 100644 --- a/spec/frontend/frequent_items/store/actions_spec.js +++ b/spec/frontend/frequent_items/store/actions_spec.js @@ -25,7 +25,6 @@ describe('Frequent Items Dropdown Store Actions', () => { mockedState.namespace = mockNamespace; mockedState.storageKey = mockStorageKey; - gon.features = { fullPathProjectSearch: true }; }); afterEach(() => { diff --git a/spec/frontend/pages/import/history/components/import_history_app_spec.js b/spec/frontend/pages/import/history/components/import_history_app_spec.js index 43cbac25fe8c99..bc9762abf86638 100644 --- a/spec/frontend/pages/import/history/components/import_history_app_spec.js +++ b/spec/frontend/pages/import/history/components/import_history_app_spec.js @@ -61,7 +61,6 @@ describe('ImportHistoryApp', () => { beforeEach(() => { gon.api_version = 'v4'; - gon.features = { fullPathProjectSearch: true }; mock = new MockAdapter(axios); }); -- GitLab