Skip to content
代码片段 群组 项目
未验证 提交 3d1cb987 编辑于 作者: Bala Kumar's avatar Bala Kumar 提交者: GitLab
浏览文件

Merge branch 'bwill/remove-group-level-dependencies-filtering' into 'master'

Remove the `group_level_dependencies_filtering` feature flag

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/144672



Merged-by: default avatarBala Kumar <sbalakumar@gitlab.com>
Approved-by: default avatarDavid Pisek <dpisek@gitlab.com>
Approved-by: default avatarBala Kumar <sbalakumar@gitlab.com>
Approved-by: default avatarMalcolm Locke <mlocke@gitlab.com>
Reviewed-by: default avatarDavid Pisek <dpisek@gitlab.com>
Reviewed-by: default avatarBrian Williams <bwilliams@gitlab.com>
Reviewed-by: default avatarMalcolm Locke <mlocke@gitlab.com>
Co-authored-by: default avatarBrian Williams <bwilliams@gitlab.com>
No related branches found
No related tags found
无相关合并请求
......@@ -68,11 +68,7 @@ Details of each dependency are listed, sorted by decreasing severity of vulnerab
## Filter dependency list
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/422356) in GitLab 16.7 [with a flag](../../../administration/feature_flags.md) named `group_level_dependencies_filtering`. Disabled by default.
> - [Enabled on GitLab.com and self-managed](https://gitlab.com/gitlab-org/gitlab/-/issues/424727) in GitLab 16.10.
FLAG:
On self-managed GitLab, by default this feature is available. To hide the feature, an administrator can [disable the feature flag](../../../administration/feature_flags.md) named `group_level_dependencies_filtering`.
On GitLab.com, this feature is available.
> - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/422356) in GitLab 16.10. Feature flag `group_level_dependencies_filtering` removed.
In the group-level dependency list you can filter by:
......
......@@ -4,7 +4,7 @@ import { GlSorting } from '@gitlab/ui';
import { mapActions, mapState } from 'vuex';
import { omit } from 'lodash';
import { __ } from '~/locale';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import GroupDependenciesFilteredSearch from 'ee/dependencies/components/filtered_search/group_dependencies_filtered_search.vue';
import { NAMESPACE_PROJECT } from '../constants';
import { DEPENDENCY_LIST_TYPES } from '../store/constants';
import {
......@@ -21,10 +21,8 @@ export default {
name: 'DependenciesActions',
components: {
GlSorting,
GroupDependenciesFilteredSearch: () =>
import('ee/dependencies/components/filtered_search/group_dependencies_filtered_search.vue'),
GroupDependenciesFilteredSearch,
},
mixins: [glFeatureFlagsMixin()],
inject: ['namespaceType', 'belowGroupLimit'],
props: {
namespace: {
......@@ -84,7 +82,7 @@ export default {
class="gl-display-flex gl-p-5 gl-bg-gray-10 gl-border-t-1 gl-border-t-solid gl-border-gray-100 gl-align-items-flex-start"
>
<group-dependencies-filtered-search
v-if="glFeatures.groupLevelDependenciesFiltering && !isProjectNamespace"
v-if="!isProjectNamespace"
class="gl-mr-3 gl-flex-grow-1 gl-min-w-0"
/>
<gl-sorting
......
......@@ -4,10 +4,6 @@ module Groups
class DependenciesController < Groups::ApplicationController
include GovernUsageGroupTracking
before_action only: :index do
push_frontend_feature_flag(:group_level_dependencies_filtering, group)
end
before_action :authorize_read_dependency_list!
before_action :validate_project_ids_limit!, only: :index
......@@ -43,7 +39,7 @@ def locations
end
def licenses
return render_not_authorized unless filtering_allowed?
return render_not_authorized unless below_group_limit?
catalogue = Gitlab::SPDX::Catalogue.latest
......@@ -77,7 +73,7 @@ def dependencies_finder
end
def dependencies_finder_params
if filtering_allowed?
if below_group_limit?
params.permit(
:page,
:per_page,
......@@ -122,10 +118,6 @@ def set_below_group_limit
@below_group_limit = below_group_limit?
end
def filtering_allowed?
Feature.enabled?(:group_level_dependencies_filtering, group) && below_group_limit?
end
def below_group_limit?
group.count_within_namespaces <= GROUP_COUNT_LIMIT
end
......
---
name: group_level_dependencies_filtering
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/131339
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/424727
milestone: '16.4'
type: development
group: group::threat insights
default_enabled: true
......@@ -30,7 +30,6 @@ describe('DependenciesActions component', () => {
propsData: { ...propsData },
provide: {
...objectBasicProp,
glFeatures: { groupLevelDependenciesFiltering: true },
...provide,
},
});
......@@ -81,6 +80,10 @@ describe('DependenciesActions component', () => {
);
});
it('renders a filtered-search input', () => {
expect(wrapper.findComponent(GroupDependenciesFilteredSearch).exists()).toBe(true);
});
describe('with the "belowGroupLimit" set to false', () => {
beforeEach(async () => {
factory({
......@@ -106,23 +109,6 @@ describe('DependenciesActions component', () => {
);
});
});
describe('with the "groupLevelDependenciesFiltering" feature flag disabled', () => {
beforeEach(async () => {
factory({
propsData: { namespace },
provide: {
namespaceType: 'group',
glFeatures: { groupLevelDependenciesFiltering: false },
},
});
await nextTick();
});
it('does not render a filtered-search input', () => {
expect(wrapper.findComponent(GroupDependenciesFilteredSearch).exists()).toBe(false);
});
});
});
it('dispatches the toggleSortOrder action on clicking the sort order button', () => {
......
......@@ -48,18 +48,6 @@
let(:request) { subject }
end
context 'when group_level_dependencies_filtering is disabled' do
before do
stub_feature_flags(group_level_dependencies_filtering: false)
end
it 'does not show group limit warning' do
subject
expect(assigns(:below_group_limit)).to eq(true)
end
end
context 'when the group hierarchy depth is too high' do
before do
stub_const('::Groups::DependenciesController::GROUP_COUNT_LIMIT', 0)
......@@ -321,21 +309,6 @@
expect(json_response['dependencies'].pluck('name')).to eq([sbom_occurrence_bundler.name])
end
context 'when `group_level_dependencies_filtering` is disabled' do
before do
stub_feature_flags(group_level_dependencies_filtering: false)
end
it 'ignores the filter' do
subject
expect(json_response['dependencies'].pluck('name')).to match_array([
sbom_occurrence_bundler.component_name,
sbom_occurrence_npm.component_name
])
end
end
context 'when the group hierarchy depth is too high' do
before do
stub_const('::Groups::DependenciesController::GROUP_COUNT_LIMIT', 0)
......@@ -561,18 +534,6 @@
license_names = json_response['licenses'].pluck('name')
expect(license_names.sort).to eq(license_names)
end
context 'when feature flag `group_level_dependencies_filtering` is disabled' do
before do
stub_feature_flags(group_level_dependencies_filtering: false)
end
it 'returns http status :forbidden' do
subject
expect(response).to have_gitlab_http_status(:forbidden)
end
end
end
context 'when user is not allowed to access group level dependencies' do
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册