diff --git a/.gitlab/ci/qa-common/variables.gitlab-ci.yml b/.gitlab/ci/qa-common/variables.gitlab-ci.yml
index 8f24cf1f5e5..8a6e3d22583 100644
--- a/.gitlab/ci/qa-common/variables.gitlab-ci.yml
+++ b/.gitlab/ci/qa-common/variables.gitlab-ci.yml
@@ -6,6 +6,7 @@ variables:
ALLURE_JOB_NAME: $CI_PROJECT_NAME
COLORIZED_LOGS: "true"
FEATURE_FLAGS: ""
+ TEST_RUNNER_TAG: e2e
QA_LOG_LEVEL: "info"
QA_TESTS: ""
# run all tests by default when package-and-test is included natively in other projects
diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml
index dc5a412cc38..d15ef6cde4e 100644
--- a/.gitlab/ci/rules.gitlab-ci.yml
+++ b/.gitlab/ci/rules.gitlab-ci.yml
@@ -167,6 +167,9 @@
.if-ruby-branch: &if-ruby-branch
if: '$CI_COMMIT_BRANCH =~ /^ruby\d+(_\d)*$/ || $CI_MERGE_REQUEST_LABELS =~ /pipeline:run-in-ruby\d+(_\d)*/'
+.if-renovate-fork: &if-renovate-fork
+ if: '$CI_SERVER_HOST == "gitlab.com" && $CI_PROJECT_NAMESPACE =~ /^gitlab-renovate-forks/'
+
####################
# Changes patterns #
####################
@@ -631,7 +634,6 @@
- "scripts/glfm/**/*"
- "scripts/lib/glfm/**/*"
-# Certain components require the base e2e GDK image to be rebuilt if they change
.gdk-component-patterns: &gdk-component-patterns
- qa/gdk/**/*
- Gemfile.lock
@@ -942,21 +944,14 @@
changes:
- qa/gdk/Dockerfile.gdk
-# We use a multi-stage image to:
-# - (re)build the first stage in master pipelines (including scheduled pipelines), and
-# - build the final stage in code-change pipelines (including MRs), and scheduled pipelines
# This has to match ".qa:rules:e2e:test-on-gdk" otherwise there won't be an image available to run GDK in the test jobs.
# Unfortunately, we can't just include ".qa:rules:e2e:test-on-gdk" because some of the conditions are manual
# Since the smoke test job is not allowed to fail, the `build-gdk-image` job is also not allowed to fail.
# It's better to fail early and avoid wasting resources running test jobs that would just fail anyway.
.build-images:rules:build-gdk-image:
rules:
- # Allows to force rebuild base image in case something goes wrong and this had to be disabled
- - if: '$QA_RUN_TESTS_ON_GDK !~ /true|yes|1/i'
- when: manual
- allow_failure: true
- variables:
- BUILD_GDK_BASE: "true"
+ - <<: *if-renovate-fork
+ changes: *gdk-component-patterns
- !reference [".qa:rules:package-and-test-never-run", rules]
- <<: *if-default-branch-schedule-nightly # already executed in the 2-hourly schedule
when: never
@@ -1506,6 +1501,8 @@
when: never
- <<: *if-merge-request-labels-pipeline-expedite
when: never
+ - <<: *if-renovate-fork
+ changes: *gdk-component-patterns
- <<: *if-merge-request-targeting-stable-branch
changes: *setup-test-env-patterns
allow_failure: true
@@ -1720,10 +1717,14 @@
.qa:rules:e2e:test-on-gdk:
rules:
- - if: '$QA_RUN_TESTS_ON_GDK !~ /true|yes|1/i'
+ - if: '$QA_RUN_TESTS_ON_GDK =~ /false|no|0/i'
when: never
- <<: *if-default-branch-schedule-nightly # already executed in the 2-hourly schedule
when: never
+ - <<: *if-renovate-fork
+ changes: *gdk-component-patterns
+ variables:
+ TEST_RUNNER_TAG: saas-linux-xlarge-amd64
- !reference [".qa:rules:e2e-blocking", rules]
- !reference [".qa:rules:e2e-schedule-blocking", rules]
diff --git a/.gitlab/ci/test-on-gdk/main.gitlab-ci.yml b/.gitlab/ci/test-on-gdk/main.gitlab-ci.yml
index 75655b2eb65..5f7df5dde9d 100644
--- a/.gitlab/ci/test-on-gdk/main.gitlab-ci.yml
+++ b/.gitlab/ci/test-on-gdk/main.gitlab-ci.yml
@@ -68,7 +68,7 @@ include:
# Override default command so we don't tail all of the logs to stdout unnecessarily
command: [gdk, tail, rails-web]
tags:
- - e2e
+ - $TEST_RUNNER_TAG
variables:
DOCKER_HOST: tcp://docker:2375
QA_GENERATE_ALLURE_REPORT: "true"
diff --git a/app/assets/javascripts/profile/components/user_achievements.vue b/app/assets/javascripts/profile/components/user_achievements.vue
index e86d807d87f..c50663a5af5 100644
--- a/app/assets/javascripts/profile/components/user_achievements.vue
+++ b/app/assets/javascripts/profile/components/user_achievements.vue
@@ -87,7 +87,7 @@ export default {
{{
diff --git a/app/assets/javascripts/search/sidebar/components/app.vue b/app/assets/javascripts/search/sidebar/components/app.vue
index bbee0e441cc..cbf80ab264f 100644
--- a/app/assets/javascripts/search/sidebar/components/app.vue
+++ b/app/assets/javascripts/search/sidebar/components/app.vue
@@ -16,6 +16,7 @@ import {
SCOPE_MILESTONES,
SCOPE_WIKI_BLOBS,
SEARCH_TYPE_ADVANCED,
+ SEARCH_TYPE_ZOEKT,
} from '../constants';
import IssuesFilters from './issues_filters.vue';
import MergeRequestsFilters from './merge_requests_filters.vue';
@@ -54,6 +55,17 @@ export default {
computed: {
...mapState(['searchType']),
...mapGetters(['currentScope']),
+ isBlobScope() {
+ return this.currentScope === SCOPE_BLOB;
+ },
+ isAdvancedSearch() {
+ return this.searchType === SEARCH_TYPE_ADVANCED;
+ },
+ isZoektSearch() {
+ return (
+ this.searchType === SEARCH_TYPE_ZOEKT && this.glFeatures.searchAddArchivedFilterToZoekt
+ );
+ },
showIssuesFilters() {
return this.currentScope === SCOPE_ISSUES;
},
@@ -61,7 +73,7 @@ export default {
return this.currentScope === SCOPE_MERGE_REQUESTS;
},
showBlobFilters() {
- return this.currentScope === SCOPE_BLOB && this.searchType === SEARCH_TYPE_ADVANCED;
+ return this.isBlobScope && (this.isAdvancedSearch || this.isZoektSearch);
},
showProjectsFilters() {
return this.currentScope === SCOPE_PROJECTS;
diff --git a/app/assets/javascripts/search/sidebar/components/blobs_filters.vue b/app/assets/javascripts/search/sidebar/components/blobs_filters.vue
index e282bacae31..c04224c0cb1 100644
--- a/app/assets/javascripts/search/sidebar/components/blobs_filters.vue
+++ b/app/assets/javascripts/search/sidebar/components/blobs_filters.vue
@@ -1,4 +1,7 @@
-
+
diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb
index 929e1e8efdc..7855c950d75 100644
--- a/app/controllers/registrations_controller.rb
+++ b/app/controllers/registrations_controller.rb
@@ -40,18 +40,11 @@ class RegistrationsController < Devise::RegistrationsController
set_resource_fields
super do |new_user|
- record_arkose_data
- accept_pending_invitations if new_user.persisted?
-
- persist_accepted_terms_if_required(new_user)
- send_custom_confirmation_instructions
- track_weak_password_error(new_user, self.class.name, 'create')
-
- if pending_approval?
- NotificationService.new.new_instance_access_request(new_user)
+ if new_user.persisted?
+ after_successful_create_hook(new_user)
+ else
+ track_weak_password_error(new_user, self.class.name, 'create')
end
-
- after_request_hook(new_user)
end
# Devise sets a flash message on both successful & failed signups,
@@ -79,7 +72,6 @@ class RegistrationsController < Devise::RegistrationsController
protected
def persist_accepted_terms_if_required(new_user)
- return unless new_user.persisted?
return unless Gitlab::CurrentSettings.current_application_settings.enforce_terms?
terms = ApplicationSetting::Term.latest
@@ -107,11 +99,17 @@ class RegistrationsController < Devise::RegistrationsController
end
# overridden by EE module
- def after_request_hook(user)
- return unless user.persisted?
+ def after_successful_create_hook(user)
+ accept_pending_invitations
+ persist_accepted_terms_if_required(user)
+ notify_new_instance_access_request(user)
+ track_successful_user_creation(user)
+ end
- track_creation user: user
- Gitlab::Tracking.event(self.class.name, 'successfully_submitted_form', user: user)
+ def notify_new_instance_access_request(user)
+ return unless pending_approval?
+
+ NotificationService.new.new_instance_access_request(user)
end
def after_sign_up_path_for(user)
@@ -159,9 +157,11 @@ class RegistrationsController < Devise::RegistrationsController
{}
end
- def track_creation(user:)
+ def track_successful_user_creation(user)
label = user_invited? ? 'invited' : 'signup'
Gitlab::Tracking.event(self.class.name, 'create_user', label: label, user: user)
+
+ Gitlab::Tracking.event(self.class.name, 'successfully_submitted_form', user: user)
end
def ensure_destroy_prerequisites_met
@@ -216,7 +216,7 @@ class RegistrationsController < Devise::RegistrationsController
def pending_approval?
return false unless Gitlab::CurrentSettings.require_admin_approval_after_user_signup
- resource.persisted? && resource.blocked_pending_approval?
+ resource.blocked_pending_approval?
end
def sign_up_params_attributes
@@ -304,10 +304,6 @@ class RegistrationsController < Devise::RegistrationsController
current_user
end
- def record_arkose_data
- # overridden by EE module
- end
-
def identity_verification_enabled?
# overridden by EE module
false
@@ -317,10 +313,6 @@ class RegistrationsController < Devise::RegistrationsController
# overridden by EE module
end
- def send_custom_confirmation_instructions
- # overridden by EE module
- end
-
def arkose_labs_enabled?
false
end
diff --git a/app/presenters/commit_status_presenter.rb b/app/presenters/commit_status_presenter.rb
index 28656b0ccc4..c971822e1a4 100644
--- a/app/presenters/commit_status_presenter.rb
+++ b/app/presenters/commit_status_presenter.rb
@@ -25,7 +25,7 @@ class CommitStatusPresenter < Gitlab::View::Presenter::Delegated
insufficient_bridge_permissions: 'This job could not be executed because of insufficient permissions to create a downstream pipeline',
bridge_pipeline_is_child_pipeline: 'This job belongs to a child pipeline and cannot create further child pipelines',
downstream_pipeline_creation_failed: 'The downstream pipeline could not be created',
- secrets_provider_not_found: 'The secrets provider can not be found',
+ secrets_provider_not_found: 'The secrets provider can not be found. Check your CI/CD variables and try again.',
reached_max_descendant_pipelines_depth: 'You reached the maximum depth of child pipelines',
reached_max_pipeline_hierarchy_size: 'The downstream pipeline tree is too large',
project_deleted: 'The job belongs to a deleted project',
diff --git a/app/services/members/unassign_issuables_service.rb b/app/services/members/unassign_issuables_service.rb
index b484cf2c1f0..1cbbe6859b3 100644
--- a/app/services/members/unassign_issuables_service.rb
+++ b/app/services/members/unassign_issuables_service.rb
@@ -14,21 +14,14 @@ module Members
end
def execute
- if Feature.enabled?(:new_unassignment_service) && !requesting_user
- raise ArgumentError, 'requesting_user must be given'
- end
+ raise ArgumentError, 'requesting_user must be given' unless requesting_user
return unless entity && user
project_ids = entity.is_a?(Group) ? entity.all_projects.select(:id) : [entity.id]
- if Feature.enabled?(:new_unassignment_service)
- unassign_from_issues(project_ids)
- unassign_from_merge_requests(project_ids)
- else
- user.issue_assignees.on_issues(Issue.in_projects(project_ids).select(:id)).delete_all
- user.merge_request_assignees.in_projects(project_ids).delete_all
- end
+ unassign_from_issues(project_ids)
+ unassign_from_merge_requests(project_ids)
user.invalidate_cache_counts
end
diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml
index 51bb5fc5510..db0d3343b8a 100644
--- a/app/views/shared/issuable/_sidebar.html.haml
+++ b/app/views/shared/issuable/_sidebar.html.haml
@@ -62,8 +62,8 @@
- if issuable_sidebar[:supports_time_tracking]
.js-sidebar-time-tracking-root.block
// Fallback while content is loading
- .title.hide-collapsed
- = _('Time tracking')
+ .title.hide-collapsed.gl-display-flex.gl-justify-content-space-between.gl-align-items-center{ class: 'gl-mb-0!' }
+ %span.gl-font-weight-bold= _('Time tracking')
= gl_loading_icon(inline: true)
- if issuable_sidebar.dig(:features_available, :health_status)
diff --git a/app/views/shared/issuable/_sidebar_assignees.html.haml b/app/views/shared/issuable/_sidebar_assignees.html.haml
index 0ffce0ac571..217707d9932 100644
--- a/app/views/shared/issuable/_sidebar_assignees.html.haml
+++ b/app/views/shared/issuable/_sidebar_assignees.html.haml
@@ -4,8 +4,8 @@
.js-sidebar-assignees-root{ data: { field: issuable_type,
max_assignees: dropdown_options[:data][:"max-select"],
directly_invite_members: can_admin_project_member?(@project) } }
- .title.hide-collapsed
- = s_('Label|Assignee')
+ .title.hide-collapsed.gl-display-flex.gl-justify-content-space-between.gl-align-items-center{ class: 'gl-mb-0!' }
+ %span.gl-font-weight-bold= s_('Label|Assignee')
= gl_loading_icon(inline: true)
.js-sidebar-assignee-data.selectbox.hide-collapsed
diff --git a/app/views/shared/issuable/_sidebar_reviewers.html.haml b/app/views/shared/issuable/_sidebar_reviewers.html.haml
index 4b07d8d0850..f7d83e0441d 100644
--- a/app/views/shared/issuable/_sidebar_reviewers.html.haml
+++ b/app/views/shared/issuable/_sidebar_reviewers.html.haml
@@ -1,8 +1,8 @@
- issuable_type = issuable_sidebar[:type]
.js-sidebar-reviewers-root{ data: { field: issuable_type, signed_in: signed_in } }
- .title.hide-collapsed
- = _('Reviewers')
+ .title.hide-collapsed.gl-display-flex.gl-justify-content-space-between.gl-align-items-center{ class: 'gl-mb-0!' }
+ %span.gl-font-weight-bold= _('Reviewers')
= gl_loading_icon(inline: true)
.selectbox.hide-collapsed
diff --git a/app/workers/members_destroyer/unassign_issuables_worker.rb b/app/workers/members_destroyer/unassign_issuables_worker.rb
index fbb7b27eae2..843789d52f3 100644
--- a/app/workers/members_destroyer/unassign_issuables_worker.rb
+++ b/app/workers/members_destroyer/unassign_issuables_worker.rb
@@ -30,7 +30,7 @@ module MembersDestroyer
return
end
- if Feature.enabled?(:new_unassignment_service) && requesting_user_id.nil?
+ if requesting_user_id.nil?
logger.error(
message: "requesting_user_id is nil.",
entity_type: entity_type,
diff --git a/config/feature_flags/gitlab_com_derisk/new_unassignment_service.yml b/config/feature_flags/gitlab_com_derisk/new_unassignment_service.yml
deleted file mode 100644
index 35e33abd330..00000000000
--- a/config/feature_flags/gitlab_com_derisk/new_unassignment_service.yml
+++ /dev/null
@@ -1,9 +0,0 @@
----
-name: new_unassignment_service
-feature_issue_url:
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/145726
-rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/443249
-milestone: '16.10'
-group: group::project management
-type: gitlab_com_derisk
-default_enabled: false
diff --git a/doc/development/contributing/index.md b/doc/development/contributing/index.md
index ee0b34b2c73..dae152e1ed0 100644
--- a/doc/development/contributing/index.md
+++ b/doc/development/contributing/index.md
@@ -28,6 +28,20 @@ For more information about our commitment to an open and welcoming environment,
Issues and merge requests should be in English and contain appropriate language
for audiences of all ages.
+## GitLab technologies
+
+[GitLab](https://gitlab.com/gitlab-org/gitlab) is a [Ruby on Rails](https://rubyonrails.org/) application.
+It uses [Haml](https://haml.info/) and a JavaScript-based frontend with [Vue.js](https://vuejs.org/).
+
+Some satellite projects use [Go](https://go.dev/).
+For example:
+
+- [GitLab Runner](https://gitlab.com/gitlab-org/gitlab-runner)
+- [Gitaly](https://gitlab.com/gitlab-org/gitaly)
+- [GLab](https://gitlab.com/gitlab-org/cli)
+
+We have [development style guides for each technology](style_guides.md) to help you align with our coding standards.
+
### Choose or create an issue
If you know what you're going to work on, see if an issue exists. If it doesn't,
diff --git a/doc/development/feature_categorization/index.md b/doc/development/feature_categorization/index.md
index 0236ad63b70..fe686108467 100644
--- a/doc/development/feature_categorization/index.md
+++ b/doc/development/feature_categorization/index.md
@@ -6,8 +6,6 @@ info: Any user with at least the Maintainer role can merge updates to this conte
# Feature Categorization
-> - [Introduced](https://gitlab.com/groups/gitlab-com/gl-infra/-/epics/269) in GitLab 13.2.
-
Each Sidekiq worker, Batched Background migrations, controller action, [test example](../testing_guide/best_practices.md#feature-category-metadata) or API endpoint
must declare a `feature_category` attribute. This attribute maps each
of these to a [feature category](https://handbook.gitlab.com/handbook/product/categories/). This
diff --git a/doc/topics/autodevops/troubleshooting.md b/doc/topics/autodevops/troubleshooting.md
index 60265c60e7e..f06094747eb 100644
--- a/doc/topics/autodevops/troubleshooting.md
+++ b/doc/topics/autodevops/troubleshooting.md
@@ -39,6 +39,30 @@ The following are possible reasons:
- No buildpack may exist for your application. Try specifying a
[custom buildpack](customize.md#custom-buildpacks).
+## Builder sunset error
+
+Because of this [Heroku update](https://github.com/heroku/cnb-builder-images/pull/478), legacy shimmed `heroku/buildpacks:20` and `heroku/builder-classic:22` images now generate errors instead of warnings.
+
+To resolve this issue, you should to migrate to the `heroku/builder:*` builder images. As a temporary workaround, you can also set an environment variable to skip errors.
+
+### Migrating to `heroku/builder:*`
+
+Before you migrate, you should read the release notes for the each [spec release](https://github.com/buildpacks/spec/releases) to determine potential breaking changes.
+In this case, the relevant buildpack API versions are 0.6 and 0.7.
+These breaking changes are especially relevant to buildpack maintainers.
+
+For more information about the changes, you can also diff the [spec itself](https://github.com/buildpacks/spec/compare/buildpack/v0.5...buildpack/v0.7#files_bucket).
+
+### Skipping errors
+
+As a temporary workaround, you can skip the errors by setting and forwarding the `ALLOW_EOL_SHIMMED_BUILDER` environment variable:
+
+```yaml
+ variables:
+ ALLOW_EOL_SHIMMED_BUILDER: "1"
+ AUTO_DEVOPS_BUILD_IMAGE_FORWARDED_CI_VARIABLES: ALLOW_EOL_SHIMMED_BUILDER
+```
+
## Pipeline that extends Auto DevOps with only / except fails
If your pipeline fails with the following message:
diff --git a/lib/api/vs_code/settings/vs_code_settings_sync.rb b/lib/api/vs_code/settings/vs_code_settings_sync.rb
index 6d9e6bcc394..3c6c204de66 100644
--- a/lib/api/vs_code/settings/vs_code_settings_sync.rb
+++ b/lib/api/vs_code/settings/vs_code_settings_sync.rb
@@ -4,10 +4,10 @@ module API
module VsCode
module Settings
class VsCodeSettingsSync < ::API::Base
- urgency :low
include ::VsCode::Settings
feature_category :web_ide
+ urgency :low
helpers do
def find_settings
diff --git a/package.json b/package.json
index 5a1f9288be0..b2522e69445 100644
--- a/package.json
+++ b/package.json
@@ -137,7 +137,7 @@
"deckar01-task_list": "^2.3.1",
"dexie": "^3.2.3",
"diff": "^3.4.0",
- "dompurify": "^3.0.9",
+ "dompurify": "^3.0.10",
"dropzone": "^4.2.0",
"editorconfig": "^0.15.3",
"emoji-regex": "^10.0.0",
diff --git a/qa/gdk/Dockerfile.gdk b/qa/gdk/Dockerfile.gdk
index 46d22e426b7..9a7ce6d80b2 100644
--- a/qa/gdk/Dockerfile.gdk
+++ b/qa/gdk/Dockerfile.gdk
@@ -1,4 +1,4 @@
-ARG GDK_SHA=9e11e49584ed6240e11414b34b74b18a0b1a00d4
+ARG GDK_SHA=a7e526ddaa2334255fe3358390ff07ab1e35cd16
# Use tag prefix when running on 'stable' branch to make sure 'protected' image is used which is not deleted by registry cleanup
ARG GDK_BASE_TAG_PREFIX
diff --git a/spec/frontend/search/sidebar/components/app_spec.js b/spec/frontend/search/sidebar/components/app_spec.js
index 3ff6bbf7666..bbf8805d544 100644
--- a/spec/frontend/search/sidebar/components/app_spec.js
+++ b/spec/frontend/search/sidebar/components/app_spec.js
@@ -33,7 +33,7 @@ describe('GlobalSearchSidebar', () => {
currentScope: jest.fn(() => 'issues'),
};
- const createComponent = (initialState = {}) => {
+ const createComponent = (initialState = {}, glFeatures = {}) => {
const store = new Vuex.Store({
state: {
urlQuery: MOCK_QUERY,
@@ -44,6 +44,9 @@ describe('GlobalSearchSidebar', () => {
wrapper = shallowMount(GlobalSearchSidebar, {
store,
+ provide: {
+ glFeatures,
+ },
});
};
@@ -105,30 +108,34 @@ describe('GlobalSearchSidebar', () => {
});
describe.each`
- scope | filter | searchType | isShown
- ${'blobs'} | ${findBlobsFilters} | ${SEARCH_TYPE_BASIC} | ${false}
- ${'blobs'} | ${findBlobsFilters} | ${SEARCH_TYPE_ADVANCED} | ${true}
- ${'blobs'} | ${findBlobsFilters} | ${SEARCH_TYPE_ZOEKT} | ${false}
- `('sidebar blobs scope:', ({ scope, filter, searchType, isShown }) => {
- beforeEach(() => {
- getterSpies.currentScope = jest.fn(() => scope);
- createComponent({ urlQuery: { scope }, searchType });
- });
+ scope | filter | searchType | searchAddArchivedFilterToZoekt | isShown
+ ${'blobs'} | ${findBlobsFilters} | ${SEARCH_TYPE_BASIC} | ${true} | ${false}
+ ${'blobs'} | ${findBlobsFilters} | ${SEARCH_TYPE_BASIC} | ${false} | ${false}
+ ${'blobs'} | ${findBlobsFilters} | ${SEARCH_TYPE_ADVANCED} | ${true} | ${true}
+ ${'blobs'} | ${findBlobsFilters} | ${SEARCH_TYPE_ADVANCED} | ${false} | ${true}
+ ${'blobs'} | ${findBlobsFilters} | ${SEARCH_TYPE_ZOEKT} | ${true} | ${true}
+ ${'blobs'} | ${findBlobsFilters} | ${SEARCH_TYPE_ZOEKT} | ${false} | ${false}
+ `(
+ 'sidebar blobs scope:',
+ ({ scope, filter, searchType, searchAddArchivedFilterToZoekt, isShown }) => {
+ beforeEach(() => {
+ getterSpies.currentScope = jest.fn(() => scope);
+ createComponent(
+ {
+ urlQuery: { scope },
+ searchType,
+ },
+ { searchAddArchivedFilterToZoekt },
+ );
+ });
- it(`renders correctly filter BlobsFilters when search_type ${searchType}`, () => {
- expect(filter().exists()).toBe(isShown);
- });
- });
-
- describe('filters for blobs will not load if zoekt is enabled', () => {
- beforeEach(() => {
- createComponent({ urlQuery: { scope: 'blobs' }, searchType: SEARCH_TYPE_ZOEKT });
- });
-
- it("doesn't render blobs filters", () => {
- expect(findBlobsFilters().exists()).toBe(false);
- });
- });
+ it(`does ${
+ isShown ? '' : 'not '
+ }render filter BlobsFilters when search_type ${searchType} and searchAddArchivedFilterToZoekt ${searchAddArchivedFilterToZoekt}`, () => {
+ expect(filter().exists()).toBe(isShown);
+ });
+ },
+ );
describe('with sidebar scope: projects', () => {
beforeEach(() => {
diff --git a/spec/frontend/search/sidebar/components/blobs_filters_spec.js b/spec/frontend/search/sidebar/components/blobs_filters_spec.js
index 3f1feae8527..e42f182f4b8 100644
--- a/spec/frontend/search/sidebar/components/blobs_filters_spec.js
+++ b/spec/frontend/search/sidebar/components/blobs_filters_spec.js
@@ -6,7 +6,11 @@ import { MOCK_QUERY } from 'jest/search/mock_data';
import BlobsFilters from '~/search/sidebar/components/blobs_filters.vue';
import LanguageFilter from '~/search/sidebar/components/language_filter/index.vue';
import ArchivedFilter from '~/search/sidebar/components/archived_filter/index.vue';
-import { SEARCH_TYPE_ADVANCED } from '~/search/sidebar/constants';
+import {
+ SEARCH_TYPE_ZOEKT,
+ SEARCH_TYPE_ADVANCED,
+ SEARCH_TYPE_BASIC,
+} from '~/search/sidebar/constants';
Vue.use(Vuex);
@@ -17,11 +21,11 @@ describe('GlobalSearch BlobsFilters', () => {
currentScope: () => 'blobs',
};
- const createComponent = () => {
+ const createComponent = (initialState = { searchType: SEARCH_TYPE_ADVANCED }) => {
const store = new Vuex.Store({
state: {
urlQuery: MOCK_QUERY,
- searchType: SEARCH_TYPE_ADVANCED,
+ ...initialState,
},
getters: defaultGetters,
});
@@ -38,8 +42,19 @@ describe('GlobalSearch BlobsFilters', () => {
createComponent();
});
- it('renders LanguageFilter', () => {
- expect(findLanguageFilter().exists()).toBe(true);
+ describe.each`
+ searchType | isShown
+ ${SEARCH_TYPE_BASIC} | ${false}
+ ${SEARCH_TYPE_ADVANCED} | ${true}
+ ${SEARCH_TYPE_ZOEKT} | ${false}
+ `('sidebar blobs language filter:', ({ searchType, isShown }) => {
+ beforeEach(() => {
+ createComponent({ searchType });
+ });
+
+ it(`does ${isShown ? '' : 'not '}render LanguageFilter when search_type ${searchType}`, () => {
+ expect(findLanguageFilter().exists()).toBe(isShown);
+ });
});
it('renders ArchivedFilter', () => {
diff --git a/spec/services/members/unassign_issuables_service_spec.rb b/spec/services/members/unassign_issuables_service_spec.rb
index d1ccad2ec48..89921683080 100644
--- a/spec/services/members/unassign_issuables_service_spec.rb
+++ b/spec/services/members/unassign_issuables_service_spec.rb
@@ -90,16 +90,6 @@ RSpec.describe Members::UnassignIssuablesService, feature_category: :groups_and_
it_behaves_like 'unassignment events'
it_behaves_like 'missing request_user raises an error'
it_behaves_like 'stale objects are ignored and skipped'
-
- context 'when the FF new_unassignment_service is disabled' do
- let_it_be(:requesting_user) { nil }
-
- before do
- stub_feature_flags(new_unassignment_service: false)
- end
-
- it_behaves_like 'un-assigning issuables', 2, 2, 2, 1
- end
end
context 'when a user leaves a group' do
@@ -121,16 +111,6 @@ RSpec.describe Members::UnassignIssuablesService, feature_category: :groups_and_
it_behaves_like 'un-assigning issuables', 4, 4, 4, 2
it_behaves_like 'unassignment events'
it_behaves_like 'stale objects are ignored and skipped'
-
- context 'when the FF new_unassignment_service is disabled' do
- let_it_be(:requesting_user) { nil }
-
- before do
- stub_feature_flags(new_unassignment_service: false)
- end
-
- it_behaves_like 'un-assigning issuables', 4, 4, 4, 2
- end
end
end
end
diff --git a/yarn.lock b/yarn.lock
index 174747269b6..16b996221ea 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5758,10 +5758,10 @@ dommatrix@^1.0.3:
resolved "https://registry.yarnpkg.com/dommatrix/-/dommatrix-1.0.3.tgz#e7c18e8d6f3abdd1fef3dd4aa74c4d2e620a0525"
integrity sha512-l32Xp/TLgWb8ReqbVJAFIvXmY7go4nTxxlWiAFyhoQw9RKEOHBZNnyGvJWqDVSPmq3Y9HlM4npqF/T6VMOXhww==
-dompurify@^3.0.5, dompurify@^3.0.9:
- version "3.0.9"
- resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.0.9.tgz#b3f362f24b99f53498c75d43ecbd784b0b3ad65e"
- integrity sha512-uyb4NDIvQ3hRn6NiC+SIFaP4mJ/MdXlvtunaqK9Bn6dD3RuB/1S/gasEjDHD8eiaqdSael2vBv+hOs7Y+jhYOQ==
+dompurify@^3.0.10, dompurify@^3.0.5:
+ version "3.0.10"
+ resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.0.10.tgz#d48b7c5cef8f368fca380c6fbd9aa8d9f3ca0dcb"
+ integrity sha512-WZDL8ZHTliEVP3Lk4phtvjg8SNQ3YMc5WVstxE8cszKZrFjzI4PF4ZTIk9VGAc9vZADO7uGO2V/ZiStcRSAT4Q==
dropzone@^4.2.0:
version "4.2.0"