diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml
index 58fa1101834..f9382637610 100644
--- a/.gitlab/ci/rules.gitlab-ci.yml
+++ b/.gitlab/ci/rules.gitlab-ci.yml
@@ -126,6 +126,8 @@
.frontend-dependency-patterns: &frontend-dependency-patterns
- "{package.json,yarn.lock}"
+ - "config/webpack.config.js"
+ - "config/helpers/*.js"
.frontend-patterns: &frontend-patterns
- "{package.json,yarn.lock}"
diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION
index d669e046dde..35c5e6f75ec 100644
--- a/GITALY_SERVER_VERSION
+++ b/GITALY_SERVER_VERSION
@@ -1 +1 @@
-b3a047a5626ff654ad998dd7a94c6a51624f54b4
+2b34fc78dfb8e7f55f7f2fc30602381b43c54fc3
diff --git a/app/assets/javascripts/boards/components/board_assignee_dropdown.vue b/app/assets/javascripts/boards/components/board_assignee_dropdown.vue
index 5d381f9a570..c5cb61ae21c 100644
--- a/app/assets/javascripts/boards/components/board_assignee_dropdown.vue
+++ b/app/assets/javascripts/boards/components/board_assignee_dropdown.vue
@@ -39,50 +39,51 @@ export default {
data() {
return {
search: '',
- participants: [],
+ issueParticipants: [],
selected: [],
};
},
apollo: {
- participants: {
- query() {
- return this.isSearchEmpty ? getIssueParticipants : searchUsers;
- },
+ issueParticipants: {
+ query: getIssueParticipants,
+ variables() {
+ return {
+ id: `gid://gitlab/Issue/${this.activeIssue.iid}`,
+ };
+ },
+ update(data) {
+ return data.issue?.participants?.nodes || [];
+ },
+ },
+ searchUsers: {
+ query: searchUsers,
variables() {
- if (this.isSearchEmpty) {
- return {
- id: `gid://gitlab/Issue/${this.activeIssue.iid}`,
- };
- }
-
return {
search: this.search,
};
},
- update(data) {
- if (this.isSearchEmpty) {
- return data.issue?.participants?.nodes || [];
- }
-
- return data.users?.nodes || [];
- },
- debounce() {
- const { noSearchDelay, searchDelay } = this.$options;
-
- return this.isSearchEmpty ? noSearchDelay : searchDelay;
+ update: (data) => data.users?.nodes || [],
+ skip() {
+ return this.isSearchEmpty;
},
+ debounce: 250,
},
},
computed: {
...mapGetters(['activeIssue']),
...mapState(['isSettingAssignees']),
+ participants() {
+ return this.isSearchEmpty ? this.issueParticipants : this.searchUsers;
+ },
assigneeText() {
return n__('Assignee', '%d Assignees', this.selected.length);
},
unSelectedFiltered() {
- return this.participants.filter(({ username }) => {
- return !this.selectedUserNames.includes(username);
- });
+ return (
+ this.participants?.filter(({ username }) => {
+ return !this.selectedUserNames.includes(username);
+ }) || []
+ );
},
selectedIsEmpty() {
return this.selected.length === 0;
@@ -96,6 +97,11 @@ export default {
currentUser() {
return gon?.current_username;
},
+ isLoading() {
+ return (
+ this.$apollo.queries.issueParticipants?.loading || this.$apollo.queries.searchUsers?.loading
+ );
+ },
},
created() {
this.selected = cloneDeep(this.activeIssue.assignees);
@@ -147,7 +153,7 @@ export default {
-
+
-
-
-
+
diff --git a/app/views/shared/_search_settings.html.haml b/app/views/shared/_search_settings.html.haml
index ea3d7b97327..d689e9ae5c0 100644
--- a/app/views/shared/_search_settings.html.haml
+++ b/app/views/shared/_search_settings.html.haml
@@ -1,2 +1,6 @@
+- container_class = local_assigns.fetch(:container_class, 'gl-mt-5')
+
- if Feature.enabled?(:search_settings_in_page, @project, default_enabled: false)
- .js-search-settings-app
+ %div{ class: container_class }
+ .js-search-settings-app
+ %input.gl-form-input.form-control{ type: "text", placeholder: _("Search settings"), aria_label: _("Search settings"), disabled: true }
diff --git a/config/helpers/incremental_webpack_compiler.js b/config/helpers/incremental_webpack_compiler.js
index 9af52248d02..889e627d2c5 100644
--- a/config/helpers/incremental_webpack_compiler.js
+++ b/config/helpers/incremental_webpack_compiler.js
@@ -8,7 +8,9 @@ const log = (msg, ...rest) => console.log(`IncrementalWebpackCompiler: ${msg}`,
const TIMEOUT = 5000;
class NoopCompiler {
- enabled = false;
+ constructor() {
+ this.enabled = false;
+ }
filterEntryPoints(entryPoints) {
return entryPoints;
@@ -20,8 +22,6 @@ class NoopCompiler {
}
class IncrementalWebpackCompiler extends NoopCompiler {
- enabled = true;
-
constructor(historyFilePath) {
super();
this.history = {};
@@ -33,6 +33,7 @@ class IncrementalWebpackCompiler extends NoopCompiler {
]);
this.historyFilePath = historyFilePath;
this.loadFromHistory();
+ this.enabled = true;
}
filterEntryPoints(entrypoints) {
diff --git a/doc/administration/raketasks/maintenance.md b/doc/administration/raketasks/maintenance.md
index e2302d2574c..b58574257a2 100644
--- a/doc/administration/raketasks/maintenance.md
+++ b/doc/administration/raketasks/maintenance.md
@@ -64,9 +64,10 @@ Repository storage paths:
GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell
```
-## Show GitLab license information **(STARTER ONLY)**
+## Show GitLab license information **(PREMIUM SELF)**
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/20501) in GitLab Starter 12.6.
+> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/20501) in GitLab 12.6.
+> - [Moved](../../subscriptions/bronze_starter.md) to GitLab Premium in 13.9.
This command shows information about your [GitLab license](../../user/admin_area/license.md) and
how many seats are used. It is only available on GitLab Enterprise
diff --git a/doc/administration/reference_architectures/10k_users.md b/doc/administration/reference_architectures/10k_users.md
index a52d76a525e..f9765183e64 100644
--- a/doc/administration/reference_architectures/10k_users.md
+++ b/doc/administration/reference_architectures/10k_users.md
@@ -1983,7 +1983,7 @@ work.
-## Configure Advanced Search **(STARTER ONLY)**
+## Configure Advanced Search **(PREMIUM SELF)**
You can leverage Elasticsearch and [enable Advanced Search](../../integration/elasticsearch.md)
for faster, more advanced code search across your entire GitLab instance.
diff --git a/doc/administration/reference_architectures/1k_users.md b/doc/administration/reference_architectures/1k_users.md
index d5f7355e958..138d3c34389 100644
--- a/doc/administration/reference_architectures/1k_users.md
+++ b/doc/administration/reference_architectures/1k_users.md
@@ -47,7 +47,7 @@ You can also optionally configure GitLab to use an [external PostgreSQL service]
or an [external object storage service](../object_storage.md) for added
performance and reliability at an increased complexity cost.
-## Configure Advanced Search **(STARTER ONLY)**
+## Configure Advanced Search **(PREMIUM SELF)**
You can leverage Elasticsearch and [enable Advanced Search](../../integration/elasticsearch.md)
for faster, more advanced code search across your entire GitLab instance.
diff --git a/doc/administration/reference_architectures/25k_users.md b/doc/administration/reference_architectures/25k_users.md
index c66f1cabce6..66a9c4adbac 100644
--- a/doc/administration/reference_architectures/25k_users.md
+++ b/doc/administration/reference_architectures/25k_users.md
@@ -1983,7 +1983,7 @@ work.
-## Configure Advanced Search **(STARTER ONLY)**
+## Configure Advanced Search **(PREMIUM SELF)**
You can leverage Elasticsearch and [enable Advanced Search](../../integration/elasticsearch.md)
for faster, more advanced code search across your entire GitLab instance.
diff --git a/doc/administration/reference_architectures/2k_users.md b/doc/administration/reference_architectures/2k_users.md
index 82341f58cd7..1d11f972c2a 100644
--- a/doc/administration/reference_architectures/2k_users.md
+++ b/doc/administration/reference_architectures/2k_users.md
@@ -932,7 +932,7 @@ functioning backups is encountered.
-## Configure Advanced Search **(STARTER ONLY)**
+## Configure Advanced Search **(PREMIUM SELF)**
You can leverage Elasticsearch and [enable Advanced Search](../../integration/elasticsearch.md)
for faster, more advanced code search across your entire GitLab instance.
diff --git a/doc/administration/reference_architectures/3k_users.md b/doc/administration/reference_architectures/3k_users.md
index 2750d7c460d..0fc48657c05 100644
--- a/doc/administration/reference_architectures/3k_users.md
+++ b/doc/administration/reference_architectures/3k_users.md
@@ -1676,7 +1676,7 @@ work.
-## Configure Advanced Search **(STARTER ONLY)**
+## Configure Advanced Search **(PREMIUM SELF)**
You can leverage Elasticsearch and [enable Advanced Search](../../integration/elasticsearch.md)
for faster, more advanced code search across your entire GitLab instance.
diff --git a/doc/administration/reference_architectures/50k_users.md b/doc/administration/reference_architectures/50k_users.md
index 71446139c49..7eb56f62774 100644
--- a/doc/administration/reference_architectures/50k_users.md
+++ b/doc/administration/reference_architectures/50k_users.md
@@ -1983,7 +1983,7 @@ work.
-## Configure Advanced Search **(STARTER ONLY)**
+## Configure Advanced Search **(PREMIUM SELF)**
You can leverage Elasticsearch and [enable Advanced Search](../../integration/elasticsearch.md)
for faster, more advanced code search across your entire GitLab instance.
diff --git a/doc/administration/reference_architectures/5k_users.md b/doc/administration/reference_architectures/5k_users.md
index 74f7e9c60fb..d617920e2e4 100644
--- a/doc/administration/reference_architectures/5k_users.md
+++ b/doc/administration/reference_architectures/5k_users.md
@@ -1675,7 +1675,7 @@ work.
-## Configure Advanced Search **(STARTER ONLY)**
+## Configure Advanced Search **(PREMIUM SELF)**
You can leverage Elasticsearch and [enable Advanced Search](../../integration/elasticsearch.md)
for faster, more advanced code search across your entire GitLab instance.
diff --git a/doc/administration/reference_architectures/index.md b/doc/administration/reference_architectures/index.md
index d7240b241be..035811cd494 100644
--- a/doc/administration/reference_architectures/index.md
+++ b/doc/administration/reference_architectures/index.md
@@ -102,7 +102,7 @@ this can be an optimal solution if you don't have strict requirements.
[Automated backups](../../raketasks/backup_restore.md#configuring-cron-to-make-daily-backups)
is the least complex to setup. This provides a point-in-time recovery of a predetermined schedule.
-### Traffic load balancer **(STARTER ONLY)**
+### Traffic load balancer **(PREMIUM SELF)**
> - Level of complexity: **Medium**
> - Required domain knowledge: HAProxy, shared storage, distributed systems
@@ -124,7 +124,7 @@ to the default installation:
For more details on how to configure a traffic load balancer with GitLab, you can refer
to any of the [available reference architectures](#available-reference-architectures) with more than 1,000 users.
-### Zero downtime updates **(STARTER ONLY)**
+### Zero downtime updates **(PREMIUM SELF)**
> - Level of complexity: **Medium**
> - Required domain knowledge: PostgreSQL, HAProxy, shared storage, distributed systems
diff --git a/doc/development/elasticsearch.md b/doc/development/elasticsearch.md
index 8604afaad04..e5d0bd7ee10 100644
--- a/doc/development/elasticsearch.md
+++ b/doc/development/elasticsearch.md
@@ -4,7 +4,7 @@ group: Global Search
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---
-# Elasticsearch knowledge **(STARTER ONLY)**
+# Elasticsearch knowledge **(PREMIUM SELF)**
This area is to maintain a compendium of useful information when working with Elasticsearch.
diff --git a/doc/install/installation.md b/doc/install/installation.md
index ec5e01783a7..e42acde8780 100644
--- a/doc/install/installation.md
+++ b/doc/install/installation.md
@@ -603,7 +603,7 @@ You can specify a different Git repository by providing it as an extra parameter
sudo -u git -H bundle exec rake "gitlab:workhorse:install[/home/git/gitlab-workhorse,https://example.com/gitlab-workhorse.git]" RAILS_ENV=production
```
-### Install GitLab-Elasticsearch-indexer on Enterprise Edition **(STARTER ONLY)**
+### Install GitLab-Elasticsearch-indexer on Enterprise Edition **(PREMIUM SELF)**
GitLab-Elasticsearch-Indexer uses [GNU Make](https://www.gnu.org/software/make/). The
following command-line installs GitLab-Elasticsearch-Indexer in `/home/git/gitlab-elasticsearch-indexer`
diff --git a/doc/integration/elasticsearch.md b/doc/integration/elasticsearch.md
index 162ce1f8e76..6c605a44b93 100644
--- a/doc/integration/elasticsearch.md
+++ b/doc/integration/elasticsearch.md
@@ -5,10 +5,11 @@ group: Global Search
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---
-# Elasticsearch integration **(STARTER ONLY)**
+# Elasticsearch integration **(PREMIUM SELF)**
-> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/109 "Elasticsearch Merge Request") in GitLab [Starter](https://about.gitlab.com/pricing/) 8.4.
+> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/109 "Elasticsearch Merge Request") in GitLab 8.4.
> - Support for [Amazon Elasticsearch](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-gsg.html) was [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/1305) in GitLab [Starter](https://about.gitlab.com/pricing/) 9.0.
+> - [Moved](../subscriptions/bronze_starter.md) to GitLab Premium in 13.9.
This document describes how to enable Advanced Search. After
Advanced Search is enabled, you'll have the benefit of fast search response times
diff --git a/doc/raketasks/README.md b/doc/raketasks/README.md
index 691eba5e00c..be7e55cba9b 100644
--- a/doc/raketasks/README.md
+++ b/doc/raketasks/README.md
@@ -24,7 +24,7 @@ The following are available Rake tasks:
| [Clean up](cleanup.md) | Clean up unneeded items from GitLab instances. |
| [Development](../development/rake_tasks.md) | Tasks for GitLab contributors. |
| [Doctor tasks](../administration/raketasks/doctor.md) | Checks for data integrity issues. |
-| [Elasticsearch](../integration/elasticsearch.md#gitlab-advanced-search-rake-tasks) **(STARTER ONLY)** | Maintain Elasticsearch in a GitLab instance. |
+| [Elasticsearch](../integration/elasticsearch.md#gitlab-advanced-search-rake-tasks) **(PREMIUM SELF)** | Maintain Elasticsearch in a GitLab instance. |
| [Enable namespaces](features.md) | Enable usernames and namespaces for user projects. |
| [General maintenance](../administration/raketasks/maintenance.md) | General maintenance and self-check tasks. |
| [Geo maintenance](../administration/raketasks/geo.md) **(PREMIUM SELF)** | [Geo](../administration/geo/index.md)-related maintenance. |
diff --git a/doc/subscriptions/bronze_starter.md b/doc/subscriptions/bronze_starter.md
index ad03c4093b6..6977ccca0e2 100644
--- a/doc/subscriptions/bronze_starter.md
+++ b/doc/subscriptions/bronze_starter.md
@@ -63,6 +63,7 @@ the tiers are no longer mentioned in GitLab documentation:
- [`audit_json.log`](../administration/logs.md#audit_jsonlog) (specific entries)
- [`elasticsearch.log`](../administration/logs.md#elasticsearchlog)
- Merge requests:
+ - [Full code quality reports in the code quality tab](../user/project/merge_requests/code_quality.md#code-quality-reports)
- [Merge request approvals](../user/project/merge_requests/merge_request_approvals.md)
- [Multiple assignees](../user/project/merge_requests/getting_started.md#multiple-assignees)
- [Approval Rule information for Reviewers](../user/project/merge_requests/getting_started.md#approval-rule-information-for-reviewers), and [enabling or disabling it](../user/project/merge_requests/getting_started.md#enable-or-disable-approval-rule-information-for-reviewers)
diff --git a/doc/update/patch_versions.md b/doc/update/patch_versions.md
index 71c8c701775..e794ad64622 100644
--- a/doc/update/patch_versions.md
+++ b/doc/update/patch_versions.md
@@ -96,7 +96,7 @@ sudo -u git -H git checkout v$( - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/1984) in [GitLab Starter](https://about.gitlab.com/pricing/) 9.3.
+> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/1984) in GitLab 9.3.
> - Made [available in all tiers](https://gitlab.com/gitlab-org/gitlab/-/issues/212499) in 13.2.
Ensuring your project's code stays simple, readable and easy to contribute to can be problematic. With the help of [GitLab CI/CD](../../../ci/README.md), you can analyze your
@@ -28,7 +28,7 @@ Code Quality:
## Code Quality Widget
-> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/1984) in [GitLab Starter](https://about.gitlab.com/pricing/) 9.3.
+> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/1984) in GitLab 9.3.
> - Made [available in all tiers](https://gitlab.com/gitlab-org/gitlab/-/issues/212499) in 13.2.
Going a step further, GitLab can show the Code Quality report right
@@ -358,7 +358,7 @@ After the Code Quality job completes:
[downloadable artifact](../../../ci/pipelines/job_artifacts.md#downloading-artifacts)
for the `code_quality` job.
- The full list of code quality violations generated by a pipeline is shown in the
- Code Quality tab of the Pipeline Details page. **(STARTER)**
+ Code Quality tab of the Pipeline Details page. **(PREMIUM)**
### Generating an HTML report
diff --git a/doc/user/search/advanced_global_search.md b/doc/user/search/advanced_global_search.md
index 1898bdf06a9..2d1a05cd966 100644
--- a/doc/user/search/advanced_global_search.md
+++ b/doc/user/search/advanced_global_search.md
@@ -5,9 +5,10 @@ info: "To determine the technical writer assigned to the Stage/Group associated
type: reference
---
-# Advanced Search **(STARTER)**
+# Advanced Search **(PREMIUM)**
-> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/109) in GitLab [Starter](https://about.gitlab.com/pricing/) 8.4.
+> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/109) in GitLab 8.4.
+> - [Moved](../../subscriptions/bronze_starter.md) to GitLab Premium in 13.9.
NOTE:
Advanced Search (powered by Elasticsearch) is enabled for Bronze and above on GitLab.com since 2020-07-10.
diff --git a/doc/user/search/advanced_search_syntax.md b/doc/user/search/advanced_search_syntax.md
index e3501be8e8e..19f7305124e 100644
--- a/doc/user/search/advanced_search_syntax.md
+++ b/doc/user/search/advanced_search_syntax.md
@@ -5,12 +5,10 @@ info: "To determine the technical writer assigned to the Stage/Group associated
type: reference
---
-# Advanced Search Syntax **(STARTER)**
+# Advanced Search Syntax **(PREMIUM)**
-> - Introduced in [GitLab Enterprise Starter](https://about.gitlab.com/pricing/) 9.2
-
-NOTE:
-Advanced Search (powered by Elasticsearch) is enabled for Bronze and above on GitLab.com since 2020-07-10.
+> - Introduced in [GitLab](https://about.gitlab.com/pricing/) 9.2.
+> - [Moved](../../subscriptions/bronze_starter.md) to GitLab Premium in 13.9.
Use advanced queries for more targeted search results.
diff --git a/doc/user/search/index.md b/doc/user/search/index.md
index 08311fef2b2..7ea1c4cb307 100644
--- a/doc/user/search/index.md
+++ b/doc/user/search/index.md
@@ -36,7 +36,7 @@ in the search field in the upper right corner:
> - Filtering by Epics was [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/195704) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 12.9.
> - Filtering by child Epics was [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/9029) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 13.0.
-> - Filtering by Iterations was [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/118742) in [GitLab Starter](https://about.gitlab.com/pricing/) 13.6.
+> - Filtering by Iterations was [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/118742) in GitLab 13.6. [Moved](../../subscriptions/bronze_starter.md) to GitLab Premium in 13.9.
Follow these steps to filter the **Issues** and **Merge Requests** list pages in projects and
groups:
@@ -99,18 +99,20 @@ You can filter the **Issues** list to individual instances by their ID. For exam
![filter issues by specific id](img/issue_search_by_id.png)
-### Filtering merge requests by approvers **(STARTER)**
+### Filtering merge requests by approvers **(PREMIUM)**
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/9468) in [GitLab Starter](https://about.gitlab.com/pricing/) 11.9.
+> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/9468) in GitLab 11.9.
+> - [Moved](../../subscriptions/bronze_starter.md) to GitLab Premium in 13.9.
To filter merge requests by an individual approver, you can type (or select from
the dropdown) **Approver** and select the user.
![Filter MRs by an approver](img/filter_approver_merge_requests.png)
-### Filtering merge requests by "approved by" **(STARTER)**
+### Filtering merge requests by "approved by" **(PREMIUM)**
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/30335) in [GitLab Starter](https://about.gitlab.com/pricing/) 13.0.
+> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/30335) in GitLab 13.0.
+> - [Moved](../../subscriptions/bronze_starter.md) to GitLab Premium in 13.9.
To filter merge requests already approved by a specific individual, you can type (or select from
the dropdown) **Approved-By** and select the user.
@@ -291,14 +293,14 @@ redirected to the commit result and given the option to return to the search res
![project SHA search redirect](img/project_search_sha_redirect.png)
-## Advanced Search **(STARTER)**
+## Advanced Search **(PREMIUM)**
Leverage Elasticsearch for faster, more advanced code search across your entire
GitLab instance.
[Learn how to use the Advanced Search.](advanced_global_search.md)
-## Advanced Search Syntax **(STARTER)**
+## Advanced Search Syntax **(PREMIUM)**
Use advanced queries for more targeted search results.
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 2d63d015ed7..bf3ed0beb04 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -7335,6 +7335,9 @@ msgstr ""
msgid "ComplianceFrameworks|There are no compliance frameworks set up yet"
msgstr ""
+msgid "ComplianceFrameworks|Unable to save this compliance framework. Please try again"
+msgstr ""
+
msgid "ComplianceFrameworks|Use %{codeStart}::%{codeEnd} to create a %{linkStart}scoped set%{linkEnd} (eg. %{codeStart}SOX::AWS%{codeEnd})"
msgstr ""
diff --git a/spec/deprecation_toolkit_env.rb b/spec/deprecation_toolkit_env.rb
index bc90f67f0db..a3f1bd0a269 100644
--- a/spec/deprecation_toolkit_env.rb
+++ b/spec/deprecation_toolkit_env.rb
@@ -1,18 +1,98 @@
# frozen_string_literal: true
-if ENV.key?('RECORD_DEPRECATIONS')
- require 'deprecation_toolkit'
- require 'deprecation_toolkit/rspec'
- DeprecationToolkit::Configuration.test_runner = :rspec
- DeprecationToolkit::Configuration.deprecation_path = 'deprecations'
- DeprecationToolkit::Configuration.behavior = DeprecationToolkit::Behaviors::Record
+require 'deprecation_toolkit'
+require 'deprecation_toolkit/rspec'
- # Enable ruby deprecations for keywords, it's suppressed by default in Ruby 2.7.2
- Warning[:deprecated] = true
+module DeprecationToolkitEnv
+ module DeprecationBehaviors
+ class SelectiveRaise
+ attr_reader :disallowed_deprecations_proc
- kwargs_warnings = [
- # Taken from https://github.com/jeremyevans/ruby-warning/blob/1.1.0/lib/warning.rb#L18
+ class RaiseDisallowedDeprecation < StandardError
+ def initialize(test, current_deprecations)
+ message = <<~EOF
+ Disallowed deprecations detected while running test #{test}:
+
+ #{current_deprecations.deprecations.join("\n")}
+ EOF
+
+ super(message)
+ end
+ end
+
+ def initialize(disallowed_deprecations_proc)
+ @disallowed_deprecations_proc = disallowed_deprecations_proc
+ end
+
+ # Note: trigger does not get called if the current_deprecations matches recorded_deprecations
+ # See https://github.com/Shopify/deprecation_toolkit/blob/2398f38acb62220fb79a6cd720f61d9cea26bc06/lib/deprecation_toolkit/test_triggerer.rb#L8-L11
+ def trigger(test, current_deprecations, recorded_deprecations)
+ if selected_for_raise?(current_deprecations)
+ raise RaiseDisallowedDeprecation.new(test, current_deprecations)
+ elsif ENV['RECORD_DEPRECATIONS']
+ record(test, current_deprecations, recorded_deprecations)
+ end
+ end
+
+ private
+
+ def selected_for_raise?(current_deprecations)
+ disallowed_deprecations_proc.call(current_deprecations.deprecations_without_stacktrace)
+ end
+
+ def record(test, current_deprecations, recorded_deprecations)
+ ::DeprecationToolkit::Behaviors::Record.trigger(test, current_deprecations, recorded_deprecations)
+ end
+ end
+ end
+
+ # Taken from https://github.com/jeremyevans/ruby-warning/blob/1.1.0/lib/warning.rb#L18
+ def self.kwargs_warning
%r{warning: (?:Using the last argument (?:for `.+' )?as keyword parameters is deprecated; maybe \*\* should be added to the call|Passing the keyword argument (?:for `.+' )?as the last hash parameter is deprecated|Splitting the last argument (?:for `.+' )?into positional and keyword parameters is deprecated|The called method (?:`.+' )?is defined here)\n\z}
- ]
- DeprecationToolkit::Configuration.warnings_treated_as_deprecation = kwargs_warnings
+ end
+
+ # Allow these Gem paths to trigger keyword warnings as we upgrade these gems
+ # one by one
+ def self.allowed_kwarg_warning_paths
+ %w[
+ ee/lib/ee/gitlab/usage_data.rb
+ spec/lib/gitlab/utils/usage_data_spec.rb
+ spec/support/gitlab_experiment.rb
+ spec/support/helpers/next_instance_of.rb
+ rspec-mocks-3.10.0/lib/rspec/mocks/message_expectation.rb
+ activerecord-6.0.3.4/lib/active_record/migration.rb
+ devise-4.7.3/lib/devise/test/controller_helpers.rb
+ attr_encrypted-3.1.0/lib/attr_encrypted/adapters/active_record.rb
+ rspec-mocks-3.10.0/lib/rspec/mocks/message_expectation.rb
+ rspec-expectations-3.10.0/lib/rspec/matchers/built_in/has.rb
+ grape-1.5.1/lib/grape/middleware/stack.rb
+ grape-1.5.1/lib/grape/validations/validators/coerce.rb
+ grape_logging-1.8.3/lib/grape_logging/middleware/request_logger.rb
+ activesupport-6.0.3.4/lib/active_support/cache.rb
+ factory_bot-6.1.0/lib/factory_bot/decorator.rb
+ doorkeeper-5.4.0/lib/doorkeeper/models/access_token_mixin.rb
+ rouge-3.26.0/lib/rouge/formatter.rb
+ batch-loader-1.4.0/lib/batch_loader/graphql.rb
+ carrierwave-1.3.1/lib/carrierwave/sanitized_file.rb
+ activerecord-6.0.3.4/lib/active_record/relation.rb
+ ]
+ end
+
+ def self.configure!
+ # Enable ruby deprecations for keywords, it's suppressed by default in Ruby 2.7.2
+ Warning[:deprecated] = true
+
+ DeprecationToolkit::Configuration.test_runner = :rspec
+ DeprecationToolkit::Configuration.deprecation_path = 'deprecations'
+ DeprecationToolkit::Configuration.warnings_treated_as_deprecation = [kwargs_warning]
+
+ disallowed_deprecations = -> (deprecations) do
+ deprecations.any? do |deprecation|
+ kwargs_warning.match?(deprecation) &&
+ allowed_kwarg_warning_paths.none? { |path| deprecation.include?(path) }
+ end
+ end
+
+ DeprecationToolkit::Configuration.behavior = DeprecationBehaviors::SelectiveRaise.new(disallowed_deprecations)
+ end
end
diff --git a/spec/frontend/boards/components/board_assignee_dropdown_spec.js b/spec/frontend/boards/components/board_assignee_dropdown_spec.js
index e52c14f9783..b7c75db542c 100644
--- a/spec/frontend/boards/components/board_assignee_dropdown_spec.js
+++ b/spec/frontend/boards/components/board_assignee_dropdown_spec.js
@@ -38,7 +38,7 @@ describe('BoardCardAssigneeDropdown', () => {
return {
search,
selected: [],
- participants,
+ issueParticipants: participants,
};
},
store,
@@ -49,7 +49,7 @@ describe('BoardCardAssigneeDropdown', () => {
mocks: {
$apollo: {
queries: {
- participants: {
+ searchUsers: {
loading,
},
},
@@ -70,7 +70,6 @@ describe('BoardCardAssigneeDropdown', () => {
return {
search,
selected: [],
- participants,
};
},
store,
@@ -256,17 +255,15 @@ describe('BoardCardAssigneeDropdown', () => {
},
);
- describe('when participants is loading', () => {
- beforeEach(() => {
- createComponent('', true);
- });
-
+ describe('when searching users is loading', () => {
it('finds a loading icon in the dropdown', () => {
+ createComponent('test', true);
+
expect(findLoadingIcon().exists()).toBe(true);
});
});
- describe('when participants is loading is false', () => {
+ describe('when participants loading is false', () => {
beforeEach(() => {
createComponent();
});
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 89b13591c7e..b986777b361 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -13,6 +13,7 @@ end
Warning[:deprecated] = true unless ENV.key?('SILENCE_DEPRECATIONS')
require './spec/deprecation_toolkit_env'
+DeprecationToolkitEnv.configure!
require './spec/simplecov_env'
SimpleCovEnv.start!
@@ -174,6 +175,7 @@ RSpec.configure do |config|
if ENV['CI'] || ENV['RETRIES']
# This includes the first try, i.e. tests will be run 4 times before failing.
config.default_retry_count = ENV.fetch('RETRIES', 3).to_i + 1
+ config.exceptions_to_hard_fail = [DeprecationToolkitEnv::DeprecationBehaviors::SelectiveRaise::RaiseDisallowedDeprecation]
end
if ENV['FLAKY_RSPEC_GENERATE_REPORT']
diff --git a/spec/support/shared_examples/models/concerns/repository_storage_movable_shared_examples.rb b/spec/support/shared_examples/models/concerns/repository_storage_movable_shared_examples.rb
index 4a5f689ec13..f990c857439 100644
--- a/spec/support/shared_examples/models/concerns/repository_storage_movable_shared_examples.rb
+++ b/spec/support/shared_examples/models/concerns/repository_storage_movable_shared_examples.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-RSpec.shared_examples 'handles repository moves' do
+RSpec.shared_examples 'handles repository moves' do |check_worker: true|
describe 'associations' do
it { is_expected.to belong_to(:container) }
end
@@ -33,7 +33,7 @@ RSpec.shared_examples 'handles repository moves' do
subject { build(repository_storage_factory_key, container: container) }
it "does not allow the container to be read-only on create" do
- container.update!(repository_read_only: true)
+ container.set_repository_read_only!
expect(subject).not_to be_valid
expect(subject.errors[error_key].first).to match(/is read only/)
@@ -61,23 +61,25 @@ RSpec.shared_examples 'handles repository moves' do
context 'when in the default state' do
subject(:storage_move) { create(repository_storage_factory_key, container: container, destination_storage_name: 'test_second_storage') }
- context 'and transits to scheduled' do
- it 'triggers the corresponding repository storage worker' do
- expect(repository_storage_worker).to receive(:perform_async).with(container.id, 'test_second_storage', storage_move.id)
-
- storage_move.schedule!
-
- expect(container).to be_repository_read_only
- end
-
- context 'when the transition fails' do
- it 'does not trigger the corresponding repository storage worker and adds an error' do
- allow(storage_move.container).to receive(:set_repository_read_only!).and_raise(StandardError, 'foobar')
- expect(repository_storage_worker).not_to receive(:perform_async)
+ if check_worker
+ context 'and transits to scheduled' do
+ it 'triggers the corresponding repository storage worker' do
+ expect(repository_storage_worker).to receive(:perform_async).with(container.id, 'test_second_storage', storage_move.id)
storage_move.schedule!
- expect(storage_move.errors[error_key]).to include('foobar')
+ expect(container).to be_repository_read_only
+ end
+
+ context 'when the transition fails' do
+ it 'does not trigger the corresponding repository storage worker and adds an error' do
+ allow(storage_move.container).to receive(:set_repository_read_only!).and_raise(StandardError, 'foobar')
+ expect(repository_storage_worker).not_to receive(:perform_async)
+
+ storage_move.schedule!
+
+ expect(storage_move.errors[error_key]).to include('foobar')
+ end
end
end
end
diff --git a/spec/support/shared_examples/services/resource_events/change_milestone_service_shared_examples.rb b/spec/support/shared_examples/services/resource_events/change_milestone_service_shared_examples.rb
index d70ed707822..7d42bda7090 100644
--- a/spec/support/shared_examples/services/resource_events/change_milestone_service_shared_examples.rb
+++ b/spec/support/shared_examples/services/resource_events/change_milestone_service_shared_examples.rb
@@ -4,7 +4,7 @@ RSpec.shared_examples 'timebox(milestone or iteration) resource events creator'
let_it_be(:user) { create(:user) }
context 'when milestone/iteration is added' do
- let(:service) { described_class.new(resource, user, add_timebox_args) }
+ let(:service) { described_class.new(resource, user, **add_timebox_args) }
before do
set_timebox(timebox_event_class, timebox)
@@ -18,7 +18,7 @@ RSpec.shared_examples 'timebox(milestone or iteration) resource events creator'
end
context 'when milestone/iteration is removed' do
- let(:service) { described_class.new(resource, user, remove_timebox_args) }
+ let(:service) { described_class.new(resource, user, **remove_timebox_args) }
before do
set_timebox(timebox_event_class, nil)
diff --git a/spec/tasks/gitlab/pages_rake_spec.rb b/spec/tasks/gitlab/pages_rake_spec.rb
index 9c26d3d73c8..81b1bd92820 100644
--- a/spec/tasks/gitlab/pages_rake_spec.rb
+++ b/spec/tasks/gitlab/pages_rake_spec.rb
@@ -2,7 +2,7 @@
require 'rake_helper'
-RSpec.describe 'gitlab:pages:migrate_legacy_storagerake task' do
+RSpec.describe 'gitlab:pages:migrate_legacy_storagerake task', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/300123' do
before(:context) do
Rake.application.rake_require 'tasks/gitlab/pages'
end