Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/google_tag_manager/index.js3
-rw-r--r--app/assets/javascripts/search/sidebar/components/label_filter/index.vue31
-rw-r--r--app/assets/javascripts/search/sidebar/components/label_filter/label_dropdown_items.vue6
-rw-r--r--app/assets/javascripts/sidebar/components/participants/participants.vue9
-rw-r--r--app/assets/javascripts/vue_shared/global_search/constants.js20
-rw-r--r--app/assets/stylesheets/page_bundles/search.scss4
-rw-r--r--app/views/layouts/_google_tag_manager_head.html.haml1
-rw-r--r--config/feature_flags/ops/gtm_nonce.yml2
-rw-r--r--config/metrics/counts_all/20210216180232_projects_jira_dvcs_cloud_active.yml3
-rw-r--r--config/metrics/counts_all/20210216180234_projects_jira_dvcs_server_active.yml3
-rw-r--r--doc/administration/object_storage.md2
-rw-r--r--doc/administration/pages/index.md144
-rw-r--r--doc/administration/pages/troubleshooting.md4
-rw-r--r--doc/api/groups.md4
-rw-r--r--doc/ci/testing/accessibility_testing.md22
-rw-r--r--doc/ci/testing/browser_performance_testing.md76
-rw-r--r--doc/ci/testing/load_performance_testing.md9
-rw-r--r--doc/integration/advanced_search/elasticsearch.md7
-rw-r--r--doc/user/admin_area/moderate_users.md3
-rw-r--r--doc/user/workspace/index.md2
-rw-r--r--lib/gitlab/jwt_authenticatable.rb4
-rw-r--r--lib/gitlab/usage/metrics/instrumentations/count_projects_with_jira_dvcs_integration_metric.rb23
-rw-r--r--lib/gitlab/usage_data.rb9
-rw-r--r--locale/gitlab.pot8
-rw-r--r--qa/qa/runtime/env.rb4
-rw-r--r--qa/qa/service/docker_run/video.rb6
-rw-r--r--rubocop/rubocop-code_reuse.yml1
-rw-r--r--spec/features/projects/user_sees_user_popover_spec.rb2
-rw-r--r--spec/frontend/search/sidebar/components/label_filter_spec.js30
-rw-r--r--spec/frontend/sidebar/components/participants/participants_spec.js13
-rw-r--r--spec/lib/gitlab/jwt_authenticatable_spec.rb26
-rw-r--r--spec/lib/gitlab/usage/metrics/instrumentations/count_projects_with_jira_dvcs_integration_metric_spec.rb50
-rw-r--r--spec/support/helpers/usage_data_helpers.rb2
-rw-r--r--spec/support/stub_dot_com_check.rb2
34 files changed, 246 insertions, 289 deletions
diff --git a/app/assets/javascripts/google_tag_manager/index.js b/app/assets/javascripts/google_tag_manager/index.js
index 0a1a7a74d21..a9ae9a5af82 100644
--- a/app/assets/javascripts/google_tag_manager/index.js
+++ b/app/assets/javascripts/google_tag_manager/index.js
@@ -129,6 +129,9 @@ export const trackSaasTrialGroup = () => {
}
const form = document.querySelector('.js-saas-trial-group');
+
+ if (!form) return;
+
form.addEventListener('submit', () => {
pushEvent('saasTrialGroup');
});
diff --git a/app/assets/javascripts/search/sidebar/components/label_filter/index.vue b/app/assets/javascripts/search/sidebar/components/label_filter/index.vue
index 74855482b5d..eb3556ac2cf 100644
--- a/app/assets/javascripts/search/sidebar/components/label_filter/index.vue
+++ b/app/assets/javascripts/search/sidebar/components/label_filter/index.vue
@@ -14,17 +14,11 @@ import { mapActions, mapState, mapGetters } from 'vuex';
import { uniq } from 'lodash';
import { rgbFromHex } from '@gitlab/ui/dist/utils/utils';
import { slugify } from '~/lib/utils/text_utility';
-import { s__, sprintf } from '~/locale';
+import { sprintf } from '~/locale';
import DropdownKeyboardNavigation from '~/vue_shared/components/dropdown_keyboard_navigation.vue';
-import {
- SEARCH_INPUT_DESCRIBE_BY_NO_DROPDOWN,
- SEARCH_INPUT_DESCRIBE_BY_WITH_DROPDOWN,
- SEARCH_DESCRIBED_BY_DEFAULT,
- SEARCH_DESCRIBED_BY_UPDATED,
- SEARCH_RESULTS_LOADING,
-} from '~/vue_shared/global_search/constants';
+import { I18N } from '~/vue_shared/global_search/constants';
import { HR_DEFAULT_CLASSES, ONLY_SHOW_MD } from '../../constants';
import LabelDropdownItems from './label_dropdown_items.vue';
@@ -60,16 +54,7 @@ export default {
isFocused: false,
};
},
- i18n: {
- SEARCH_LABELS: s__('GlobalSearch|Search labels'),
- DROPDOWN_HEADER: s__('GlobalSearch|Label(s)'),
- AGGREGATIONS_ERROR_MESSAGE: s__('GlobalSearch|Fetching aggregations error.'),
- SEARCH_DESCRIBED_BY_DEFAULT,
- SEARCH_RESULTS_LOADING,
- SEARCH_DESCRIBED_BY_UPDATED,
- SEARCH_INPUT_DESCRIBE_BY_WITH_DROPDOWN,
- SEARCH_INPUT_DESCRIBE_BY_NO_DROPDOWN,
- },
+ i18n: I18N,
computed: {
...mapState(['useSidebarNavigation', 'searchLabelString', 'query', 'aggregations']),
...mapGetters([
@@ -260,7 +245,7 @@ export default {
:default-index="defaultIndex"
:enable-cycle="true"
/>
- <div v-if="!aggregations.error">
+ <div v-if="!aggregations.error && filteredLabels.length > 0">
<gl-dropdown-section-header v-if="hasSelectedLabels || hasUnselectedLabels">{{
$options.i18n.DROPDOWN_HEADER
}}</gl-dropdown-section-header>
@@ -280,7 +265,13 @@ export default {
</gl-form-checkbox-group>
</gl-dropdown-form>
</div>
- <gl-alert v-else :dismissible="false" variant="danger">
+ <span
+ v-if="!aggregations.error && filteredLabels.length === 0"
+ class="gl-px-3"
+ data-testid="no-labels-found-message"
+ >{{ $options.i18n.NO_LABELS_FOUND }}</span
+ >
+ <gl-alert v-if="aggregations.error" :dismissible="false" variant="danger">
{{ $options.i18n.AGGREGATIONS_ERROR_MESSAGE }}
</gl-alert>
<gl-loading-icon v-if="aggregations.fetching" size="lg" class="my-4" />
diff --git a/app/assets/javascripts/search/sidebar/components/label_filter/label_dropdown_items.vue b/app/assets/javascripts/search/sidebar/components/label_filter/label_dropdown_items.vue
index 7a9e6a2e4fc..0b468a60cf0 100644
--- a/app/assets/javascripts/search/sidebar/components/label_filter/label_dropdown_items.vue
+++ b/app/assets/javascripts/search/sidebar/components/label_filter/label_dropdown_items.vue
@@ -26,15 +26,15 @@ export default {
class="gl-px-5 gl-py-3 label-filter-menu-item"
>
<gl-form-checkbox
- class="label-with-color-checkbox gl-display-inline-flex gl-h-5 gl-min-h-5"
+ class="label-with-color-checkbox gl-display-inline-flex gl-min-h-5"
:value="label.key"
>
<span
data-testid="label-color-indicator"
- class="gl-rounded-base gl-w-5 gl-h-5 gl-display-inline-block gl-vertical-align-bottom gl-mr-3"
+ class="gl-rounded-base gl-min-w-5 gl-h-5 gl-display-inline-block gl-vertical-align-bottom gl-mr-3"
:style="{ 'background-color': label.color }"
></span>
- <span class="gl-reset-text-align gl-m-0 gl-p-0 label-title">{{
+ <span class="gl-reset-text-align gl-m-0 gl-p-0 label-title gl-word-break-all">{{
label.title
}}</span></gl-form-checkbox
>
diff --git a/app/assets/javascripts/sidebar/components/participants/participants.vue b/app/assets/javascripts/sidebar/components/participants/participants.vue
index bbd3cda0ad3..bad73273409 100644
--- a/app/assets/javascripts/sidebar/components/participants/participants.vue
+++ b/app/assets/javascripts/sidebar/components/participants/participants.vue
@@ -1,6 +1,7 @@
<script>
import { GlButton, GlIcon, GlLoadingIcon, GlTooltipDirective } from '@gitlab/ui';
import { __, n__, sprintf } from '~/locale';
+import { getIdFromGraphQLId } from '~/graphql_shared/utils';
import UserAvatarImage from '~/vue_shared/components/user_avatar/user_avatar_image.vue';
export default {
@@ -81,6 +82,9 @@ export default {
toggleMoreParticipants() {
this.isShowingMoreParticipants = !this.isShowingMoreParticipants;
},
+ getParticipantId(participantId) {
+ return getIdFromGraphQLId(participantId);
+ },
onClickCollapsedIcon() {
this.$emit('toggleSidebar');
},
@@ -118,13 +122,14 @@ export default {
>
<a
:href="participant.web_url || participant.webUrl"
- class="author-link gl-display-inline-block gl-rounded-full"
+ :data-user-id="getParticipantId(participant.id)"
+ :data-username="participant.username"
+ class="author-link js-user-link gl-display-inline-block gl-rounded-full"
>
<user-avatar-image
:lazy="lazy"
:img-src="participant.avatar_url || participant.avatarUrl"
:size="24"
- :tooltip-text="participant.name"
:img-alt="participant.name"
css-classes="gl-mr-0!"
tooltip-placement="bottom"
diff --git a/app/assets/javascripts/vue_shared/global_search/constants.js b/app/assets/javascripts/vue_shared/global_search/constants.js
index 4211b9578a2..955ccae4efb 100644
--- a/app/assets/javascripts/vue_shared/global_search/constants.js
+++ b/app/assets/javascripts/vue_shared/global_search/constants.js
@@ -75,3 +75,23 @@ export const SEARCH_RESULTS_ORDER = [
HELP_CATEGORY,
];
export const DROPDOWN_ORDER = SEARCH_RESULTS_ORDER;
+
+export const SEARCH_LABELS = s__('GlobalSearch|Search labels');
+
+export const DROPDOWN_HEADER = s__('GlobalSearch|Label(s)');
+
+export const AGGREGATIONS_ERROR_MESSAGE = s__('GlobalSearch|Fetching aggregations error.');
+
+export const NO_LABELS_FOUND = s__('GlobalSearch|No labels found');
+
+export const I18N = {
+ SEARCH_DESCRIBED_BY_DEFAULT,
+ SEARCH_RESULTS_LOADING,
+ SEARCH_DESCRIBED_BY_UPDATED,
+ SEARCH_INPUT_DESCRIBE_BY_WITH_DROPDOWN,
+ SEARCH_INPUT_DESCRIBE_BY_NO_DROPDOWN,
+ SEARCH_LABELS,
+ DROPDOWN_HEADER,
+ AGGREGATIONS_ERROR_MESSAGE,
+ NO_LABELS_FOUND,
+};
diff --git a/app/assets/stylesheets/page_bundles/search.scss b/app/assets/stylesheets/page_bundles/search.scss
index d1d14cbcddd..a3a62b44e98 100644
--- a/app/assets/stylesheets/page_bundles/search.scss
+++ b/app/assets/stylesheets/page_bundles/search.scss
@@ -69,11 +69,9 @@ $language-filter-max-height: 20rem;
}
.label-with-color-checkbox {
- max-height: $gl-spacing-scale-5;
-
.custom-control-label {
+ display: flex;
margin-bottom: 0;
- max-height: $gl-spacing-scale-5;
.label-title {
margin-left: -$gl-spacing-scale-2;
diff --git a/app/views/layouts/_google_tag_manager_head.html.haml b/app/views/layouts/_google_tag_manager_head.html.haml
index 21b9a604a35..711a3d66ff7 100644
--- a/app/views/layouts/_google_tag_manager_head.html.haml
+++ b/app/views/layouts/_google_tag_manager_head.html.haml
@@ -1,4 +1,5 @@
- return unless google_tag_manager_enabled?
+
- if Feature.enabled?(:gitlab_gtm_datalayer, type: :ops)
= javascript_tag do
:plain
diff --git a/config/feature_flags/ops/gtm_nonce.yml b/config/feature_flags/ops/gtm_nonce.yml
index b4007732aa2..c206efd2a08 100644
--- a/config/feature_flags/ops/gtm_nonce.yml
+++ b/config/feature_flags/ops/gtm_nonce.yml
@@ -1,7 +1,7 @@
---
name: gtm_nonce
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/58494
-rollout_issue_url:
+rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/346322
milestone: '14.6'
type: ops
group: group::product intelligence
diff --git a/config/metrics/counts_all/20210216180232_projects_jira_dvcs_cloud_active.yml b/config/metrics/counts_all/20210216180232_projects_jira_dvcs_cloud_active.yml
index 29edaa6ab3b..5bf8e1d6e78 100644
--- a/config/metrics/counts_all/20210216180232_projects_jira_dvcs_cloud_active.yml
+++ b/config/metrics/counts_all/20210216180232_projects_jira_dvcs_cloud_active.yml
@@ -9,6 +9,9 @@ value_type: number
status: active
time_frame: all
data_source: database
+instrumentation_class: CountProjectsWithJiraDvcsIntegrationMetric
+options:
+ cloud: true
distribution:
- ce
- ee
diff --git a/config/metrics/counts_all/20210216180234_projects_jira_dvcs_server_active.yml b/config/metrics/counts_all/20210216180234_projects_jira_dvcs_server_active.yml
index 9673956c7e1..bfb402c257e 100644
--- a/config/metrics/counts_all/20210216180234_projects_jira_dvcs_server_active.yml
+++ b/config/metrics/counts_all/20210216180234_projects_jira_dvcs_server_active.yml
@@ -9,6 +9,9 @@ value_type: number
status: active
time_frame: all
data_source: database
+instrumentation_class: CountProjectsWithJiraDvcsIntegrationMetric
+options:
+ cloud: false
distribution:
- ce
- ee
diff --git a/doc/administration/object_storage.md b/doc/administration/object_storage.md
index 16e65864fd9..2bf3ef0275c 100644
--- a/doc/administration/object_storage.md
+++ b/doc/administration/object_storage.md
@@ -174,7 +174,7 @@ supported by consolidated form, refer to the following guides:
| [Packages](packages/index.md#use-object-storage) (optional feature) | **{check-circle}** Yes |
| [Dependency Proxy](packages/dependency_proxy.md#using-object-storage) (optional feature) | **{check-circle}** Yes |
| [Terraform state files](terraform_state.md#using-object-storage) | **{check-circle}** Yes |
-| [Pages content](pages/index.md#using-object-storage) | **{check-circle}** Yes |
+| [Pages content](pages/index.md#object-storage-settings) | **{check-circle}** Yes |
## Configure the connection settings
diff --git a/doc/administration/pages/index.md b/doc/administration/pages/index.md
index 5c083e8848a..190602b9047 100644
--- a/doc/administration/pages/index.md
+++ b/doc/administration/pages/index.md
@@ -779,7 +779,7 @@ database encryption. Proceed with caution.
gitlab_pages['access_control'] = true
```
-1. Configure [the object storage and migrate pages data to it](#using-object-storage).
+1. Configure [the object storage and migrate pages data to it](#object-storage-settings).
1. [Reconfigure the **GitLab server**](../restart_gitlab.md#reconfigure-a-linux-package-installation) for the
changes to take effect. The `gitlab-secrets.json` file is now updated with the
@@ -853,45 +853,12 @@ This approach had several disadvantages and was replaced with GitLab Pages using
every time a new domain is requested.
The domain information is also cached by the Pages daemon to speed up subsequent requests.
-From [GitLab 13.3 to GitLab 13.12](#domain-source-configuration-before-140) GitLab Pages supported both ways of obtaining domain information.
-
Starting from [GitLab 14.0](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5993) GitLab Pages uses API
by default and fails to start if it can't connect to it.
For common issues, see [troubleshooting](troubleshooting.md#failed-to-connect-to-the-internal-gitlab-api).
For more details see this [blog post](https://about.gitlab.com/blog/2020/08/03/how-gitlab-pages-uses-the-gitlab-api-to-serve-content/).
-### Domain source configuration before 14.0
-
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/217912) in GitLab 13.3.
-
-WARNING:
-`domain_config_source` parameter is removed and has no effect starting from [GitLab 14.0](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5993)
-
-From [GitLab 13.3](https://gitlab.com/gitlab-org/gitlab/-/issues/217912) to [GitLab 13.12](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5993) GitLab Pages can either use `disk` or `gitlab` domain configuration source.
-
-We highly advise you to use `gitlab` configuration source as it makes transitions to newer versions easier.
-
-To explicitly enable API source:
-
-1. Add the following to your `/etc/gitlab/gitlab.rb` file:
-
- ```ruby
- gitlab_pages['domain_config_source'] = "gitlab"
- ```
-
-1. [Reconfigure GitLab](../restart_gitlab.md#reconfigure-a-linux-package-installation) for the changes to take effect.
-
-Or if you want to use legacy configuration source you can:
-
-1. Add the following to your `/etc/gitlab/gitlab.rb` file:
-
- ```ruby
- gitlab_pages['domain_config_source'] = "disk"
- ```
-
-1. [Reconfigure GitLab](../restart_gitlab.md#reconfigure-a-linux-package-installation) for the changes to take effect.
-
### GitLab API cache configuration
> [Introduced](https://gitlab.com/gitlab-org/gitlab-pages/-/issues/520) in GitLab 13.10.
@@ -930,15 +897,9 @@ only when there is an error response from the API, for example a connection time
- Decreasing `gitlab_retrieval_retries` reduces the number of times a domain's
configuration is tried to be resolved automatically before reporting an error.
-## Using object storage
-
-> [Introduced](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5577) in GitLab 13.6.
+## Object storage settings
-For more information, see [object storage](../object_storage.md).
-
-### Object storage settings
-
-The following settings are:
+The following [object storage](../object_storage.md) settings are:
- Nested under `pages:` and then `object_store:` on source installations.
- Prefixed by `pages_object_store_` on Omnibus GitLab installations.
@@ -953,7 +914,7 @@ NOTE:
If you want to stop using and disconnect the NFS server, you need to
[explicitly disable local storage](#disable-pages-local-storage), and it's only possible after upgrading to GitLab 13.11.
-#### S3-compatible connection settings
+### S3-compatible connection settings
In GitLab 13.2 and later, you should use the
[consolidated object storage settings](../object_storage.md#configure-a-single-storage-connection-for-all-object-types-consolidated-form).
@@ -1013,75 +974,12 @@ In installations from source:
1. [Migrate existing Pages deployments to object storage.](#migrate-pages-deployments-to-object-storage)
-## ZIP storage
-
-In GitLab 14.0 the underlying storage format of GitLab Pages is changing from
-files stored directly in disk to a single ZIP archive per project.
-
-These ZIP archives can be stored either locally on disk storage or on [object storage](#using-object-storage) if it is configured.
-
-[Starting from GitLab 13.5](https://gitlab.com/gitlab-org/gitlab/-/issues/245308) ZIP archives are stored every time pages site is updated.
-
-### Migrate legacy storage to ZIP storage
-
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/59003) in GitLab 13.11.
-
-GitLab tries to
-[automatically migrate](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/54578)
-the old storage format to the new ZIP-based one when you upgrade to GitLab 13.11 or further.
-However, some projects may fail to be migrated for different reasons.
-To verify that all projects have been migrated successfully, you can manually run the migration:
-
-```shell
-sudo gitlab-rake gitlab:pages:migrate_legacy_storage
-```
-
-It's safe to interrupt this task and run it multiple times.
-
-There are two most common problems this task can report:
-
-- `Missing public directory` error:
-
- ```txt
- E, [2021-04-09T13:11:52.534768 #911919] ERROR -- : project_id: 1 /home/vlad/gdk/gitlab/shared/pages/gitlab-org/gitlab-test failed to be migrated in 0.07 seconds: Archive not created. Missing public directory in /home/vlad/gdk/gitlab/shared/pages/gitlab-org/gitlab-test
- ```
-
- In this case, you should verify that these projects don't have pages deployed, and re-run the migration with an additional flag to mark those projects as not deployed with GitLab Pages:
-
- ```shell
- sudo PAGES_MIGRATION_MARK_PROJECTS_AS_NOT_DEPLOYED=true gitlab-rake gitlab:pages:migrate_legacy_storage
- ```
-
-- File `is invalid` error:
-
- ```txt
- E, [2021-04-09T14:43:05.821767 #923322] ERROR -- : project_id: 1 /home/vlad/gdk/gitlab/shared/pages/gitlab-org/gitlab-test failed to be migrated: /home/vlad/gdk/gitlab/shared/pages/gitlab-org/gitlab-test/public/link is invalid, input_dir: /home/vlad/gdk/gitlab/shared/pages/gitlab-org/gitlab-test
- ```
-
- This error indicates invalid files on disk storage, most commonly symlinks leading outside of the `public` directory.
- You can manually remove these files, or just ignore them during migration:
-
- ```shell
- sudo PAGES_MIGRATION_IGNORE_INVALID_ENTRIES=true gitlab-rake gitlab:pages:migrate_legacy_storage
- ```
-
-### Rolling back ZIP migration
-
-If you find that migrated data is invalid, you can remove all migrated data by running:
-
-```shell
-sudo gitlab-rake gitlab:pages:clean_migrated_zip_storage
-```
-
-This does not remove any data from the legacy disk storage and the GitLab Pages daemon automatically falls back
-to using that.
-
### Migrate Pages deployments to object storage
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/325285) in GitLab 13.11.
+Existing Pages deployment objects (zip archives) can be stored in either:
-Existing Pages deployment objects (which store [ZIP archives](#zip-storage)) can similarly be
-migrated to [object storage](#using-object-storage).
+- Local storage
+- [Object storage](../object_storage.md)
Migrate your existing Pages deployments from local storage to object storage:
@@ -1121,7 +1019,7 @@ sudo gitlab-rake gitlab:pages:deployments:migrate_to_local
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/301159) in GitLab 13.11.
-If you use [object storage](#using-object-storage), you can disable local storage to avoid unnecessary disk usage/writes:
+If you use [object storage](#object-storage-settings), you can disable local storage to avoid unnecessary disk usage/writes:
1. Edit `/etc/gitlab/gitlab.rb`:
@@ -1131,30 +1029,14 @@ If you use [object storage](#using-object-storage), you can disable local storag
1. [Reconfigure GitLab](../restart_gitlab.md#reconfigure-a-linux-package-installation) for the changes to take effect.
-Starting from GitLab 13.12, this setting also disables the [legacy storage](#migrate-legacy-storage-to-zip-storage), so if you were using NFS to serve Pages, you can completely disconnect from it.
-
-## Prepare GitLab Pages for 14.0
-
-In GitLab 14.0 a number of breaking changes were introduced which may require some user intervention.
-The steps below describe the best way to migrate without causing any downtime for your GitLab instance.
+## ZIP storage
-A GitLab instance running on a single server typically upgrades to 14.0 smoothly, and there should be minimal issues after the upgrade is complete.
-Regardless, you should follow the migration steps to ensure a successful upgrade.
-For common issues, see [troubleshooting](troubleshooting.md).
+In GitLab 14.0 the underlying storage format of GitLab Pages changed from
+files stored directly in disk to a single ZIP archive per project.
-If your current GitLab version is lower than 13.12, then you must first update to 13.12.
-Updating directly to 14.0 is [not supported](../../update/index.md#upgrade-paths)
-and may cause downtime for some web-sites hosted on GitLab Pages. After you update to 13.12,
-migrate GitLab Pages to prepare them for GitLab 14.0:
+These ZIP archives can be stored either locally on disk storage or on [object storage](#object-storage-settings) if it is configured.
-1. Set [`domain_config_source` to `gitlab`](#domain-source-configuration-before-140), which
-is the default starting from GitLab 14.0. Skip this step if you're already running GitLab 14.0 or above.
-1. If you want to store your pages content in [object storage](#using-object-storage), make sure to configure it.
-If you want to store the pages content locally or continue using an NFS server, skip this step.
-1. [Migrate legacy storage to ZIP storage.](#migrate-legacy-storage-to-zip-storage)
-1. If you have configured GitLab to store your pages content in [object storage](#using-object-storage),
- [migrate Pages deployments to object storage](#migrate-pages-deployments-to-object-storage)
-1. Upgrade GitLab to 14.0.
+[Starting from GitLab 13.5](https://gitlab.com/gitlab-org/gitlab/-/issues/245308) ZIP archives are stored every time pages site is updated.
## Backup
diff --git a/doc/administration/pages/troubleshooting.md b/doc/administration/pages/troubleshooting.md
index e829943f270..7e184631515 100644
--- a/doc/administration/pages/troubleshooting.md
+++ b/doc/administration/pages/troubleshooting.md
@@ -250,7 +250,7 @@ the shared pages directory is mounted on a different path on the main GitLab ser
GitLab Pages server.
In that case, it's highly recommended you to configure
-[object storage and migrate any existing pages data to it](index.md#using-object-storage).
+[object storage and migrate any existing pages data to it](index.md#object-storage-settings).
Alternatively, you can mount the GitLab Pages shared directory to the same path on
both servers.
@@ -259,7 +259,7 @@ both servers.
GitLab 14.0 introduces a number of changes to GitLab Pages which may require manual intervention.
-1. Firstly [follow the migration guide](index.md#prepare-gitlab-pages-for-140).
+1. Firstly [follow the migration guide](https://archives.docs.gitlab.com/14.10/ee/administration/pages/#prepare-gitlab-pages-for-140).
1. Try to upgrade to GitLab 14.3 or above. Some of the issues were fixed in GitLab 14.1, 14.2 and 14.3.
1. If it doesn't work, see [GitLab Pages logs](#how-to-see-gitlab-pages-logs), and if you see any errors there then search them on this page.
diff --git a/doc/api/groups.md b/doc/api/groups.md
index fb645036dc0..9ef000935d6 100644
--- a/doc/api/groups.md
+++ b/doc/api/groups.md
@@ -1305,7 +1305,7 @@ POST /groups/:id/service_accounts/:user_id/personal_access_tokens
```
```shell
-curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gdk.test:3443/api/v4/groups/35/service_accounts/71/personal_access_tokens" --data "scopes[]=api" --data "name=service_accounts_token"
+curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/35/service_accounts/71/personal_access_tokens" --data "scopes[]=api" --data "name=service_accounts_token"
```
Example response:
@@ -1334,7 +1334,7 @@ POST /groups/:id/service_accounts/:user_id/personal_access_tokens/:token_id/rota
```
```shell
-curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gdk.test:3443/api/v4/groups/35/service_accounts/71/personal_access_tokens/6/rotate"
+curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/35/service_accounts/71/personal_access_tokens/6/rotate"
```
Example response:
diff --git a/doc/ci/testing/accessibility_testing.md b/doc/ci/testing/accessibility_testing.md
index b03e4a23153..f6d0468c876 100644
--- a/doc/ci/testing/accessibility_testing.md
+++ b/doc/ci/testing/accessibility_testing.md
@@ -4,14 +4,7 @@ group: Pipeline Execution
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
---
-<!--- start_remove The following content will be removed on remove_date: '2024-05-22' -->
-# Accessibility testing (deprecated) **(FREE)**
-
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/25144) in GitLab 12.8.
-
-WARNING:
-This feature was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/390424) in GitLab 15.9
-and is planned for removal in 17.0. This change is a breaking change.
+# Accessibility testing **(FREE)**
If your application offers a web interface, you can use
[GitLab CI/CD](../index.md) to determine the accessibility
@@ -19,7 +12,7 @@ impact of pending code changes.
[Pa11y](https://pa11y.org/) is a free and open source tool for
measuring the accessibility of web sites. GitLab integrates Pa11y into a
-[CI job template](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Verify/Accessibility.gitlab-ci.yml).
+[CI/CD job template](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Verify/Accessibility.gitlab-ci.yml).
The `a11y` job analyzes a defined set of web pages and reports
accessibility violations, warnings, and notices in a file named
`accessibility`.
@@ -29,9 +22,6 @@ As of [GitLab 14.5](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/73309)
## Accessibility merge request widget
-> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/39425) in GitLab 13.0 behind the disabled [feature flag](../../administration/feature_flags.md) `:accessibility_report_view`.
-> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/217372) in GitLab 13.1.
-
GitLab displays an **Accessibility Report** in the merge request widget area:
![Accessibility merge request widget](img/accessibility_mr_widget_v13_0.png)
@@ -41,7 +31,7 @@ GitLab displays an **Accessibility Report** in the merge request widget area:
You can run Pa11y with GitLab CI/CD using the
[GitLab Accessibility Docker image](https://gitlab.com/gitlab-org/ci-cd/accessibility).
-To define the `a11y` job for GitLab 12.9 and later:
+To define the `a11y` job:
1. [Include](../yaml/index.md#includetemplate) the
[`Accessibility.gitlab-ci.yml` template](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Verify/Accessibility.gitlab-ci.yml)
@@ -71,13 +61,7 @@ The `a11y` job in your CI/CD pipeline generates these files:
You can [view job artifacts in your browser](../jobs/job_artifacts.md#download-job-artifacts).
NOTE:
-For GitLab versions earlier than 12.9, use `include:remote` and
-link to the [current template in the default branch](https://gitlab.com/gitlab-org/gitlab/-/raw/master/lib/gitlab/ci/templates/Verify/Accessibility.gitlab-ci.yml)
-
-NOTE:
The job definition provided by the template does not support Kubernetes.
You cannot pass configurations into Pa11y via CI configuration.
To change the configuration, edit a copy of the template in your CI file.
-
-<!--- end_remove --> \ No newline at end of file
diff --git a/doc/ci/testing/browser_performance_testing.md b/doc/ci/testing/browser_performance_testing.md
index 600b1a2cf4b..ae31679c62b 100644
--- a/doc/ci/testing/browser_performance_testing.md
+++ b/doc/ci/testing/browser_performance_testing.md
@@ -4,15 +4,8 @@ group: Pipeline Execution
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
---
-<!--- start_remove The following content will be removed on remove_date: '2024-05-22' -->
# Browser Performance Testing **(PREMIUM)**
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/3507) in GitLab 10.3.
-
-WARNING:
-This feature was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/388719) in GitLab 15.9
-and is planned for removal in 17.0. This change is a breaking change.
-
If your application offers a web interface and you're using
[GitLab CI/CD](../index.md), you can quickly determine the rendering performance
impact of pending code changes in the browser.
@@ -79,18 +72,13 @@ using Docker-in-Docker.
URL: https://example.com
```
-WARNING:
-In GitLab 13.12 and earlier, the job [was named](https://gitlab.com/gitlab-org/gitlab/-/issues/225914) `performance`.
-
The above example:
- Creates a `browser_performance` job in your CI/CD pipeline and runs sitespeed.io against the webpage you
defined in `URL` to gather key metrics.
- Uses a template that doesn't work with Kubernetes clusters. If you are using a Kubernetes cluster,
use [`template: Jobs/Browser-Performance-Testing.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Jobs/Browser-Performance-Testing.gitlab-ci.yml)
- instead.
-- Uses a CI/CD template that is included in all GitLab installations since 12.4. If you are using
- GitLab 12.3 or earlier, you must [add the configuration manually](#gitlab-versions-132-and-earlier).
+ instead.
The template uses the [GitLab plugin for sitespeed.io](https://gitlab.com/gitlab-org/gl-performance),
and it saves the full HTML sitespeed.io report as a [Browser Performance report artifact](../yaml/artifacts_reports.md#artifactsreportsbrowser_performance)
@@ -120,8 +108,6 @@ browser_performance:
### Configuring degradation threshold
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/27599) in GitLab 13.0.
-
You can configure the sensitivity of degradation alerts to avoid getting alerts for minor drops in metrics.
This is done by setting the `DEGRADATION_THRESHOLD` CI/CD variable. In the example below, the alert only shows up
if the `Total Score` metric degrades by 5 points or more:
@@ -185,63 +171,3 @@ browser_performance:
variables:
URL: environment_url.txt
```
-
-### GitLab versions 13.2 and earlier
-
-Browser Performance Testing has gone through several changes since its introduction.
-In this section we detail these changes and how you can run the test based on your
-GitLab version:
-
-- In 13.2 the feature was renamed from `Performance` to `Browser Performance` with additional
- template CI/CD variables.
-- In GitLab 12.4 [a job template was made available](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Verify/Browser-Performance.gitlab-ci.yml).
-- For 11.5 to 12.3 no template is available and the job has to be defined manually as follows:
-
- ```yaml
- performance:
- stage: performance
- image: docker:git
- variables:
- URL: https://example.com
- SITESPEED_VERSION: 14.1.0
- SITESPEED_OPTIONS: ''
- services:
- - docker:stable-dind
- script:
- - mkdir gitlab-exporter
- - wget -O ./gitlab-exporter/index.js https://gitlab.com/gitlab-org/gl-performance/raw/1.1.0/index.js
- - mkdir sitespeed-results
- - docker run --shm-size=1g --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io:$SITESPEED_VERSION --plugins.add ./gitlab-exporter --outputFolder sitespeed-results $URL $SITESPEED_OPTIONS
- - mv sitespeed-results/data/performance.json performance.json
- artifacts:
- paths:
- - performance.json
- - sitespeed-results/
- reports:
- performance: performance.json
- ```
-
-- For 11.4 and earlier the job should be defined as follows:
-
- ```yaml
- performance:
- stage: performance
- image: docker:git
- variables:
- URL: https://example.com
- services:
- - docker:stable-dind
- script:
- - mkdir gitlab-exporter
- - wget -O ./gitlab-exporter/index.js https://gitlab.com/gitlab-org/gl-performance/raw/1.1.0/index.js
- - mkdir sitespeed-results
- - docker run --shm-size=1g --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io:6.3.1 --plugins.add ./gitlab-exporter --outputFolder sitespeed-results $URL
- - mv sitespeed-results/data/performance.json performance.json
- artifacts:
- paths:
- - performance.json
- - sitespeed-results/
- ```
-
-Upgrading to the latest version and using the templates is recommended, to ensure
-you receive the latest updates, including updates to the sitespeed.io versions.
diff --git a/doc/ci/testing/load_performance_testing.md b/doc/ci/testing/load_performance_testing.md
index 2897d7fe0ab..dac4dd555b0 100644
--- a/doc/ci/testing/load_performance_testing.md
+++ b/doc/ci/testing/load_performance_testing.md
@@ -4,15 +4,10 @@ group: Pipeline Execution
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
---
-<!--- start_remove The following content will be removed on remove_date: '2024-05-22' -->
-# Load Performance Testing (deprecated) **(PREMIUM)**
+# Load Performance Testing **(PREMIUM)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/10683) in GitLab 13.2.
-WARNING:
-This feature was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/388723) in GitLab 15.9
-and is planned for removal in 17.0. This change is a breaking change.
-
With Load Performance Testing, you can test the impact of any pending code changes
to your application's backend in [GitLab CI/CD](../index.md).
@@ -204,5 +199,3 @@ load_performance:
rules:
- if: $CI_COMMIT_BRANCH # Modify to match your pipeline rules, or use `only/except` if needed.
```
-
-<!--- end_remove -->
diff --git a/doc/integration/advanced_search/elasticsearch.md b/doc/integration/advanced_search/elasticsearch.md
index d515289dfb5..87a3e1849a1 100644
--- a/doc/integration/advanced_search/elasticsearch.md
+++ b/doc/integration/advanced_search/elasticsearch.md
@@ -79,10 +79,11 @@ To index Git repository data, GitLab uses an [indexer written in Go](https://git
Depending on your GitLab version, there are different installation procedures for the Go indexer:
-- For Omnibus GitLab 11.8 or greater, see [Omnibus GitLab](#omnibus-gitlab).
-- For installations from source or older versions of Omnibus GitLab,
+- For Omnibus GitLab 11.8 and later, see [Omnibus GitLab](#omnibus-gitlab).
+- For installations from source or Omnibus GitLab 11.7 and earlier,
[install the indexer from source](#from-source).
-- If you are using GitLab Development Kit, see [GDK Elasticsearch how-to](https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/elasticsearch.md).
+- If you're using the GitLab Development Kit, see [Elasticsearch in the GDK](https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/elasticsearch.md).
+- If you're running a Helm deployment of GitLab 11.10 and later, [the indexer is already included](https://gitlab.com/gitlab-org/build/CNG/-/merge_requests/213).
### Omnibus GitLab
diff --git a/doc/user/admin_area/moderate_users.md b/doc/user/admin_area/moderate_users.md
index f98f1a874c4..bbec556db88 100644
--- a/doc/user/admin_area/moderate_users.md
+++ b/doc/user/admin_area/moderate_users.md
@@ -202,7 +202,8 @@ A maximum of 100,000 users can be deactivated per day.
### Automatically delete unconfirmed users **(PREMIUM SELF)**
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/352514) in GitLab 16.1 [with a flag](../../administration/feature_flags.md) named `delete_unconfirmed_users_setting`. Disabled by default.
+> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/352514) in GitLab 16.1 [with a flag](../../administration/feature_flags.md) named `delete_unconfirmed_users_setting`. Disabled by default.
+> - [Enabled by default](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/124982) in GitLab 16.2.
Prerequisites:
diff --git a/doc/user/workspace/index.md b/doc/user/workspace/index.md
index ec85c755d8d..6d11b9ec209 100644
--- a/doc/user/workspace/index.md
+++ b/doc/user/workspace/index.md
@@ -19,7 +19,7 @@ A workspace is a virtual sandbox environment for your code in GitLab. You can us
Each workspace includes its own set of dependencies, libraries, and tools, which you can customize to meet the specific needs of each project. Workspaces use the AMD64 architecture.
-For a demo of this feature, see [GitLab Workspaces Demo](https://tech-marketing.gitlab.io/static-demos/workspaces/ws_public.html).
+For a demo of this feature, see [GitLab Workspaces Demo](https://go.gitlab.com/qtu66q).
## Set up a workspace
diff --git a/lib/gitlab/jwt_authenticatable.rb b/lib/gitlab/jwt_authenticatable.rb
index 7c36bbf3426..d7a341b3ba2 100644
--- a/lib/gitlab/jwt_authenticatable.rb
+++ b/lib/gitlab/jwt_authenticatable.rb
@@ -13,8 +13,8 @@ module Gitlab
module ClassMethods
include Gitlab::Utils::StrongMemoize
- def decode_jwt(encoded_message, jwt_secret = secret, issuer: nil, iat_after: nil)
- options = { algorithm: 'HS256' }
+ def decode_jwt(encoded_message, jwt_secret = secret, algorithm: 'HS256', issuer: nil, iat_after: nil)
+ options = { algorithm: algorithm }
options = options.merge(iss: issuer, verify_iss: true) if issuer.present?
options = options.merge(verify_iat: true) if iat_after.present?
diff --git a/lib/gitlab/usage/metrics/instrumentations/count_projects_with_jira_dvcs_integration_metric.rb b/lib/gitlab/usage/metrics/instrumentations/count_projects_with_jira_dvcs_integration_metric.rb
new file mode 100644
index 00000000000..25a45a259e2
--- /dev/null
+++ b/lib/gitlab/usage/metrics/instrumentations/count_projects_with_jira_dvcs_integration_metric.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module Usage
+ module Metrics
+ module Instrumentations
+ class CountProjectsWithJiraDvcsIntegrationMetric < DatabaseMetric
+ operation :count
+
+ def initialize(metric_definition)
+ super
+
+ raise ArgumentError, "option 'cloud' must be a boolean" unless [true, false].include?(options[:cloud])
+ end
+
+ relation do |options|
+ ProjectFeatureUsage.with_jira_dvcs_integration_enabled(cloud: options[:cloud])
+ end
+ end
+ end
+ end
+ end
+end
diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb
index 72168bce782..2da16cf8725 100644
--- a/lib/gitlab/usage_data.rb
+++ b/lib/gitlab/usage_data.rb
@@ -286,16 +286,9 @@ module Gitlab
response[:"instances_#{name}_active"] = count(Integration.active.where(instance: true, type: type))
response[:"projects_inheriting_#{name}_active"] = count(Integration.active.where.not(project: nil).where.not(inherit_from_id: nil).where(type: type))
response[:"groups_inheriting_#{name}_active"] = count(Integration.active.where.not(group: nil).where.not(inherit_from_id: nil).where(type: type))
- end.merge(jira_usage, jira_import_usage)
+ end.merge(jira_import_usage)
# rubocop: enable UsageData/LargeTable:
end
-
- def jira_usage
- {
- projects_jira_dvcs_cloud_active: count(ProjectFeatureUsage.with_jira_dvcs_integration_enabled),
- projects_jira_dvcs_server_active: count(ProjectFeatureUsage.with_jira_dvcs_integration_enabled(cloud: false))
- }
- end
# rubocop: enable CodeReuse/ActiveRecord
def jira_import_usage
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 06ed3e29b88..23f5ea037b4 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -8603,7 +8603,7 @@ msgstr ""
msgid "By quarter"
msgstr ""
-msgid "By using a primary email tied to an Enterprise e-mail address, it is understood that this account is an Enterprise User."
+msgid "By using a primary email tied to an Enterprise email address, you acknowledge that this account is an Enterprise User."
msgstr ""
msgid "By week"
@@ -21022,6 +21022,9 @@ msgstr ""
msgid "GlobalSearch|Merge requests that I'm a reviewer"
msgstr ""
+msgid "GlobalSearch|No labels found"
+msgstr ""
+
msgid "GlobalSearch|Project"
msgstr ""
@@ -47890,6 +47893,9 @@ msgstr ""
msgid "To ensure %{project_name} is unscheduled for deletion, check that activity has been logged by GitLab. For example:"
msgstr ""
+msgid "To ensure no loss of access to personal content, only use this account for matters related to %{group_name}."
+msgstr ""
+
msgid "To ensure no loss of personal content, this account should only be used for matters related to %{group_name}."
msgstr ""
diff --git a/qa/qa/runtime/env.rb b/qa/qa/runtime/env.rb
index 173027d784b..bd6aee9f2c2 100644
--- a/qa/qa/runtime/env.rb
+++ b/qa/qa/runtime/env.rb
@@ -253,6 +253,10 @@ module QA
enabled?(ENV['USE_SELENOID'], default: false)
end
+ def save_all_videos?
+ enabled?(ENV['QA_SAVE_ALL_VIDEOS'], default: false)
+ end
+
def require_video_variables!
docs_link = 'https://gitlab.com/gitlab-org/gitlab-qa/-/blob/master/docs/running_against_remote_grid.md#testing-with-selenoid'
use_selenoid? || (raise ArgumentError, "USE_SELENOID is required! See docs: #{docs_link}")
diff --git a/qa/qa/service/docker_run/video.rb b/qa/qa/service/docker_run/video.rb
index 61a1e08e675..c59a28c1f72 100644
--- a/qa/qa/service/docker_run/video.rb
+++ b/qa/qa/service/docker_run/video.rb
@@ -73,6 +73,10 @@ module QA
example.metadata[:file_path].include?("/browser_ui/")
end
+ def save?(example)
+ example.exception || QA::Runtime::Env.save_all_videos?
+ end
+
private
def configure_rspec
@@ -84,7 +88,7 @@ module QA
config.append_after do |example|
if QA::Service::DockerRun::Video.record?(example)
QA::Service::DockerRun::Video.stop_recording
- QA::Service::DockerRun::Video.delete_video unless example.exception
+ QA::Service::DockerRun::Video.delete_video unless QA::Service::DockerRun::Video.save?(example)
end
end
end
diff --git a/rubocop/rubocop-code_reuse.yml b/rubocop/rubocop-code_reuse.yml
index c1babff4b12..f96de5caf99 100644
--- a/rubocop/rubocop-code_reuse.yml
+++ b/rubocop/rubocop-code_reuse.yml
@@ -42,3 +42,4 @@ CodeReuse/ActiveRecord:
- ee/lib/tasks/**/*.rake
- ee/lib/ee/gitlab/background_migration/**/*.rb
- ee/lib/gitlab/llm/open_ai/response_modifiers/tanuki_bot.rb
+ - ee/lib/gitlab/usage/metrics/instrumentations/**/*.rb
diff --git a/spec/features/projects/user_sees_user_popover_spec.rb b/spec/features/projects/user_sees_user_popover_spec.rb
index 523f1366a14..be7d3daa24f 100644
--- a/spec/features/projects/user_sees_user_popover_spec.rb
+++ b/spec/features/projects/user_sees_user_popover_spec.rb
@@ -27,7 +27,7 @@ RSpec.describe 'User sees user popover', :js, feature_category: :groups_and_proj
end
it 'displays user popover' do
- find('.js-user-link').hover
+ find('.detail-page-description .js-user-link').hover
expect(page).to have_css(popover_selector, visible: true)
diff --git a/spec/frontend/search/sidebar/components/label_filter_spec.js b/spec/frontend/search/sidebar/components/label_filter_spec.js
index c5df374d4ef..2a5b3a96045 100644
--- a/spec/frontend/search/sidebar/components/label_filter_spec.js
+++ b/spec/frontend/search/sidebar/components/label_filter_spec.js
@@ -92,6 +92,7 @@ describe('GlobalSearchSidebarLabelFilter', () => {
const findCheckboxFilter = () => wrapper.findAllComponents(LabelDropdownItems);
const findAlert = () => wrapper.findComponent(GlAlert);
const findLoadingIcon = () => wrapper.findComponent(GlLoadingIcon);
+ const findNoLabelsFoundMessage = () => wrapper.findComponentByTestId('no-labels-found-message');
describe('Renders correctly closed', () => {
beforeEach(async () => {
@@ -228,6 +229,33 @@ describe('GlobalSearchSidebarLabelFilter', () => {
});
});
+ describe('Renders no-labels state correctly', () => {
+ beforeEach(async () => {
+ createComponent();
+ store.commit(REQUEST_AGGREGATIONS);
+ await Vue.nextTick();
+
+ findSearchBox().vm.$emit('focusin');
+ findSearchBox().vm.$emit('input', 'ssssssss');
+ });
+
+ it('renders checkbox filter', () => {
+ expect(findCheckboxFilter().exists()).toBe(false);
+ });
+
+ it("doesn't render alert", () => {
+ expect(findAlert().exists()).toBe(false);
+ });
+
+ it("doesn't render items", () => {
+ expect(findAllSelectedLabelsAbove().exists()).toBe(false);
+ });
+
+ it('renders no labels found text', () => {
+ expect(findNoLabelsFoundMessage().exists()).toBe(true);
+ });
+ });
+
describe('Renders error state correctly', () => {
beforeEach(async () => {
createComponent();
@@ -294,6 +322,8 @@ describe('GlobalSearchSidebarLabelFilter', () => {
describe('dropdown checkboxes work', () => {
beforeEach(async () => {
createComponent();
+ store.commit(RECEIVE_AGGREGATIONS_SUCCESS, MOCK_LABEL_AGGREGATIONS.data);
+ await Vue.nextTick();
await findSearchBox().vm.$emit('focusin');
await Vue.nextTick();
diff --git a/spec/frontend/sidebar/components/participants/participants_spec.js b/spec/frontend/sidebar/components/participants/participants_spec.js
index 72d83ebeca4..2b0eac46313 100644
--- a/spec/frontend/sidebar/components/participants/participants_spec.js
+++ b/spec/frontend/sidebar/components/participants/participants_spec.js
@@ -63,6 +63,19 @@ describe('Participants component', () => {
expect(findParticipantsAuthor()).toHaveLength(numberOfLessParticipants);
});
+ it('participants link has data attributes and class present for popover support', () => {
+ const numberOfLessParticipants = 2;
+ wrapper = mountComponent({ participants, numberOfLessParticipants });
+
+ const participantsLink = wrapper.find('.js-user-link');
+
+ expect(participantsLink.attributes()).toMatchObject({
+ href: `${participant.web_url}`,
+ 'data-user-id': `${participant.id}`,
+ 'data-username': `${participant.username}`,
+ });
+ });
+
it('when only showing all participants, each has an avatar', async () => {
wrapper = mountComponent({ participants, numberOfLessParticipants: 2 });
diff --git a/spec/lib/gitlab/jwt_authenticatable_spec.rb b/spec/lib/gitlab/jwt_authenticatable_spec.rb
index 9a06f9b91df..98c87ef627a 100644
--- a/spec/lib/gitlab/jwt_authenticatable_spec.rb
+++ b/spec/lib/gitlab/jwt_authenticatable_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Gitlab::JwtAuthenticatable do
+RSpec.describe Gitlab::JwtAuthenticatable, feature_category: :system_access do
let(:test_class) do
Class.new do
include Gitlab::JwtAuthenticatable
@@ -198,5 +198,29 @@ RSpec.describe Gitlab::JwtAuthenticatable do
end
end
end
+
+ context 'algorithm' do
+ context 'with default algorithm' do
+ it 'accepts a correct header' do
+ encoded_message = JWT.encode(payload, test_class.secret, 'HS256')
+
+ expect { test_class.decode_jwt(encoded_message) }.not_to raise_error
+ end
+ end
+
+ context 'with provided algorithm' do
+ it 'accepts a correct header' do
+ encoded_message = JWT.encode(payload, test_class.secret, 'HS256')
+
+ expect { test_class.decode_jwt(encoded_message, algorithm: 'HS256') }.not_to raise_error
+ end
+
+ it 'raises an error when the header is signed with the wrong algorithm' do
+ encoded_message = JWT.encode(payload, test_class.secret, 'HS256')
+
+ expect { test_class.decode_jwt(encoded_message, algorithm: 'RS256') }.to raise_error(JWT::DecodeError)
+ end
+ end
+ end
end
end
diff --git a/spec/lib/gitlab/usage/metrics/instrumentations/count_projects_with_jira_dvcs_integration_metric_spec.rb b/spec/lib/gitlab/usage/metrics/instrumentations/count_projects_with_jira_dvcs_integration_metric_spec.rb
new file mode 100644
index 00000000000..a2d86fc5044
--- /dev/null
+++ b/spec/lib/gitlab/usage/metrics/instrumentations/count_projects_with_jira_dvcs_integration_metric_spec.rb
@@ -0,0 +1,50 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe Gitlab::Usage::Metrics::Instrumentations::CountProjectsWithJiraDvcsIntegrationMetric,
+ feature_category: :integrations do
+ describe 'metric value and query' do
+ let_it_be_with_reload(:project_1) { create(:project) }
+ let_it_be_with_reload(:project_2) { create(:project) }
+ let_it_be_with_reload(:project_3) { create(:project) }
+
+ before do
+ project_1.feature_usage.log_jira_dvcs_integration_usage(cloud: false)
+ project_2.feature_usage.log_jira_dvcs_integration_usage(cloud: false)
+ project_3.feature_usage.log_jira_dvcs_integration_usage(cloud: true)
+ end
+
+ context 'when counting cloud integrations' do
+ let(:expected_value) { 1 }
+ let(:expected_query) do
+ 'SELECT COUNT("project_feature_usages"."project_id") FROM "project_feature_usages" ' \
+ 'WHERE "project_feature_usages"."jira_dvcs_cloud_last_sync_at" IS NOT NULL'
+ end
+
+ it_behaves_like 'a correct instrumented metric value and query', { time_frame: 'all', options: { cloud: true } }
+ end
+
+ context 'when counting non-cloud integrations' do
+ let(:expected_value) { 2 }
+ let(:expected_query) do
+ 'SELECT COUNT("project_feature_usages"."project_id") FROM "project_feature_usages" ' \
+ 'WHERE "project_feature_usages"."jira_dvcs_server_last_sync_at" IS NOT NULL'
+ end
+
+ it_behaves_like 'a correct instrumented metric value and query', { time_frame: 'all', options: { cloud: false } }
+ end
+ end
+
+ it "raises an exception if option is not present" do
+ expect do
+ described_class.new(options: {}, time_frame: 'all')
+ end.to raise_error(ArgumentError, %r{must be a boolean})
+ end
+
+ it "raises an exception if option has invalid value" do
+ expect do
+ described_class.new(options: { cloud: 'yes' }, time_frame: 'all')
+ end.to raise_error(ArgumentError, %r{must be a boolean})
+ end
+end
diff --git a/spec/support/helpers/usage_data_helpers.rb b/spec/support/helpers/usage_data_helpers.rb
index 73f7a79dd5b..8ac3b0c134b 100644
--- a/spec/support/helpers/usage_data_helpers.rb
+++ b/spec/support/helpers/usage_data_helpers.rb
@@ -50,8 +50,6 @@ module UsageDataHelpers
projects_asana_active
projects_jenkins_active
projects_jira_active
- projects_jira_dvcs_cloud_active
- projects_jira_dvcs_server_active
projects_slack_active
projects_slack_slash_commands_active
projects_custom_issue_tracker_active
diff --git a/spec/support/stub_dot_com_check.rb b/spec/support/stub_dot_com_check.rb
index 6934b33d111..53fa4e4e92e 100644
--- a/spec/support/stub_dot_com_check.rb
+++ b/spec/support/stub_dot_com_check.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
RSpec.configure do |config|
- %i[saas saas_registration].each do |metadata|
+ %i[saas saas_registration saas_trial].each do |metadata|
config.before(:context, metadata) do
# Ensure Gitlab.com? returns true during context.
# This is needed for let_it_be which is shared across examples,