Commit 839dad17 authored by 🤖 GitLab Bot 🤖's avatar 🤖 GitLab Bot 🤖
Browse files

Add latest changes from gitlab-org/gitlab@master

parent ae42530b
......@@ -4,6 +4,7 @@ import { GlLoadingIcon, GlAlert } from '@gitlab/ui';
import { ApolloMutation } from 'vue-apollo';
import createFlash from '~/flash';
import { fetchPolicies } from '~/lib/graphql';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import allVersionsMixin from '../../mixins/all_versions';
import Toolbar from '../../components/toolbar/index.vue';
import DesignDestroyer from '../../components/design_destroyer.vue';
......@@ -37,7 +38,7 @@ import {
TOGGLE_TODO_ERROR,
designDeletionError,
} from '../../utils/error_messages';
import { trackDesignDetailView } from '../../utils/tracking';
import { trackDesignDetailView, usagePingDesignDetailView } from '../../utils/tracking';
import { DESIGNS_ROUTE_NAME } from '../../router/constants';
import { ACTIVE_DISCUSSION_SOURCE_TYPES, DESIGN_DETAIL_LAYOUT_CLASSLIST } from '../../constants';
......@@ -55,7 +56,7 @@ export default {
GlAlert,
DesignSidebar,
},
mixins: [allVersionsMixin],
mixins: [allVersionsMixin, glFeatureFlagsMixin()],
props: {
id: {
type: String,
......@@ -150,7 +151,7 @@ export default {
},
mounted() {
Mousetrap.bind('esc', this.closeDesign);
this.trackEvent();
this.trackPageViewEvent();
// Set active discussion immediately.
// This will ensure that, if a note is specified in the URL hash,
......@@ -274,7 +275,7 @@ export default {
query: this.$route.query,
});
},
trackEvent() {
trackPageViewEvent() {
// TODO: This needs to be made aware of referers, or if it's rendered in a different context than a Issue
trackDesignDetailView(
'issue-design-collection',
......@@ -282,6 +283,10 @@ export default {
this.$route.query.version || this.latestVersionId,
this.isLatestVersion,
);
if (this.glFeatures.usageDataDesignAction) {
usagePingDesignDetailView();
}
},
updateActiveDiscussion(id, source = ACTIVE_DISCUSSION_SOURCE_TYPES.discussion) {
this.$apollo.mutate({
......
import Tracking from '~/tracking';
import api from '~/api';
// Tracking Constants
// Snowplow tracking constants
const DESIGN_TRACKING_CONTEXT_SCHEMAS = {
VIEW_DESIGN_SCHEMA: 'iglu:com.gitlab/design_management_context/jsonschema/1-0-0',
};
......@@ -10,8 +11,14 @@ const DESIGN_TRACKING_EVENTS = {
UPDATE_DESIGN: 'update_design',
};
// Usage ping tracking constants
const DESIGN_ACTION = 'design_action';
export const DESIGN_TRACKING_PAGE_NAME = 'projects:issues:design';
/**
* Track "design detail" view in Snowplow
*/
export function trackDesignDetailView(
referer = '',
owner = '',
......@@ -19,6 +26,7 @@ export function trackDesignDetailView(
latestVersion = false,
) {
const eventName = DESIGN_TRACKING_EVENTS.VIEW_DESIGN;
Tracking.event(DESIGN_TRACKING_PAGE_NAME, eventName, {
label: eventName,
context: {
......@@ -40,3 +48,10 @@ export function trackDesignCreate() {
export function trackDesignUpdate() {
return Tracking.event(DESIGN_TRACKING_PAGE_NAME, DESIGN_TRACKING_EVENTS.UPDATE_DESIGN);
}
/**
* Track "design detail" view via usage ping
*/
export function usagePingDesignDetailView() {
api.trackRedisHllUserEvent(DESIGN_ACTION);
}
......@@ -44,6 +44,7 @@ class Projects::IssuesController < Projects::ApplicationController
push_frontend_feature_flag(:vue_issuable_sidebar, project.group)
push_frontend_feature_flag(:tribute_autocomplete, @project)
push_frontend_feature_flag(:vue_issuables_list, project)
push_frontend_feature_flag(:usage_data_design_action, project, default_enabled: true)
end
before_action only: :show do
......
---
title: Add primary key to merge_request_context_commit_diff_files
merge_request: 49024
author:
type: changed
---
title: Capture design detail views via usage ping
merge_request: 46751
author:
type: added
---
title: Add link in Access Request API
merge_request: 48081
author: jimcser
type: fixed
---
name: usage_data_design_action
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46626
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/287630
milestone: '13.7'
type: development
group: group::knowledge
default_enabled: true
......@@ -128,6 +128,7 @@ def parse!
if section['enabled'] && target_config['bucket'].blank?
missing_bucket_for(store_type)
next
end
# If a storage type such as Pages defines its own connection and does not
......
# frozen_string_literal: true
class AddPrimaryKeyToMergeRequestContextCommitDiffFiles < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
execute(<<~SQL)
DELETE FROM merge_request_context_commit_diff_files
WHERE merge_request_context_commit_id IS NULL;
DELETE FROM merge_request_context_commit_diff_files df1
USING merge_request_context_commit_diff_files df2
WHERE df1.ctid < df2.ctid
AND df1.merge_request_context_commit_id = df2.merge_request_context_commit_id
AND df1.relative_order = df2.relative_order;
ALTER TABLE merge_request_context_commit_diff_files
ADD CONSTRAINT merge_request_context_commit_diff_files_pkey PRIMARY KEY (merge_request_context_commit_id, relative_order);
SQL
end
def down
execute(<<~SQL)
ALTER TABLE merge_request_context_commit_diff_files
DROP CONSTRAINT merge_request_context_commit_diff_files_pkey,
ALTER COLUMN merge_request_context_commit_id DROP NOT NULL
SQL
end
end
# frozen_string_literal: true
class RemoveRedundantIndexOnMergeRequestContextCommitDiffFiles < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
remove_concurrent_index_by_name :merge_request_context_commit_diff_files, 'idx_mr_cc_diff_files_on_mr_cc_id'
end
def down
# no-op: this index is not tracked in structure.sql, and is redundant due to idx_mr_cc_diff_files_on_mr_cc_id_and_sha
end
end
926f54b5756fa9495e71f2340823418b5679195d5720212dddda0d0c6396629e
\ No newline at end of file
696c1d9f8cc90337549530e129e6abf4429d218f151cefaacacacb6e3f33d1c7
\ No newline at end of file
......@@ -13695,7 +13695,7 @@ CREATE TABLE merge_request_context_commit_diff_files (
old_path text NOT NULL,
diff text,
"binary" boolean,
merge_request_context_commit_id bigint
merge_request_context_commit_id bigint NOT NULL
);
CREATE TABLE merge_request_context_commits (
......@@ -19550,6 +19550,9 @@ ALTER TABLE ONLY merge_request_blocks
ALTER TABLE ONLY merge_request_cleanup_schedules
ADD CONSTRAINT merge_request_cleanup_schedules_pkey PRIMARY KEY (merge_request_id);
ALTER TABLE ONLY merge_request_context_commit_diff_files
ADD CONSTRAINT merge_request_context_commit_diff_files_pkey PRIMARY KEY (merge_request_context_commit_id, relative_order);
ALTER TABLE ONLY merge_request_context_commits
ADD CONSTRAINT merge_request_context_commits_pkey PRIMARY KEY (id);
......
......@@ -5,7 +5,7 @@
#
# For a list of all options, see https://errata-ai.gitbook.io/vale/getting-started/styles
extends: substitution
message: "NOTE: and TIP: alert boxes must be of the format 'NOTE: **Note:**' or 'TIP: **Tip:**"
message: "NOTE: and TIP: alert boxes must be of the format 'NOTE:' or 'TIP: **Tip:**"
link: https://docs.gitlab.com/ee/development/documentation/styleguide.html#alert-boxes
level: warning
nonword: true
......
This diff is collapsed.
......@@ -44,7 +44,7 @@ Impersonation is where an administrator uses credentials to perform an action as
### Group events **(STARTER)**
NOTE: **Note:**
NOTE:
You need Owner [permissions](../user/permissions.md) to view the group Audit Events page.
To view a group's audit events, navigate to **Group > Settings > Audit Events**.
......@@ -74,7 +74,7 @@ Group events can also be accessed via the [Group Audit Events API](../api/audit_
### Project events **(STARTER)**
NOTE: **Note:**
NOTE:
You need Maintainer [permissions](../user/permissions.md) or higher to view the project Audit Events page.
To view a project's audit events, navigate to **Project > Settings > Audit Events**.
......
......@@ -36,5 +36,5 @@ providers:
- [Smartcard](smartcard.md) **(PREMIUM ONLY)**
- [Twitter](../../integration/twitter.md)
NOTE: **Note:**
NOTE:
UltraAuth has removed their software which supports OmniAuth integration. We have therefore removed all references to UltraAuth integration.
......@@ -62,7 +62,7 @@ JWT will provide you with a secret key for you to use.
}
```
NOTE: **Note:**
NOTE:
For more information on each configuration option refer to
the [OmniAuth JWT usage documentation](https://github.com/mbleigh/omniauth-jwt#usage).
......
......@@ -91,7 +91,7 @@ There is a Rake task to check LDAP configuration. After configuring LDAP
using the documentation below, see [LDAP check Rake task](../../raketasks/check.md#ldap-check)
for information on the LDAP check Rake task.
NOTE: **Note:**
NOTE:
The `encryption` value `simple_tls` corresponds to 'Simple TLS' in the LDAP
library. `start_tls` corresponds to StartTLS, not to be confused with regular TLS.
Normally, if you specify `simple_tls` it is on port 636, while `start_tls` (StartTLS)
......@@ -553,7 +553,7 @@ administrators. Specify a group CN for `admin_group` and all members of the
LDAP group will be given administrator privileges. The configuration looks
like the following.
NOTE: **Note:**
NOTE:
Administrators are not synced unless `group_base` is also
specified alongside `admin_group`. Also, only specify the CN of the admin
group, as opposed to the full DN.
......@@ -615,7 +615,7 @@ By default, GitLab runs a group sync process every hour, on the hour.
The values shown are in cron format. If needed, you can use a
[Crontab Generator](http://www.crontabgenerator.com).
CAUTION: **Important:**
WARNING:
Do not start the sync process too frequently as this
could lead to multiple syncs running concurrently. This is primarily a concern
for installations with a large number of LDAP users. Please review the
......
......@@ -378,7 +378,7 @@ GitLab syncs the `admin_group`.
#### Sync all groups **(STARTER ONLY)**
NOTE: **Note:**
NOTE:
To sync all groups manually when debugging is unnecessary, [use the Rake
task](../../raketasks/ldap.md#run-a-group-sync) instead.
......@@ -429,7 +429,7 @@ and more DNs may be added, or existing entries modified, based on additional
LDAP group lookups. The very last occurrence of this entry should indicate
exactly which users GitLab believes should be added to the group.
NOTE: **Note:**
NOTE:
10 is 'Guest', 20 is 'Reporter', 30 is 'Developer', 40 is 'Maintainer'
and 50 is 'Owner'.
......@@ -673,7 +673,7 @@ adfind -h ad.example.org:636 -ssl -u "CN=GitLabSRV,CN=Users,DC=GitLab,DC=org" -u
### Rails console
CAUTION: **Caution:**
WARNING:
It is very easy to create, read, modify, and destroy data with the rails
console. Be sure to run commands exactly as listed.
......
......@@ -81,7 +81,7 @@ The OpenID Connect will provide you with a client details and secret for you to
}
```
NOTE: **Note:**
NOTE:
For more information on each configuration option refer to the [OmniAuth OpenID Connect usage documentation](https://github.com/m0n9oose/omniauth_openid_connect#usage)
and the [OpenID Connect Core 1.0 specification](https://openid.net/specs/openid-connect-core-1_0.html).
......
......@@ -158,7 +158,7 @@ You might want to try this out on an incognito browser window.
## Configuring groups
NOTE: **Note:**
NOTE:
Make sure the groups exist and are assigned to the Okta app.
You can take a look of the [SAML documentation](../../integration/saml.md#saml-groups) on configuring groups.
......
......@@ -30,7 +30,7 @@ GitLab supports two authentication methods:
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/726) in [GitLab Premium](https://about.gitlab.com/pricing/) 11.6 as an experimental feature.
CAUTION: **Caution:**
WARNING:
Smartcard authentication against local databases may change or be removed completely in future
releases.
......@@ -60,7 +60,7 @@ Certificate:
Smartcards with X.509 certificates using SAN extensions can be used to authenticate
with GitLab.
NOTE: **Note:**
NOTE:
This is an experimental feature. Smartcard authentication against local databases may
change or be removed completely in future releases.
......@@ -211,7 +211,7 @@ attribute. As a prerequisite, you must use an LDAP server that:
client_certificate_required_port: 3443
```
NOTE: **Note:**
NOTE:
Assign a value to at least one of the following variables:
`client_certificate_required_host` or `client_certificate_required_port`.
......
......@@ -173,7 +173,7 @@ queried over UDP. To overcome this issue, you can use TCP for querying by settin
### Forking
NOTE: **Note:**
NOTE:
Starting with GitLab 13.0, Puma is the default web server used in GitLab
all-in-one package based installations as well as GitLab Helm chart deployments.
......
......@@ -9,7 +9,7 @@ type: reference, howto
You can use an external service for validating a pipeline before it's created.
CAUTION: **Warning:**
WARNING:
This is an experimental feature and subject to change without notice.
## Usage
......
......@@ -36,7 +36,7 @@ error, it's very important that you [**provide feedback**](https://gitlab.com/gi
as possible so we can improve or fix it while behind a flag. When you upgrade
GitLab to an earlier version, the feature flag status may change.
CAUTION: **Caution:**
WARNING:
Features deployed behind feature flags may not be ready for
production use. However, disabling features behind flags that were deployed
enabled by default may also present a risk. If they're enabled, we recommend
......
......@@ -13,12 +13,12 @@ type: reference
With custom file hooks, GitLab administrators can introduce custom integrations
without modifying GitLab's source code.
NOTE: **Note:**
NOTE:
Instead of writing and supporting your own file hook you can make changes
directly to the GitLab source code and contribute back upstream. This way we can
ensure functionality is preserved across versions and covered by tests.
NOTE: **Note:**
NOTE:
File hooks must be configured on the filesystem of the GitLab server. Only GitLab
server administrators will be able to complete these tasks. Explore
[system hooks](../system_hooks/system_hooks.md) or [webhooks](../user/project/integrations/webhooks.md) as an option if you do not have filesystem access.
......
......@@ -7,7 +7,7 @@ type: howto
# Automatic background verification **(PREMIUM ONLY)**
NOTE: **Note:**
NOTE:
Automatic background verification of repositories and wikis was added in
GitLab EE 10.6 but is enabled by default only on GitLab EE 11.1. You can
disable or enable this feature manually by following
......
......@@ -13,7 +13,7 @@ restore your original configuration. This process consists of two steps:
1. Making the old **primary** node a **secondary** node.
1. Promoting a **secondary** node to a **primary** node.
CAUTION: **Caution:**
WARNING:
If you have any doubts about the consistency of the data on this node, we recommend setting it up from scratch.
## Configure the former **primary** node to be a **secondary** node
......@@ -32,14 +32,14 @@ To bring the former **primary** node up to date:
sudo gitlab-ctl start
```
NOTE: **Note:**
NOTE:
If you [disabled the **primary** node permanently](index.md#step-2-permanently-disable-the-primary-node),
you need to undo those steps now. For Debian/Ubuntu you just need to run
`sudo systemctl enable gitlab-runsvdir`. For CentOS 6, you need to install
the GitLab instance from scratch and set it up as a **secondary** node by
following [Setup instructions](../setup/index.md). In this case, you don't need to follow the next step.
NOTE: **Note:**
NOTE:
If you [changed the DNS records](index.md#step-4-optional-updating-the-primary-domain-dns-record)
for this node during disaster recovery procedure you may need to [block
all the writes to this node](planned_failover.md#prevent-updates-to-the-primary-node)
......
......@@ -13,7 +13,7 @@ failover with minimal effort, in a disaster situation.
See [Geo limitations](../index.md#limitations) for more information.
CAUTION: **Warning:**
WARNING:
Disaster recovery for multi-secondary configurations is in **Alpha**.
For the latest updates, check the [Disaster Recovery epic for complete maturity](https://gitlab.com/groups/gitlab-org/-/epics/590).
Multi-secondary configurations require the complete re-synchronization and re-configuration of all non-promoted secondaries and
......@@ -36,7 +36,7 @@ order to avoid unnecessary data loss.
### Step 2. Permanently disable the **primary** node
CAUTION: **Warning:**
WARNING:
If the **primary** node goes offline, there may be data saved on the **primary** node
that has not been replicated to the **secondary** node. This data should be treated
as lost if you proceed.
......@@ -58,7 +58,7 @@ must disable the **primary** node.
sudo systemctl disable gitlab-runsvdir
```
NOTE: **Note:**
NOTE:
(**CentOS only**) In CentOS 6 or older, there is no easy way to prevent GitLab from being
started if the machine reboots isn't available (see [Omnibus GitLab issue #3058](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/3058)).
It may be safest to uninstall the GitLab package completely:
......@@ -67,7 +67,7 @@ must disable the **primary** node.
yum remove gitlab-ee
```
NOTE: **Note:**
NOTE:
(**Ubuntu 14.04 LTS**) If you are using an older version of Ubuntu
or any other distribution based on the Upstart init system, you can prevent GitLab
from starting if the machine reboots by doing the following:
......@@ -140,7 +140,7 @@ Note the following when promoting a secondary:
secondary. If the node is paused, be sure to resume before promoting. This
issue has been fixed in GitLab 13.4 and later.
CAUTION: **Caution:**
WARNING:
If the secondary node [has been paused](../../geo/index.md#pausing-and-resuming-replication), this performs
a point-in-time recovery to the last known state.
Data that was created on the primary while the secondary was paused will be lost.
......@@ -180,7 +180,7 @@ secondary is paused fails. Do not pause replication before promoting a
secondary. If the node is paused, be sure to resume before promoting. This
issue has been fixed in GitLab 13.4 and later.
CAUTION: **Caution:**
WARNING:
If the secondary node [has been paused](../../geo/index.md#pausing-and-resuming-replication), this performs
a point-in-time recovery to the last known state.
Data that was created on the primary while the secondary was paused will be lost.
......@@ -301,7 +301,7 @@ secondary domain, like changing Git remotes and API URLs.
external_url 'https://<new_external_url>'
```
NOTE: **Note:**
NOTE:
Changing `external_url` won't prevent access via the old secondary URL, as
long as the secondary DNS records are still intact.
......
......@@ -5,7 +5,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
type: howto
---
CAUTION: **Caution:**
WARNING:
This runbook is in **alpha**. For complete, production-ready documentation, see the
[disaster recovery documentation](../index.md).
......@@ -58,7 +58,7 @@ What is not covered:
### Preparation
NOTE: **Note:**
NOTE:
Before following any of those steps, make sure you have `root` access to the
**secondary** to promote it, since there isn't provided an automated way to
promote a Geo replica and perform a failover.
......@@ -134,7 +134,7 @@ follow these steps to avoid unnecessary data loss:
1. Finish replicating and verifying all data:
CAUTION: **Caution:**
WARNING:
Not all data is automatically replicated. Read more about
[what is excluded](../planned_failover.md#not-all-data-is-automatically-replicated).
......@@ -163,7 +163,7 @@ follow these steps to avoid unnecessary data loss:
1. In this final step, you need to permanently disable the **primary** node.
CAUTION: **Caution:**
WARNING:
When the **primary** node goes offline, there may be data saved on the **primary** node
that has not been replicated to the **secondary** node. This data should be treated
as lost if you proceed.
......@@ -188,12 +188,12 @@ follow these steps to avoid unnecessary data loss:
sudo systemctl disable gitlab-runsvdir
```
NOTE: **Note:**
NOTE:
(**CentOS only**) In CentOS 6 or older, there is no easy way to prevent GitLab from being
started if the machine reboots isn't available (see [Omnibus GitLab issue #3058](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/3058)).
It may be safest to uninstall the GitLab package completely with `sudo yum remove gitlab-ee`.
NOTE: **Note:**
NOTE:
(**Ubuntu 14.04 LTS**) If you are using an older version of Ubuntu
or any other distribution based on the Upstart init system, you can prevent GitLab
from starting if the machine reboots as `root` with
......@@ -213,12 +213,12 @@ follow these steps to avoid unnecessary data loss:
### Promoting the **secondary** node
NOTE: **Note:**
NOTE:
A new **secondary** should not be added at this time. If you want to add a new
**secondary**, do this after you have completed the entire process of promoting
the **secondary** to the **primary**.
CAUTION: **Caution:**
WARNING:
If you encounter an `ActiveRecord::RecordInvalid: Validation failed: Name has already been taken` error during this process, read
[the troubleshooting advice](../../replication/troubleshooting.md#fixing-errors-during-a-failover-or-when-promoting-a-secondary-to-a-primary-node).
......@@ -233,7 +233,7 @@ secondary is paused fails. Do not pause replication before promoting a
secondary. If the node is paused, be sure to resume before promoting. This