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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-15 03:10:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-15 03:10:03 +0300
commit0c6c91556b89efac59a1034f7f91fd37a7f8ea91 (patch)
treec008951816d6ce04d2d4d336b37449b4ded78169
parentdc60045db7aab599453799c75190b93692d91b7c (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--app/assets/javascripts/lib/utils/datetime/timeago_utility.js7
-rw-r--r--app/assets/javascripts/main.js3
-rw-r--r--app/models/packages/event.rb6
-rw-r--r--config/feature_flags/experiment/redirect_trial_user_to_feature.yml8
-rw-r--r--config/metrics/counts_all/20210709191135_package_events_i_package_nuget_pull_symbol_package.yml22
-rw-r--r--config/metrics/counts_all/20210709191829_package_events_i_package_nuget_push_symbol_package.yml22
-rw-r--r--config/metrics/counts_all/20210709210941_package_events_i_package_pull_symbol_package.yml22
-rw-r--r--config/metrics/counts_all/20210709211058_package_events_i_package_pull_symbol_package_by_deploy_token.yml22
-rw-r--r--config/metrics/counts_all/20210709211248_package_events_i_package_pull_symbol_package_by_guest.yml22
-rw-r--r--config/metrics/counts_all/20210709211341_package_events_i_package_pull_symbol_package_by_user.yml22
-rw-r--r--config/metrics/counts_all/20210709211439_package_events_i_package_push_symbol_package.yml22
-rw-r--r--config/metrics/counts_all/20210709211636_package_events_i_package_push_symbol_package_by_deploy_token.yml22
-rw-r--r--config/metrics/counts_all/20210709211731_package_events_i_package_push_symbol_package_by_guest.yml22
-rw-r--r--config/metrics/counts_all/20210709211831_package_events_i_package_push_symbol_package_by_user.yml22
-rw-r--r--doc/administration/gitaly/praefect.md5
-rw-r--r--doc/development/fe_guide/graphql.md29
-rw-r--r--doc/development/usage_ping/dictionary.md140
-rw-r--r--doc/integration/jira/index.md5
-rw-r--r--lib/api/nuget_project_packages.rb27
-rw-r--r--lib/gitlab/usage_data_counters/counter_events/package_events.yml10
-rw-r--r--spec/frontend/environment.js3
-rw-r--r--spec/lib/gitlab/usage_data_counters/package_event_counter_spec.rb2
-rw-r--r--spec/support/shared_examples/requests/api/nuget_packages_shared_examples.rb6
-rw-r--r--spec/support/shared_examples/requests/api/packages_shared_examples.rb2
24 files changed, 447 insertions, 26 deletions
diff --git a/app/assets/javascripts/lib/utils/datetime/timeago_utility.js b/app/assets/javascripts/lib/utils/datetime/timeago_utility.js
index 5c6c5ccd5c1..d68682ebed1 100644
--- a/app/assets/javascripts/lib/utils/datetime/timeago_utility.js
+++ b/app/assets/javascripts/lib/utils/datetime/timeago_utility.js
@@ -133,10 +133,3 @@ export const timeFor = (time, expiredLabel) => {
}
return timeago.format(time, `${timeagoLanguageCode}-remaining`).trim();
};
-
-window.timeago = getTimeago();
-window.gl = window.gl || {};
-window.gl.utils = {
- ...(window.gl.utils || {}),
- localTimeAgo,
-};
diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js
index 88ddd12594e..5c14000a2aa 100644
--- a/app/assets/javascripts/main.js
+++ b/app/assets/javascripts/main.js
@@ -46,6 +46,9 @@ applyGitLabUIConfig();
window.jQuery = jQuery;
window.$ = jQuery;
+// ensure that window.gl is set up
+window.gl = window.gl || {};
+
// inject test utilities if necessary
if (process.env.NODE_ENV !== 'production' && gon?.test_env) {
import(/* webpackMode: "eager" */ './test_utils/');
diff --git a/app/models/packages/event.rb b/app/models/packages/event.rb
index 98c9d5246db..a1eb7120117 100644
--- a/app/models/packages/event.rb
+++ b/app/models/packages/event.rb
@@ -3,7 +3,7 @@
class Packages::Event < ApplicationRecord
belongs_to :package, optional: true
- UNIQUE_EVENTS_ALLOWED = %i[push_package delete_package pull_package].freeze
+ UNIQUE_EVENTS_ALLOWED = %i[push_package delete_package pull_package pull_symbol_package push_symbol_package].freeze
EVENT_SCOPES = ::Packages::Package.package_types.merge(container: 1000, tag: 1001).freeze
EVENT_PREFIX = "i_package"
@@ -21,7 +21,9 @@ class Packages::Event < ApplicationRecord
delete_tag: 7,
delete_tag_bulk: 8,
list_tags: 9,
- cli_metadata: 10
+ cli_metadata: 10,
+ pull_symbol_package: 11,
+ push_symbol_package: 12
}
enum originator_type: { user: 0, deploy_token: 1, guest: 2 }
diff --git a/config/feature_flags/experiment/redirect_trial_user_to_feature.yml b/config/feature_flags/experiment/redirect_trial_user_to_feature.yml
new file mode 100644
index 00000000000..c653b886a04
--- /dev/null
+++ b/config/feature_flags/experiment/redirect_trial_user_to_feature.yml
@@ -0,0 +1,8 @@
+---
+name: redirect_trial_user_to_feature
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/65450
+rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/335824
+milestone: '14.1'
+type: experiment
+group: group::conversion
+default_enabled: false
diff --git a/config/metrics/counts_all/20210709191135_package_events_i_package_nuget_pull_symbol_package.yml b/config/metrics/counts_all/20210709191135_package_events_i_package_nuget_pull_symbol_package.yml
new file mode 100644
index 00000000000..b2d39e70fe7
--- /dev/null
+++ b/config/metrics/counts_all/20210709191135_package_events_i_package_nuget_pull_symbol_package.yml
@@ -0,0 +1,22 @@
+---
+key_path: counts.package_events_i_package_nuget_pull_symbol_package
+name: nuget_symbol_packages_pulled
+description: A count of NuGet symbol packages that have been downloaded from the package registry
+product_section: ops
+product_stage: package
+product_group: group::package
+product_category: package registry
+value_type: number
+status: implemented
+milestone: "14.1"
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64554
+time_frame: all
+data_source: redis
+data_category: Optional
+distribution:
+- ce
+- ee
+tier:
+- free
+- premium
+- ultimate
diff --git a/config/metrics/counts_all/20210709191829_package_events_i_package_nuget_push_symbol_package.yml b/config/metrics/counts_all/20210709191829_package_events_i_package_nuget_push_symbol_package.yml
new file mode 100644
index 00000000000..a3c68b2d115
--- /dev/null
+++ b/config/metrics/counts_all/20210709191829_package_events_i_package_nuget_push_symbol_package.yml
@@ -0,0 +1,22 @@
+---
+key_path: counts.package_events_i_package_nuget_push_symbol_package
+name: nuget_symbol_packages_pushed
+description: A count of NuGet symbol packages that have been uploaded to the package registry
+product_section: ops
+product_stage: package
+product_group: group::package
+product_category: package registry
+value_type: number
+status: implemented
+milestone: "14.1"
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64554
+time_frame: all
+data_source: redis
+data_category: Optional
+distribution:
+- ce
+- ee
+tier:
+- free
+- premium
+- ultimate
diff --git a/config/metrics/counts_all/20210709210941_package_events_i_package_pull_symbol_package.yml b/config/metrics/counts_all/20210709210941_package_events_i_package_pull_symbol_package.yml
new file mode 100644
index 00000000000..9a0abf74ba2
--- /dev/null
+++ b/config/metrics/counts_all/20210709210941_package_events_i_package_pull_symbol_package.yml
@@ -0,0 +1,22 @@
+---
+key_path: counts.package_events_i_package_pull_symbol_package
+name: symbol_packages_pulled
+description: A count of symbol packages that have been pulled from the package registry
+product_section: ops
+product_stage: package
+product_group: group::package
+product_category: package registry
+value_type: number
+status: implemented
+milestone: "14.1"
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64554
+time_frame: all
+data_source: redis
+data_category: Optional
+distribution:
+- ce
+- ee
+tier:
+- free
+- premium
+- ultimate \ No newline at end of file
diff --git a/config/metrics/counts_all/20210709211058_package_events_i_package_pull_symbol_package_by_deploy_token.yml b/config/metrics/counts_all/20210709211058_package_events_i_package_pull_symbol_package_by_deploy_token.yml
new file mode 100644
index 00000000000..83117bd3047
--- /dev/null
+++ b/config/metrics/counts_all/20210709211058_package_events_i_package_pull_symbol_package_by_deploy_token.yml
@@ -0,0 +1,22 @@
+---
+key_path: counts.package_events_i_package_pull_symbol_package_by_deploy_token
+name: symbol_packages_pulled_by_deploy_token
+description: A count of symbol packages that have been pulled with a deploy token from the package registry
+product_section: ops
+product_stage: package
+product_group: group::package
+product_category: package registry
+value_type: number
+status: implemented
+milestone: "14.1"
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64554
+time_frame: all
+data_source: redis
+data_category: Optional
+distribution:
+- ce
+- ee
+tier:
+- free
+- premium
+- ultimate
diff --git a/config/metrics/counts_all/20210709211248_package_events_i_package_pull_symbol_package_by_guest.yml b/config/metrics/counts_all/20210709211248_package_events_i_package_pull_symbol_package_by_guest.yml
new file mode 100644
index 00000000000..69b48c6f469
--- /dev/null
+++ b/config/metrics/counts_all/20210709211248_package_events_i_package_pull_symbol_package_by_guest.yml
@@ -0,0 +1,22 @@
+---
+key_path: counts.package_events_i_package_pull_symbol_package_by_guest
+name: symbol_packages_pulled_by_guest
+description: A count of symbol packages that have been pulled with by a guest from the package registry
+product_section: ops
+product_stage: package
+product_group: group::package
+product_category: package registry
+value_type: number
+status: implemented
+milestone: "14.1"
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64554
+time_frame: all
+data_source: redis
+data_category: Optional
+distribution:
+- ce
+- ee
+tier:
+- free
+- premium
+- ultimate \ No newline at end of file
diff --git a/config/metrics/counts_all/20210709211341_package_events_i_package_pull_symbol_package_by_user.yml b/config/metrics/counts_all/20210709211341_package_events_i_package_pull_symbol_package_by_user.yml
new file mode 100644
index 00000000000..08cae05ba79
--- /dev/null
+++ b/config/metrics/counts_all/20210709211341_package_events_i_package_pull_symbol_package_by_user.yml
@@ -0,0 +1,22 @@
+---
+key_path: counts.package_events_i_package_pull_symbol_package_by_user
+name: symbol_packages_pulled_by_user
+description: A count of symbol packages that have been pulled with by an authenticated user from the package registry
+product_section: ops
+product_stage: package
+product_group: group::package
+product_category: package registry
+value_type: number
+status: implemented
+milestone: "14.1"
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64554
+time_frame: all
+data_source: redis
+data_category: Optional
+distribution:
+- ce
+- ee
+tier:
+- free
+- premium
+- ultimate
diff --git a/config/metrics/counts_all/20210709211439_package_events_i_package_push_symbol_package.yml b/config/metrics/counts_all/20210709211439_package_events_i_package_push_symbol_package.yml
new file mode 100644
index 00000000000..191beea4742
--- /dev/null
+++ b/config/metrics/counts_all/20210709211439_package_events_i_package_push_symbol_package.yml
@@ -0,0 +1,22 @@
+---
+key_path: counts.package_events_i_package_push_symbol_package
+name: symbol_packages_pushed
+description: A count of symbol packages that have been pushed to the package registry
+product_section: ops
+product_stage: package
+product_group: group::package
+product_category: package registry
+value_type: number
+status: implemented
+milestone: "14.1"
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64554
+time_frame: all
+data_source: redis
+data_category: Optional
+distribution:
+- ce
+- ee
+tier:
+- free
+- premium
+- ultimate
diff --git a/config/metrics/counts_all/20210709211636_package_events_i_package_push_symbol_package_by_deploy_token.yml b/config/metrics/counts_all/20210709211636_package_events_i_package_push_symbol_package_by_deploy_token.yml
new file mode 100644
index 00000000000..86b1ad50ace
--- /dev/null
+++ b/config/metrics/counts_all/20210709211636_package_events_i_package_push_symbol_package_by_deploy_token.yml
@@ -0,0 +1,22 @@
+---
+key_path: counts.package_events_i_package_push_symbol_package_by_deploy_token
+name: symbol_packages_pushed_by_deploy_token
+description: A count of symbol packages that have been pushed with a deploy token to the package registry
+product_section: ops
+product_stage: package
+product_group: group::package
+product_category: package registry
+value_type: number
+status: implemented
+milestone: "14.1"
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64554
+time_frame: all
+data_source: redis
+data_category: Optional
+distribution:
+- ce
+- ee
+tier:
+- free
+- premium
+- ultimate
diff --git a/config/metrics/counts_all/20210709211731_package_events_i_package_push_symbol_package_by_guest.yml b/config/metrics/counts_all/20210709211731_package_events_i_package_push_symbol_package_by_guest.yml
new file mode 100644
index 00000000000..268376a3912
--- /dev/null
+++ b/config/metrics/counts_all/20210709211731_package_events_i_package_push_symbol_package_by_guest.yml
@@ -0,0 +1,22 @@
+---
+key_path: counts.package_events_i_package_push_symbol_package_by_guest
+name: symbol_packages_pushed_by_guest
+description: A count of symbol packages that have been pushed by a guest to the package registry
+product_section: ops
+product_stage: package
+product_group: group::package
+product_category: package registry
+value_type: number
+status: implemented
+milestone: "14.1"
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64554
+time_frame: all
+data_source: redis
+data_category: Optional
+distribution:
+- ce
+- ee
+tier:
+- free
+- premium
+- ultimate
diff --git a/config/metrics/counts_all/20210709211831_package_events_i_package_push_symbol_package_by_user.yml b/config/metrics/counts_all/20210709211831_package_events_i_package_push_symbol_package_by_user.yml
new file mode 100644
index 00000000000..75e6d8cfa55
--- /dev/null
+++ b/config/metrics/counts_all/20210709211831_package_events_i_package_push_symbol_package_by_user.yml
@@ -0,0 +1,22 @@
+---
+key_path: counts.package_events_i_package_push_symbol_package_by_user
+name: symbol_packages_pushed_by_user
+description: A count of symbol packages that have been pushed by an authenticated user to the package registry
+product_section: ops
+product_stage: package
+product_group: group::package
+product_category: package registry
+value_type: number
+status: implemented
+milestone: "14.1"
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64554
+time_frame: all
+data_source: redis
+data_category: Optional
+distribution:
+- ce
+- ee
+tier:
+- free
+- premium
+- ultimate
diff --git a/doc/administration/gitaly/praefect.md b/doc/administration/gitaly/praefect.md
index b0ff67c0fdd..e483bcc944a 100644
--- a/doc/administration/gitaly/praefect.md
+++ b/doc/administration/gitaly/praefect.md
@@ -1626,10 +1626,7 @@ praefect['reconciliation_scheduling_interval'] = '0' # disable the feature
### Manual reconciliation
WARNING:
-The `reconcile` sub-command is deprecated and scheduled for removal in GitLab 14.0. Use
-[automatic reconciliation](#automatic-reconciliation) instead. Manual reconciliation may
-produce excess replication jobs and is limited in functionality. Manual reconciliation does
-not work when [repository-specific primary nodes](#repository-specific-primary-nodes) are
+The `reconcile` sub-command was removed in GitLab 14.1. Use [automatic reconciliation](#automatic-reconciliation) instead. Manual reconciliation may produce excess replication jobs and is limited in functionality. Manual reconciliation does not work when [repository-specific primary nodes](#repository-specific-primary-nodes) are
enabled.
The Praefect `reconcile` sub-command allows for the manual reconciliation between two Gitaly nodes. The
diff --git a/doc/development/fe_guide/graphql.md b/doc/development/fe_guide/graphql.md
index 844ef2156d9..7fa9e957f56 100644
--- a/doc/development/fe_guide/graphql.md
+++ b/doc/development/fe_guide/graphql.md
@@ -906,6 +906,35 @@ apollo: {
},
```
+### Best Practices
+
+#### When to use (and not use) `update` hook in mutations
+
+Apollo Client's [`.mutate()`](https://www.apollographql.com/docs/react/api/core/ApolloClient/#ApolloClient.mutate)
+method exposes an `update` hook that is invoked twice during the mutation lifecycle:
+
+- Once at the beginning. That is, before the mutation has completed.
+- Once after the mutation has completed.
+
+You should use this hook only if you're adding or removing an item from the store
+(that is, ApolloCache). If you're _updating_ an existing item, it is usually represented by
+a global `id`.
+
+In that case, presence of this `id` in your mutation query definition makes the store update
+automatically. Here's an example of a typical mutation query with `id` present in it:
+
+```graphql
+mutation issueSetWeight($input: IssueSetWeightInput!) {
+ issuableSetWeight: issueSetWeight(input: $input) {
+ issuable: issue {
+ id
+ weight
+ }
+ errors
+ }
+}
+```
+
### Testing
#### Generating the GraphQL schema
diff --git a/doc/development/usage_ping/dictionary.md b/doc/development/usage_ping/dictionary.md
index 0784a792d34..79d4c09be83 100644
--- a/doc/development/usage_ping/dictionary.md
+++ b/doc/development/usage_ping/dictionary.md
@@ -4472,6 +4472,20 @@ Status: `data_available`
Tiers: `free`, `premium`, `ultimate`
+### `counts.package_events_i_package_nuget_pull_symbol_package`
+
+A count of NuGet symbol packages that have been downloaded from the package registry
+
+[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210709191135_package_events_i_package_nuget_pull_symbol_package.yml)
+
+Group: `group::package`
+
+Data Category: `Optional`
+
+Status: `implemented`
+
+Tiers: `free`, `premium`, `ultimate`
+
### `counts.package_events_i_package_nuget_push_package`
A count of NuGet packages that have been published
@@ -4486,6 +4500,20 @@ Status: `data_available`
Tiers: `free`, `premium`, `ultimate`
+### `counts.package_events_i_package_nuget_push_symbol_package`
+
+A count of NuGet symbol packages that have been uploaded to the package registry
+
+[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210709191829_package_events_i_package_nuget_push_symbol_package.yml)
+
+Group: `group::package`
+
+Data Category: `Optional`
+
+Status: `implemented`
+
+Tiers: `free`, `premium`, `ultimate`
+
### `counts.package_events_i_package_pull_package`
A count of packages that have been downloaded from the package registry
@@ -4542,6 +4570,62 @@ Status: `data_available`
Tiers: `free`, `premium`, `ultimate`
+### `counts.package_events_i_package_pull_symbol_package`
+
+A count of symbol packages that have been pulled from the package registry
+
+[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210709210941_package_events_i_package_pull_symbol_package.yml)
+
+Group: `group::package`
+
+Data Category: `Optional`
+
+Status: `implemented`
+
+Tiers: `free`, `premium`, `ultimate`
+
+### `counts.package_events_i_package_pull_symbol_package_by_deploy_token`
+
+A count of symbol packages that have been pulled with a deploy token from the package registry
+
+[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210709211058_package_events_i_package_pull_symbol_package_by_deploy_token.yml)
+
+Group: `group::package`
+
+Data Category: `Optional`
+
+Status: `implemented`
+
+Tiers: `free`, `premium`, `ultimate`
+
+### `counts.package_events_i_package_pull_symbol_package_by_guest`
+
+A count of symbol packages that have been pulled with by a guest from the package registry
+
+[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210709211248_package_events_i_package_pull_symbol_package_by_guest.yml)
+
+Group: `group::package`
+
+Data Category: `Optional`
+
+Status: `implemented`
+
+Tiers: `free`, `premium`, `ultimate`
+
+### `counts.package_events_i_package_pull_symbol_package_by_user`
+
+A count of symbol packages that have been pulled with by an authenticated user from the package registry
+
+[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210709211341_package_events_i_package_pull_symbol_package_by_user.yml)
+
+Group: `group::package`
+
+Data Category: `Optional`
+
+Status: `implemented`
+
+Tiers: `free`, `premium`, `ultimate`
+
### `counts.package_events_i_package_push_package`
A count of packages that have been published to the package registry
@@ -4598,6 +4682,62 @@ Status: `data_available`
Tiers: `free`, `premium`, `ultimate`
+### `counts.package_events_i_package_push_symbol_package`
+
+A count of symbol packages that have been pushed to the package registry
+
+[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210709211439_package_events_i_package_push_symbol_package.yml)
+
+Group: `group::package`
+
+Data Category: `Optional`
+
+Status: `implemented`
+
+Tiers: `free`, `premium`, `ultimate`
+
+### `counts.package_events_i_package_push_symbol_package_by_deploy_token`
+
+A count of symbol packages that have been pushed with a deploy token to the package registry
+
+[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210709211636_package_events_i_package_push_symbol_package_by_deploy_token.yml)
+
+Group: `group::package`
+
+Data Category: `Optional`
+
+Status: `implemented`
+
+Tiers: `free`, `premium`, `ultimate`
+
+### `counts.package_events_i_package_push_symbol_package_by_guest`
+
+A count of symbol packages that have been pushed by a guest to the package registry
+
+[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210709211731_package_events_i_package_push_symbol_package_by_guest.yml)
+
+Group: `group::package`
+
+Data Category: `Optional`
+
+Status: `implemented`
+
+Tiers: `free`, `premium`, `ultimate`
+
+### `counts.package_events_i_package_push_symbol_package_by_user`
+
+A count of symbol packages that have been pushed by an authenticated user to the package registry
+
+[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210709211831_package_events_i_package_push_symbol_package_by_user.yml)
+
+Group: `group::package`
+
+Data Category: `Optional`
+
+Status: `implemented`
+
+Tiers: `free`, `premium`, `ultimate`
+
### `counts.package_events_i_package_pypi_delete_package`
A count of Python packages that have been deleted from the package registry
diff --git a/doc/integration/jira/index.md b/doc/integration/jira/index.md
index 4219cb915cc..0733a08b9d9 100644
--- a/doc/integration/jira/index.md
+++ b/doc/integration/jira/index.md
@@ -99,3 +99,8 @@ which may lead to a `401 unauthorized` error when testing your Jira integration.
If CAPTCHA has been triggered, you can't use Jira's REST API to
authenticate with the Jira site. You need to log in to your Jira instance
and complete the CAPTCHA.
+
+## Third-party Jira integrations
+
+Developers have built several third-party Jira integrations for GitLab that are
+listed on the [Atlassian Marketplace](https://marketplace.atlassian.com/search?product=jira&query=gitlab).
diff --git a/lib/api/nuget_project_packages.rb b/lib/api/nuget_project_packages.rb
index 1ad7208d6ae..03d1492908d 100644
--- a/lib/api/nuget_project_packages.rb
+++ b/lib/api/nuget_project_packages.rb
@@ -134,7 +134,16 @@ module API
use :file_params
end
put 'symbolpackage' do
- upload_nuget_package_file(symbol_package: true)
+ upload_nuget_package_file(symbol_package: true) do |package|
+ track_package_event(
+ 'push_symbol_package',
+ :nuget,
+ category: 'API::NugetPackages',
+ user: current_user,
+ project: package.project,
+ namespace: package.project.namespace
+ )
+ end
rescue ObjectStorage::RemoteStoreError => e
Gitlab::ErrorTracking.track_exception(e, extra: { file_name: params[:file_name], project_id: project_or_group.id })
@@ -175,15 +184,13 @@ module API
not_found!('Package') unless package_file
- if params[:format] == 'nupkg'
- track_package_event(
- 'pull_package',
- :nuget,
- category: 'API::NugetPackages',
- project: package_file.project,
- namespace: package_file.project.namespace
- )
- end
+ track_package_event(
+ params[:format] == 'snupkg' ? 'pull_symbol_package' : 'pull_package',
+ :nuget,
+ category: 'API::NugetPackages',
+ project: package_file.project,
+ namespace: package_file.project.namespace
+ )
# nuget and dotnet don't support 302 Moved status codes, supports_direct_download has to be set to false
present_carrierwave_file!(package_file.file, supports_direct_download: false)
diff --git a/lib/gitlab/usage_data_counters/counter_events/package_events.yml b/lib/gitlab/usage_data_counters/counter_events/package_events.yml
index e9086469c3c..21d637e7152 100644
--- a/lib/gitlab/usage_data_counters/counter_events/package_events.yml
+++ b/lib/gitlab/usage_data_counters/counter_events/package_events.yml
@@ -32,14 +32,24 @@
- i_package_nuget_delete_package
- i_package_nuget_pull_package
- i_package_nuget_push_package
+- i_package_nuget_pull_symbol_package
+- i_package_nuget_push_symbol_package
- i_package_pull_package
- i_package_pull_package_by_deploy_token
- i_package_pull_package_by_guest
- i_package_pull_package_by_user
+- i_package_pull_symbol_package
+- i_package_pull_symbol_package_by_deploy_token
+- i_package_pull_symbol_package_by_guest
+- i_package_pull_symbol_package_by_user
- i_package_push_package
- i_package_push_package_by_deploy_token
- i_package_push_package_by_guest
- i_package_push_package_by_user
+- i_package_push_symbol_package
+- i_package_push_symbol_package_by_deploy_token
+- i_package_push_symbol_package_by_guest
+- i_package_push_symbol_package_by_user
- i_package_pypi_delete_package
- i_package_pypi_pull_package
- i_package_pypi_push_package
diff --git a/spec/frontend/environment.js b/spec/frontend/environment.js
index 9cebe2d1e01..29aa416149c 100644
--- a/spec/frontend/environment.js
+++ b/spec/frontend/environment.js
@@ -43,6 +43,9 @@ class CustomEnvironment extends JSDOMEnvironment {
};
this.global.IS_EE = IS_EE;
+ // Set up global `gl` object
+ this.global.gl = {};
+
this.rejectedPromises = [];
this.global.promiseRejectionHandler = (error) => {
diff --git a/spec/lib/gitlab/usage_data_counters/package_event_counter_spec.rb b/spec/lib/gitlab/usage_data_counters/package_event_counter_spec.rb
index 6f92d71255c..6f201b43390 100644
--- a/spec/lib/gitlab/usage_data_counters/package_event_counter_spec.rb
+++ b/spec/lib/gitlab/usage_data_counters/package_event_counter_spec.rb
@@ -14,7 +14,7 @@ RSpec.describe Gitlab::UsageDataCounters::PackageEventCounter, :clean_gitlab_red
end
it 'includes the right events' do
- expect(described_class::KNOWN_EVENTS.size).to eq 53
+ expect(described_class::KNOWN_EVENTS.size).to eq 63
end
described_class::KNOWN_EVENTS.each do |event|
diff --git a/spec/support/shared_examples/requests/api/nuget_packages_shared_examples.rb b/spec/support/shared_examples/requests/api/nuget_packages_shared_examples.rb
index cdbb8f8c6e8..878cbc10a24 100644
--- a/spec/support/shared_examples/requests/api/nuget_packages_shared_examples.rb
+++ b/spec/support/shared_examples/requests/api/nuget_packages_shared_examples.rb
@@ -170,7 +170,9 @@ RSpec.shared_examples 'process nuget upload' do |user_type, status, add_member =
it_behaves_like 'package workhorse uploads'
it_behaves_like 'creates nuget package files'
- unless symbol_package
+ if symbol_package
+ it_behaves_like 'a package tracking event', 'API::NugetPackages', 'push_symbol_package'
+ else
it_behaves_like 'a package tracking event', 'API::NugetPackages', 'push_package'
end
end
@@ -311,6 +313,8 @@ RSpec.shared_examples 'process nuget download content request' do |user_type, st
expect(response.media_type).to eq('application/octet-stream')
end
+
+ it_behaves_like 'a package tracking event', 'API::NugetPackages', 'pull_symbol_package'
end
context 'with lower case package name' do
diff --git a/spec/support/shared_examples/requests/api/packages_shared_examples.rb b/spec/support/shared_examples/requests/api/packages_shared_examples.rb
index f405708eea7..ecde4ee8565 100644
--- a/spec/support/shared_examples/requests/api/packages_shared_examples.rb
+++ b/spec/support/shared_examples/requests/api/packages_shared_examples.rb
@@ -147,7 +147,7 @@ RSpec.shared_examples 'a package tracking event' do |category, action|
stub_feature_flags(collect_package_events: true)
end
- it "creates a gitlab tracking event #{action}", :snowplow do
+ it "creates a gitlab tracking event #{action}", :snowplow, :aggregate_failures do
expect { subject }.to change { Packages::Event.count }.by(1)
expect_snowplow_event(category: category, action: action, **snowplow_gitlab_standard_context)