Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2022-04-25 09:08:29 +00:00
parent a8d2e14a13
commit c595e9b539
37 changed files with 334 additions and 185 deletions

View File

@ -6,11 +6,22 @@ exclude:
- qa/qa/specs/features/**/* - qa/qa/specs/features/**/*
- vendor/**/* - vendor/**/*
- ".bundle/**/*" - ".bundle/**/*"
require: [] require:
- actioncable
- actionmailer
- actionpack
- actionview
- activejob
- activemodel
- activerecord
- activestorage
- activesupport
domains: [] domains: []
reporters: reporters:
- rubocop - rubocop # diagnostics
- require_not_found - require_not_found
formatter:
rubocop: # formatting
require_paths: [] require_paths: []
plugins: [] plugins: []
max_files: 15000 max_files: 15000

View File

@ -101,7 +101,7 @@ export default {
<template> <template>
<bubble-menu <bubble-menu
data-testid="code-block-bubble-menu" data-testid="code-block-bubble-menu"
class="gl-shadow gl-rounded-base" class="gl-shadow gl-rounded-base gl-bg-white"
:editor="tiptapEditor" :editor="tiptapEditor"
plugin-key="bubbleMenuCodeBlock" plugin-key="bubbleMenuCodeBlock"
:should-show="shouldShow" :should-show="shouldShow"
@ -109,7 +109,12 @@ export default {
> >
<editor-state-observer @transaction="updateSelectedLanguage"> <editor-state-observer @transaction="updateSelectedLanguage">
<gl-button-group> <gl-button-group>
<gl-dropdown contenteditable="false" boundary="viewport" :text="selectedLanguage.label"> <gl-dropdown
category="tertiary"
contenteditable="false"
boundary="viewport"
:text="selectedLanguage.label"
>
<template #header> <template #header>
<gl-search-box-by-type <gl-search-box-by-type
v-model="filterTerm" v-model="filterTerm"
@ -136,7 +141,7 @@ export default {
<gl-button <gl-button
v-gl-tooltip v-gl-tooltip
variant="default" variant="default"
category="primary" category="tertiary"
size="medium" size="medium"
data-testid="copy-code-block" data-testid="copy-code-block"
:aria-label="__('Copy code')" :aria-label="__('Copy code')"
@ -147,7 +152,7 @@ export default {
<gl-button <gl-button
v-gl-tooltip v-gl-tooltip
variant="default" variant="default"
category="primary" category="tertiary"
size="medium" size="medium"
data-testid="delete-code-block" data-testid="delete-code-block"
:aria-label="__('Delete code block')" :aria-label="__('Delete code block')"

View File

@ -34,7 +34,7 @@ export default {
<template> <template>
<bubble-menu <bubble-menu
data-testid="formatting-bubble-menu" data-testid="formatting-bubble-menu"
class="gl-shadow gl-rounded-base" class="gl-shadow gl-rounded-base gl-bg-white"
:editor="tiptapEditor" :editor="tiptapEditor"
:should-show="shouldShow" :should-show="shouldShow"
> >
@ -44,7 +44,7 @@ export default {
content-type="bold" content-type="bold"
icon-name="bold" icon-name="bold"
editor-command="toggleBold" editor-command="toggleBold"
category="primary" category="tertiary"
size="medium" size="medium"
:label="__('Bold text')" :label="__('Bold text')"
@execute="trackToolbarControlExecution" @execute="trackToolbarControlExecution"
@ -54,7 +54,7 @@ export default {
content-type="italic" content-type="italic"
icon-name="italic" icon-name="italic"
editor-command="toggleItalic" editor-command="toggleItalic"
category="primary" category="tertiary"
size="medium" size="medium"
:label="__('Italic text')" :label="__('Italic text')"
@execute="trackToolbarControlExecution" @execute="trackToolbarControlExecution"
@ -64,7 +64,7 @@ export default {
content-type="strike" content-type="strike"
icon-name="strikethrough" icon-name="strikethrough"
editor-command="toggleStrike" editor-command="toggleStrike"
category="primary" category="tertiary"
size="medium" size="medium"
:label="__('Strikethrough')" :label="__('Strikethrough')"
@execute="trackToolbarControlExecution" @execute="trackToolbarControlExecution"
@ -74,7 +74,7 @@ export default {
content-type="code" content-type="code"
icon-name="code" icon-name="code"
editor-command="toggleCode" editor-command="toggleCode"
category="primary" category="tertiary"
size="medium" size="medium"
:label="__('Code')" :label="__('Code')"
@execute="trackToolbarControlExecution" @execute="trackToolbarControlExecution"

View File

@ -90,10 +90,13 @@ MergeRequest.prototype.initMRBtnListeners = function () {
MergeRequest.toggleDraftStatus(data.title, wipEvent === 'unwip'); MergeRequest.toggleDraftStatus(data.title, wipEvent === 'unwip');
}) })
.catch(() => { .catch(() => {
draftToggle.removeAttribute('disabled');
createFlash({ createFlash({
message: __('Something went wrong. Please try again.'), message: __('Something went wrong. Please try again.'),
}); });
})
.finally(() => {
draftToggle.removeAttribute('disabled');
loader.remove();
}); });
}); });
}); });
@ -162,7 +165,9 @@ MergeRequest.toggleDraftStatus = function (title, isReady) {
); );
draftToggle.setAttribute('href', url); draftToggle.setAttribute('href', url);
draftToggle.textContent = isReady ? __('Mark as draft') : __('Mark as ready'); draftToggle.querySelector('.gl-new-dropdown-item-text-wrapper').textContent = isReady
? __('Mark as draft')
: __('Mark as ready');
}); });
} }
}; };

View File

@ -101,14 +101,15 @@ export default {
<template> <template>
<!-- must be `d-inline-block` or parent flex-basis causes width issues --> <!-- must be `d-inline-block` or parent flex-basis causes width issues -->
<gl-link <gl-link
v-gl-tooltip="tooltipOption"
:href="assigneeUrl" :href="assigneeUrl"
:title="tooltipTitle" :title="tooltipTitle"
class="gl-display-inline-block" :data-user-id="user.id"
data-placement="left"
class="gl-display-inline-block js-user-link"
> >
<!-- use d-flex so that slot can be appropriately styled --> <!-- use d-flex so that slot can be appropriately styled -->
<span class="gl-display-flex"> <span class="gl-display-flex">
<assignee-avatar :user="user" :img-size="32" :issuable-type="issuableType" /> <assignee-avatar :user="user" :img-size="24" :issuable-type="issuableType" />
<slot></slot> <slot></slot>
</span> </span>
</gl-link> </gl-link>

View File

@ -124,11 +124,10 @@ export default {
> >
<div <div
v-if="showVerticalList" v-if="showVerticalList"
class="gl-ml-3 gl-line-height-normal gl-display-grid" class="gl-ml-3 gl-line-height-normal gl-display-grid gl-align-items-center"
data-testid="username" data-testid="username"
> >
<user-name-with-status :name="user.name" :availability="userAvailability(user)" /> <user-name-with-status :name="user.name" :availability="userAvailability(user)" />
<span>@{{ user.username }}</span>
</div> </div>
</assignee-avatar-link> </assignee-avatar-link>
<attention-requested-toggle <attention-requested-toggle

View File

@ -47,8 +47,6 @@ export default {
return sprintf(__('%{userName} (cannot merge)'), { userName: this.user.name }); return sprintf(__('%{userName} (cannot merge)'), { userName: this.user.name });
} else if (this.cannotMerge) { } else if (this.cannotMerge) {
return __('Cannot merge'); return __('Cannot merge');
} else if (this.tooltipHasName) {
return this.user.name;
} }
return ''; return '';
@ -70,14 +68,15 @@ export default {
<template> <template>
<!-- must be `d-inline-block` or parent flex-basis causes width issues --> <!-- must be `d-inline-block` or parent flex-basis causes width issues -->
<gl-link <gl-link
v-gl-tooltip="tooltipOption"
:href="reviewerUrl" :href="reviewerUrl"
:title="tooltipTitle" :title="tooltipTitle"
class="gl-display-inline-block" :data-user-id="user.id"
data-placement="left"
class="gl-display-inline-block js-user-link"
> >
<!-- use d-flex so that slot can be appropriately styled --> <!-- use d-flex so that slot can be appropriately styled -->
<span class="gl-display-flex"> <span class="gl-display-flex">
<reviewer-avatar :user="user" :img-size="32" :issuable-type="issuableType" /> <reviewer-avatar :user="user" :img-size="24" :issuable-type="issuableType" />
<slot :user="user"></slot> <slot :user="user"></slot>
</span> </span>
</gl-link> </gl-link>

View File

@ -108,9 +108,8 @@ export default {
class="gl-word-break-word gl-mr-2" class="gl-word-break-word gl-mr-2"
data-css-area="user" data-css-area="user"
> >
<div class="gl-ml-3 gl-line-height-normal gl-display-grid"> <div class="gl-ml-3 gl-line-height-normal gl-display-grid gl-align-items-center">
<span>{{ user.name }}</span> {{ user.name }}
<span>@{{ user.username }}</span>
</div> </div>
</reviewer-avatar-link> </reviewer-avatar-link>
<attention-requested-toggle <attention-requested-toggle

View File

@ -103,6 +103,7 @@ export default function addPopovers(elements = document.querySelectorAll('.js-us
propsData: { propsData: {
target: el, target: el,
user, user,
placement: el.dataset.placement || 'top',
}, },
}); });

View File

@ -38,6 +38,11 @@ export default {
required: true, required: true,
default: null, default: null,
}, },
placement: {
type: String,
required: false,
default: 'top',
},
}, },
computed: { computed: {
statusHtml() { statusHtml() {
@ -66,7 +71,7 @@ export default {
<template> <template>
<!-- 200ms delay so not every mouseover triggers Popover --> <!-- 200ms delay so not every mouseover triggers Popover -->
<gl-popover :target="target" :delay="200" boundary="viewport" placement="top"> <gl-popover :target="target" :delay="200" :placement="placement" boundary="viewport">
<div class="gl-p-3 gl-line-height-normal gl-display-flex" data-testid="user-popover"> <div class="gl-p-3 gl-line-height-normal gl-display-flex" data-testid="user-popover">
<div class="gl-p-2 flex-shrink-1"> <div class="gl-p-2 flex-shrink-1">
<user-avatar-image :img-src="user.avatarUrl" :size="64" css-classes="gl-mr-3!" /> <user-avatar-image :img-src="user.avatarUrl" :size="64" css-classes="gl-mr-3!" />

View File

@ -10,9 +10,6 @@ table {
* color palette in https://gitlab.com/gitlab-org/gitlab/-/issues/213570 * color palette in https://gitlab.com/gitlab-org/gitlab/-/issues/213570
* *
* The overwrites here affected the following areas: * The overwrites here affected the following areas:
* - The security dashboard tables. When removing
* this code, table-th-transparent and original-text-color classes should
* be removed there.
* - The subscription seats table. When removing this code, the .seats-table * - The subscription seats table. When removing this code, the .seats-table
* <th> and margin overrides should be removed there. * <th> and margin overrides should be removed there.
* *
@ -24,7 +21,7 @@ table {
} }
.md &:not(.code), .md &:not(.code),
&.table { &.table:not(.gl-table) {
margin-bottom: $gl-padding; margin-bottom: $gl-padding;
.dropdown-menu a { .dropdown-menu a {
@ -58,16 +55,6 @@ table {
&.wide { &.wide {
width: 55%; width: 55%;
} }
&.table-th-transparent {
background: none;
color: $gl-text-color-secondary;
}
&.original-gl-th {
@include gl-text-gray-500;
border-bottom: 1px solid $cycle-analytics-light-gray;
}
} }
} }

View File

@ -658,7 +658,6 @@ $calendar-user-contrib-text: #959494;
$cycle-analytics-box-padding: 30px; $cycle-analytics-box-padding: 30px;
$cycle-analytics-box-text-color: #8c8c8c; $cycle-analytics-box-text-color: #8c8c8c;
$cycle-analytics-big-font: 19px; $cycle-analytics-big-font: 19px;
$cycle-analytics-light-gray: #bfbfbf;
$cycle-analytics-dismiss-icon-color: #b2b2b2; $cycle-analytics-dismiss-icon-color: #b2b2b2;
/* /*

View File

@ -372,6 +372,10 @@ class Namespace < ApplicationRecord
false false
end end
def all_project_ids_except(ids)
all_projects.where.not(id: ids).pluck(:id)
end
# Deprecated, use #licensed_feature_available? instead. Remove once Namespace#feature_available? isn't used anymore. # Deprecated, use #licensed_feature_available? instead. Remove once Namespace#feature_available? isn't used anymore.
def feature_available?(feature, _user = nil) def feature_available?(feature, _user = nil)
licensed_feature_available?(feature) licensed_feature_available?(feature)

View File

@ -16,10 +16,10 @@
%table.table.b-table.gl-table.b-table-stacked-md{ role: 'table' } %table.table.b-table.gl-table.b-table-stacked-md{ role: 'table' }
%thead{ role: 'rowgroup' } %thead{ role: 'rowgroup' }
%tr{ role: 'row' } %tr{ role: 'row' }
%th.table-th-transparent.border-bottom{ role: 'cell' }= _('Migration') %th.border-bottom{ role: 'cell' }= _('Migration')
%th.table-th-transparent.border-bottom{ role: 'cell' }= _('Progress') %th.border-bottom{ role: 'cell' }= _('Progress')
%th.table-th-transparent.border-bottom{ role: 'cell' }= _('Status') %th.border-bottom{ role: 'cell' }= _('Status')
%th.table-th-transparent.border-bottom{ role: 'cell' } %th.border-bottom{ role: 'cell' }
%tbody{ role: 'rowgroup' } %tbody{ role: 'rowgroup' }
= render partial: 'migration', collection: @migrations = render partial: 'migration', collection: @migrations

View File

@ -1,36 +1,40 @@
- display_issuable_type = issuable_display_type(@merge_request) - display_issuable_type = issuable_display_type(@merge_request)
- button_class = "btn gl-button #{!@merge_request.closed? && 'js-draft-toggle-button'}"
- toggle_class = "btn gl-button dropdown-toggle"
.float-left.btn-group.gl-ml-3.gl-display-none.gl-md-display-flex .float-left.btn-group.gl-md-ml-3.gl-display-flex.dropdown.gl-new-dropdown.gl-md-w-auto.gl-w-full
= link_to @merge_request.closed? ? reopen_issuable_path(@merge_request) : toggle_draft_merge_request_path(@merge_request), method: :put, class: "#{button_class} btn-confirm-secondary" do = button_tag type: 'button', class: "btn dropdown-toggle btn-default btn-md gl-button gl-dropdown-toggle btn-default-tertiary dropdown-icon-only dropdown-toggle-no-caret gl-display-none! gl-md-display-inline-flex!", data: { 'toggle' => 'dropdown' } do
- if @merge_request.closed? %span.gl-sr-only= _('Toggle dropdown')
= _('Reopen') = sprite_icon "ellipsis_v", size: 16, css_class: "dropdown-icon gl-icon"
= display_issuable_type = button_tag type: 'button', class: "btn dropdown-toggle btn-default btn-md btn-block gl-button gl-dropdown-toggle gl-md-display-none!", data: { 'toggle' => 'dropdown' } do
- else %span.gl-new-dropdown-button-text= _('Merge request actions')
= @merge_request.work_in_progress? ? _('Mark as ready') : _('Mark as draft') = sprite_icon "chevron-down", size: 16, css_class: "dropdown-icon gl-icon"
.dropdown-menu.dropdown-menu-right
.gl-new-dropdown-inner
.gl-new-dropdown-contents
%ul
- if can?(current_user, :update_merge_request, @merge_request)
%li.gl-new-dropdown-item{ class: "gl-md-display-none!" }
= link_to edit_project_merge_request_path(@project, @merge_request), class: 'dropdown-item' do
.gl-new-dropdown-item-text-wrapper
= _('Edit')
- if @merge_request.open?
%li.gl-new-dropdown-item
= link_to toggle_draft_merge_request_path(@merge_request), method: :put, class: 'dropdown-item js-draft-toggle-button' do
.gl-new-dropdown-item-text-wrapper
= @merge_request.work_in_progress? ? _('Mark as ready') : _('Mark as draft')
%li.gl-new-dropdown-item.js-close-item
= link_to close_issuable_path(@merge_request), method: :put, class: 'dropdown-item' do
.gl-new-dropdown-item-text-wrapper
= _('Close')
= display_issuable_type
- elsif !@merge_request.source_project_missing?
%li.gl-new-dropdown-item
= link_to reopen_issuable_path(@merge_request), method: :put, class: 'dropdown-item' do
.gl-new-dropdown-item-text-wrapper
= _('Reopen')
= display_issuable_type
- if !@merge_request.closed? || !issuable_author_is_current_user(@merge_request) - unless issuable_author_is_current_user(@merge_request)
= button_tag type: 'button', class: "#{toggle_class} btn-confirm-secondary btn-icon", data: { 'toggle' => 'dropdown' } do %li.gl-new-dropdown-item
%span.gl-sr-only= _('Toggle dropdown') = link_to new_abuse_report_path(user_id: @merge_request.author.id, ref_url: merge_request_url(@merge_request)), class: 'dropdown-item' do
= sprite_icon "chevron-down", size: 12, css_class: "gl-button-icon" .gl-new-dropdown-item-text-wrapper
= _('Report abuse')
%ul.dropdown-menu.dropdown-menu-right
- if @merge_request.open?
%li
= link_to close_issuable_path(@merge_request), method: :put do
.description
%strong.title
= _('Close')
= display_issuable_type
- unless issuable_author_is_current_user(@merge_request)
- unless @merge_request.closed?
%li.divider.droplab-item-ignore
%li
%a{ href: new_abuse_report_path(user_id: @merge_request.author.id, ref_url: merge_request_url(@merge_request)) }
.description
%strong.title= _('Report abuse')
%p.text.gl-mb-0
= _('Report %{display_issuable_type} that are abusive, inappropriate or spam.') % { display_issuable_type: display_issuable_type.pluralize }

View File

@ -24,29 +24,8 @@
= sprite_icon('chevron-double-lg-left') = sprite_icon('chevron-double-lg-left')
.detail-page-header-actions.js-issuable-actions .detail-page-header-actions.js-issuable-actions
.clearfix.dropdown - if can_update_merge_request
%button.gl-button.btn.btn-default.float-left.gl-md-display-none.gl-w-full{ type: "button", data: { toggle: "dropdown" } } = link_to _('Edit'), edit_project_merge_request_path(@project, @merge_request), class: "gl-display-none gl-md-display-block btn gl-button btn-default btn-grouped js-issuable-edit", data: { qa_selector: "edit_button" }
Options
= sprite_icon('chevron-down', css_class: 'gl-text-gray-500')
.dropdown-menu.dropdown-menu-right
%ul
- if can_update_merge_request
%li= link_to _('Edit'), edit_namespace_project_merge_request_path(@project.namespace, @project, @merge_request)
- if @merge_request.opened?
%li
= link_to @merge_request.work_in_progress? ? _('Mark as ready') : _('Mark as draft'), toggle_draft_merge_request_path(@merge_request), method: :put, class: "js-draft-toggle-button"
%li{ class: [merge_request_button_visibility(@merge_request, true), 'js-close-item'] }
= link_to _('Close'), merge_request_path(@merge_request, merge_request: { state_event: :close }), method: :put, title: 'Close merge request'
- if can_reopen_merge_request
%li{ class: merge_request_button_visibility(@merge_request, false) }
= link_to _('Reopen'), merge_request_path(@merge_request, merge_request: { state_event: :reopen }), method: :put, title: 'Reopen merge request'
- unless @merge_request.merged? || current_user == @merge_request.author
%li= link_to _('Report abuse'), new_abuse_report_path(user_id: @merge_request.author.id, ref_url: merge_request_url(@merge_request))
- if can_update_merge_request - if current_user
= link_to _('Edit'), edit_project_merge_request_path(@project, @merge_request), class: "gl-display-none gl-md-display-block btn gl-button btn-default btn-grouped js-issuable-edit", data: { qa_selector: "edit_button" } = render 'projects/merge_requests/close_reopen_draft_report_toggle'
- if can_update_merge_request && !are_close_and_open_buttons_hidden
= render 'projects/merge_requests/close_reopen_draft_report_toggle'
- elsif !@merge_request.merged?
= link_to _('Report abuse'), new_abuse_report_path(user_id: @merge_request.author.id, ref_url: merge_request_url(@merge_request)), class: 'gl-display-none gl-md-display-block gl-button btn btn-default gl-float-right gl-ml-3', title: _('Report abuse')

View File

@ -33,12 +33,13 @@
- if @pipeline.failed_builds.present? - if @pipeline.failed_builds.present?
#js-tab-failures.build-failures.tab-pane.build-page #js-tab-failures.build-failures.tab-pane.build-page
%table.table.responsive-table.ci-table.responsive-table-sm-rounded %table.table.gl-table.responsive-table.ci-table.responsive-table-sm-rounded
%thead %thead
%th.table-th-transparent %th
%th.table-th-transparent= _('Name') %th= _('Name')
%th.table-th-transparent= _('Stage') %th= _('Stage')
%th.table-th-transparent= _('Failure') %th= _('Failure')
%th
%tbody %tbody
- @pipeline.failed_builds.each_with_index do |build, index| - @pipeline.failed_builds.each_with_index do |build, index|

View File

@ -144,7 +144,7 @@ ensure these processes are close to 100% as possible during active use.
On the **secondary** node: On the **secondary** node:
1. On the top bar, select **Menu > Admin**. 1. On the top bar, select **Menu > Admin**.
1. On the left sidebar, select **Geo > Nodes**. 1. On the left sidebar, select **Geo > Sites**.
Replicated objects (shown in green) should be close to 100%, Replicated objects (shown in green) should be close to 100%,
and there should be no failures (shown in red). If a large proportion of and there should be no failures (shown in red). If a large proportion of
objects aren't yet replicated (shown in gray), consider giving the node more objects aren't yet replicated (shown in gray), consider giving the node more
@ -174,7 +174,7 @@ On the **primary** node:
1. On the top bar, select **Menu > Admin**. 1. On the top bar, select **Menu > Admin**.
1. On the left sidebar, select **Messages**. 1. On the left sidebar, select **Messages**.
1. Add a message notifying users on the maintenance window. 1. Add a message notifying users on the maintenance window.
You can check under **Geo > Nodes** to estimate how long it You can check under **Geo > Sites** to estimate how long it
takes to finish syncing. takes to finish syncing.
1. Select **Add broadcast message**. 1. Select **Add broadcast message**.
@ -206,7 +206,7 @@ GitLab 13.9 through GitLab 14.3 are affected by a bug in which the Geo secondary
those with `geo` in the name to drop to 0. those with `geo` in the name to drop to 0.
These queues contain work that has been submitted by your users; failing over These queues contain work that has been submitted by your users; failing over
before it is completed, causes the work to be lost. before it is completed, causes the work to be lost.
1. On the left sidebar, select **Geo > Nodes** and wait for the 1. On the left sidebar, select **Geo > Sites** and wait for the
following conditions to be true of the **secondary** node you are failing over to: following conditions to be true of the **secondary** node you are failing over to:
- All replication meters reach 100% replicated, 0% failures. - All replication meters reach 100% replicated, 0% failures.

View File

@ -103,7 +103,7 @@ These additional CI/CD minutes:
- Are used only after the monthly quota included in your subscription runs out. - Are used only after the monthly quota included in your subscription runs out.
- Are carried over to the next month, if any remain at the end of the month. - Are carried over to the next month, if any remain at the end of the month.
- Don't expire. - Are valid for 12 months from date of purchase or until all minutes are consumed, whichever comes first. Expiry of minutes is not currently enforced.
If you use more CI/CD minutes than your monthly quota, when you purchase more, If you use more CI/CD minutes than your monthly quota, when you purchase more,
those CI/CD minutes are deducted from your quota. For example, with a GitLab SaaS those CI/CD minutes are deducted from your quota. For example, with a GitLab SaaS

View File

@ -347,7 +347,7 @@ Component statuses are linked to configuration documentation for each component.
| [Elasticsearch](#elasticsearch) | Improved search within GitLab | ⤓ | ⚙ | ⤓ | ⤓ | ✅ | ⤓ | ⚙ | EE Only | | [Elasticsearch](#elasticsearch) | Improved search within GitLab | ⤓ | ⚙ | ⤓ | ⤓ | ✅ | ⤓ | ⚙ | EE Only |
| [Gitaly](#gitaly) | Git RPC service for handling all Git calls made by GitLab | ✅ | ✅ | ✅ | ✅ | ✅ | ⚙ | ✅ | CE & EE | | [Gitaly](#gitaly) | Git RPC service for handling all Git calls made by GitLab | ✅ | ✅ | ✅ | ✅ | ✅ | ⚙ | ✅ | CE & EE |
| [GitLab Exporter](#gitlab-exporter) | Generates a variety of GitLab metrics | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | CE & EE | | [GitLab Exporter](#gitlab-exporter) | Generates a variety of GitLab metrics | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | CE & EE |
| [GitLab Geo Node](#gitlab-geo) | Geographically distributed GitLab nodes | ⚙ | ⚙ | ❌ | ❌ | ✅ | ❌ | ⚙ | EE Only | | [GitLab Geo](#gitlab-geo) | Geographically distributed GitLab site | ⚙ | ⚙ | ❌ | ❌ | ✅ | ❌ | ⚙ | EE Only |
| [GitLab Pages](#gitlab-pages) | Hosts static websites | ⚙ | ⚙ | ❌ | ❌ | ✅ | ⚙ | ⚙ | CE & EE | | [GitLab Pages](#gitlab-pages) | Hosts static websites | ⚙ | ⚙ | ❌ | ❌ | ✅ | ⚙ | ⚙ | CE & EE |
| [GitLab agent](#gitlab-agent) | Integrate Kubernetes clusters in a cloud-native way | ⚙ | ⚙ | ⚙ | ❌ | ❌ | ⤓ | ⚙ | EE Only | | [GitLab agent](#gitlab-agent) | Integrate Kubernetes clusters in a cloud-native way | ⚙ | ⚙ | ⚙ | ❌ | ❌ | ⤓ | ⚙ | EE Only |
| [GitLab self-monitoring: Alertmanager](#alertmanager) | Deduplicates, groups, and routes alerts from Prometheus | ⚙ | ⚙ | ✅ | ⚙ | ✅ | ❌ | ❌ | CE & EE | | [GitLab self-monitoring: Alertmanager](#alertmanager) | Deduplicates, groups, and routes alerts from Prometheus | ⚙ | ⚙ | ✅ | ⚙ | ✅ | ❌ | ❌ | CE & EE |

View File

@ -12,7 +12,7 @@ You can configure various settings for GitLab Geo sites. For more information, s
On either the primary or secondary site: On either the primary or secondary site:
1. On the top bar, select **Menu > Admin**. 1. On the top bar, select **Menu > Admin**.
1. On the left sidebar, select **Geo > Nodes**. 1. On the left sidebar, select **Geo > Sites**.
## Common settings ## Common settings

View File

@ -48,6 +48,8 @@ tree:
- :award_emoji - :award_emoji
- releases: - releases:
- :links - :links
- milestone_releases:
- :milestone
- project_members: - project_members:
- :user - :user
- merge_requests: - merge_requests:
@ -958,6 +960,9 @@ excluded_attributes:
system_note_metadata: system_note_metadata:
- :description_version_id - :description_version_id
- :note_id - :note_id
milestone_releases:
- :milestone_id
- :release_id
methods: methods:
notes: notes:
- :type - :type

View File

@ -185,15 +185,17 @@ module Gitlab
counters << compose_metric_key(metric, role) counters << compose_metric_key(metric, role)
end end
::Gitlab::Database.db_config_names.each do |config_name| ::Gitlab::Database.database_base_models.keys.each do |config_name|
counters << compose_metric_key(metric, nil, config_name) # main counters << compose_metric_key(metric, nil, config_name) # main / ci
counters << compose_metric_key(metric, nil, config_name + ::Gitlab::Database::LoadBalancing::LoadBalancer::REPLICA_SUFFIX) # main_replica counters << compose_metric_key(metric, nil, config_name + ::Gitlab::Database::LoadBalancing::LoadBalancer::REPLICA_SUFFIX) # main_replica / ci_replica
end end
end end
counters counters
end end
private_class_method :load_balancing_metric_keys
def compose_metric_key(metric, db_role = nil, db_config_name = nil) def compose_metric_key(metric, db_role = nil, db_config_name = nil)
self.class.compose_metric_key(metric, db_role, db_config_name) self.class.compose_metric_key(metric, db_role, db_config_name)
end end

View File

@ -2603,6 +2603,9 @@ msgstr ""
msgid "AdminSettings|Configure Let's Encrypt" msgid "AdminSettings|Configure Let's Encrypt"
msgstr "" msgstr ""
msgid "AdminSettings|Disable Elasticsearch until indexing completes."
msgstr ""
msgid "AdminSettings|Disable feed token" msgid "AdminSettings|Disable feed token"
msgstr "" msgstr ""
@ -2615,6 +2618,9 @@ msgstr ""
msgid "AdminSettings|Domain verification is an essential security measure for public GitLab sites. Users are required to demonstrate they control a domain before it is enabled. %{link_start}Learn more.%{link_end}" msgid "AdminSettings|Domain verification is an essential security measure for public GitLab sites. Users are required to demonstrate they control a domain before it is enabled. %{link_start}Learn more.%{link_end}"
msgstr "" msgstr ""
msgid "AdminSettings|Elasticsearch indexing"
msgstr ""
msgid "AdminSettings|Email from GitLab - email users right from the Admin Area. %{link_start}Learn more%{link_end}." msgid "AdminSettings|Email from GitLab - email users right from the Admin Area. %{link_start}Learn more%{link_end}."
msgstr "" msgstr ""
@ -2624,12 +2630,24 @@ msgstr ""
msgid "AdminSettings|Enable Service Ping" msgid "AdminSettings|Enable Service Ping"
msgstr "" msgstr ""
msgid "AdminSettings|Enable kuromoji custom analyzer: Indexing"
msgstr ""
msgid "AdminSettings|Enable kuromoji custom analyzer: Search"
msgstr ""
msgid "AdminSettings|Enable pipeline suggestion banner" msgid "AdminSettings|Enable pipeline suggestion banner"
msgstr "" msgstr ""
msgid "AdminSettings|Enable shared runners for new projects" msgid "AdminSettings|Enable shared runners for new projects"
msgstr "" msgstr ""
msgid "AdminSettings|Enable smartcn custom analyzer: Indexing"
msgstr ""
msgid "AdminSettings|Enable smartcn custom analyzer: Search"
msgstr ""
msgid "AdminSettings|Feed token" msgid "AdminSettings|Feed token"
msgstr "" msgstr ""
@ -2639,6 +2657,9 @@ msgstr ""
msgid "AdminSettings|If not specified at the group or instance level, the default is %{default_initial_branch_name}. Does not affect existing repositories." msgid "AdminSettings|If not specified at the group or instance level, the default is %{default_initial_branch_name}. Does not affect existing repositories."
msgstr "" msgstr ""
msgid "AdminSettings|If there isn't any existing index, GitLab creates one."
msgstr ""
msgid "AdminSettings|Keep the latest artifacts for all jobs in the latest successful pipelines" msgid "AdminSettings|Keep the latest artifacts for all jobs in the latest successful pipelines"
msgstr "" msgstr ""
@ -2648,6 +2669,9 @@ msgstr ""
msgid "AdminSettings|Limit project size at a global, group, and project level. %{link_start}Learn more%{link_end}." msgid "AdminSettings|Limit project size at a global, group, and project level. %{link_start}Learn more%{link_end}."
msgstr "" msgstr ""
msgid "AdminSettings|Limit the number of namespaces and projects that can be indexed."
msgstr ""
msgid "AdminSettings|Maximum duration of a session for Git operations when 2FA is enabled." msgid "AdminSettings|Maximum duration of a session for Git operations when 2FA is enabled."
msgstr "" msgstr ""
@ -2678,6 +2702,12 @@ msgstr ""
msgid "AdminSettings|No required pipeline" msgid "AdminSettings|No required pipeline"
msgstr "" msgstr ""
msgid "AdminSettings|Only enable search after installing the plugin, enabling indexing, and recreating the index."
msgstr ""
msgid "AdminSettings|Pause Elasticsearch indexing"
msgstr ""
msgid "AdminSettings|Preview payload" msgid "AdminSettings|Preview payload"
msgstr "" msgstr ""
@ -2702,6 +2732,9 @@ msgstr ""
msgid "AdminSettings|Save %{name} limits" msgid "AdminSettings|Save %{name} limits"
msgstr "" msgstr ""
msgid "AdminSettings|Search with Elasticsearch enabled"
msgstr ""
msgid "AdminSettings|Select a CI/CD template" msgid "AdminSettings|Select a CI/CD template"
msgstr "" msgstr ""
@ -2744,6 +2777,9 @@ msgstr ""
msgid "AdminSettings|The template for the required pipeline configuration can be one of the GitLab-provided templates, or a custom template added to an instance template repository. %{link_start}How do I create an instance template repository?%{link_end}" msgid "AdminSettings|The template for the required pipeline configuration can be one of the GitLab-provided templates, or a custom template added to an instance template repository. %{link_start}How do I create an instance template repository?%{link_end}"
msgstr "" msgstr ""
msgid "AdminSettings|There are Advanced Search migrations pending that require indexing to pause. Indexing must remain paused until GitLab completes the migrations."
msgstr ""
msgid "AdminSettings|To enable Registration Features, first enable Service Ping." msgid "AdminSettings|To enable Registration Features, first enable Service Ping."
msgstr "" msgstr ""
@ -2753,6 +2789,12 @@ msgstr ""
msgid "AdminSettings|Total number of jobs in currently active pipelines" msgid "AdminSettings|Total number of jobs in currently active pipelines"
msgstr "" msgstr ""
msgid "AdminSettings|Use AWS hosted Elasticsearch with IAM credentials"
msgstr ""
msgid "AdminSettings|When paused, GitLab still tracks the changes. This is useful for cluster/index migrations."
msgstr ""
msgid "AdminSettings|You can enable Registration Features because Service Ping is enabled. To continue using Registration Features in the future, you will also need to register with GitLab via a new cloud licensing service." msgid "AdminSettings|You can enable Registration Features because Service Ping is enabled. To continue using Registration Features in the future, you will also need to register with GitLab via a new cloud licensing service."
msgstr "" msgstr ""
@ -13120,9 +13162,6 @@ msgstr ""
msgid "Disable" msgid "Disable"
msgstr "" msgstr ""
msgid "Disable Elasticsearch until indexing completes."
msgstr ""
msgid "Disable Two-factor Authentication" msgid "Disable Two-factor Authentication"
msgstr "" msgstr ""
@ -13659,9 +13698,6 @@ msgstr ""
msgid "Elasticsearch HTTP client timeout value in seconds." msgid "Elasticsearch HTTP client timeout value in seconds."
msgstr "" msgstr ""
msgid "Elasticsearch indexing"
msgstr ""
msgid "Elasticsearch indexing restrictions" msgid "Elasticsearch indexing restrictions"
msgstr "" msgstr ""
@ -13944,12 +13980,6 @@ msgstr ""
msgid "Enable integration" msgid "Enable integration"
msgstr "" msgstr ""
msgid "Enable kuromoji custom analyzer: Indexing"
msgstr ""
msgid "Enable kuromoji custom analyzer: Search"
msgstr ""
msgid "Enable logs collection" msgid "Enable logs collection"
msgstr "" msgstr ""
@ -13995,12 +14025,6 @@ msgstr ""
msgid "Enable shared runners for this project" msgid "Enable shared runners for this project"
msgstr "" msgstr ""
msgid "Enable smartcn custom analyzer: Indexing"
msgstr ""
msgid "Enable smartcn custom analyzer: Search"
msgstr ""
msgid "Enable two-factor authentication" msgid "Enable two-factor authentication"
msgstr "" msgstr ""
@ -19019,9 +19043,6 @@ msgstr ""
msgid "If the number of active users exceeds the user limit, you will be charged for the number of %{users_over_license_link} at your next license reconciliation." msgid "If the number of active users exceeds the user limit, you will be charged for the number of %{users_over_license_link} at your next license reconciliation."
msgstr "" msgstr ""
msgid "If there isn't any existing index, GitLab creates one."
msgstr ""
msgid "If this email was added in error, you can remove it here:" msgid "If this email was added in error, you can remove it here:"
msgstr "" msgstr ""
@ -22751,9 +22772,6 @@ msgstr ""
msgid "Limit the number of issues and epics per minute a user can create through web and API requests." msgid "Limit the number of issues and epics per minute a user can create through web and API requests."
msgstr "" msgstr ""
msgid "Limit the number of namespaces and projects that can be indexed."
msgstr ""
msgid "Limit the size of Sidekiq jobs stored in Redis." msgid "Limit the size of Sidekiq jobs stored in Redis."
msgstr "" msgstr ""
@ -23778,6 +23796,9 @@ msgstr ""
msgid "Merge request %{mr_link} was reviewed by %{mr_author}" msgid "Merge request %{mr_link} was reviewed by %{mr_author}"
msgstr "" msgstr ""
msgid "Merge request actions"
msgstr ""
msgid "Merge request analytics" msgid "Merge request analytics"
msgstr "" msgstr ""
@ -26480,9 +26501,6 @@ msgstr ""
msgid "Only effective when remote storage is enabled. Set to 0 for no size limit." msgid "Only effective when remote storage is enabled. Set to 0 for no size limit."
msgstr "" msgstr ""
msgid "Only enable search after installing the plugin, enabling indexing, and recreating the index."
msgstr ""
msgid "Only include features new to your current subscription tier." msgid "Only include features new to your current subscription tier."
msgstr "" msgstr ""
@ -27319,9 +27337,6 @@ msgstr ""
msgid "Pause" msgid "Pause"
msgstr "" msgstr ""
msgid "Pause Elasticsearch indexing"
msgstr ""
msgid "Paused" msgid "Paused"
msgstr "" msgstr ""
@ -31661,9 +31676,6 @@ msgstr ""
msgid "Repo by URL" msgid "Repo by URL"
msgstr "" msgstr ""
msgid "Report %{display_issuable_type} that are abusive, inappropriate or spam."
msgstr ""
msgid "Report abuse" msgid "Report abuse"
msgstr "" msgstr ""
@ -38034,9 +38046,6 @@ msgstr ""
msgid "Theme" msgid "Theme"
msgstr "" msgstr ""
msgid "There are Advanced Search migrations pending that require indexing to pause. Indexing must remain paused until GitLab completes the migrations."
msgstr ""
msgid "There are currently no events." msgid "There are currently no events."
msgstr "" msgstr ""
@ -42550,9 +42559,6 @@ msgstr ""
msgid "When merge requests and commits in the default branch close, any issues they reference also close." msgid "When merge requests and commits in the default branch close, any issues they reference also close."
msgstr "" msgstr ""
msgid "When paused, GitLab still tracks the changes. This is useful for cluster/index migrations."
msgstr ""
msgid "When this merge request is accepted" msgid "When this merge request is accepted"
msgid_plural "When these merge requests are accepted" msgid_plural "When these merge requests are accepted"
msgstr[0] "" msgstr[0] ""

View File

@ -28,7 +28,6 @@ RSpec.describe 'Issuables Close/Reopen/Report toggle' do
expect(container).to have_link("Close merge request") expect(container).to have_link("Close merge request")
expect(container).to have_link('Report abuse') expect(container).to have_link('Report abuse')
expect(container).to have_text("Report merge requests that are abusive, inappropriate or spam.")
end end
it 'links to Report Abuse' do it 'links to Report Abuse' do
@ -43,10 +42,12 @@ RSpec.describe 'Issuables Close/Reopen/Report toggle' do
let(:issuable) { create(:merge_request, :opened, source_project: project) } let(:issuable) { create(:merge_request, :opened, source_project: project) }
it 'shows the `Edit` and `Mark as draft` buttons' do it 'shows the `Edit` and `Mark as draft` buttons' do
click_button 'Toggle dropdown'
expect(container).to have_link('Edit') expect(container).to have_link('Edit')
expect(container).to have_link('Mark as draft') expect(container).to have_link('Mark as draft')
expect(container).not_to have_button('Report abuse') expect(container).to have_link('Close merge request')
expect(container).not_to have_button('Close merge request') expect(container).to have_link('Report abuse')
expect(container).not_to have_link('Reopen merge request') expect(container).not_to have_link('Reopen merge request')
end end
end end
@ -55,21 +56,24 @@ RSpec.describe 'Issuables Close/Reopen/Report toggle' do
let(:issuable) { create(:merge_request, :closed, source_project: project) } let(:issuable) { create(:merge_request, :closed, source_project: project) }
it 'shows both the `Edit` and `Reopen` button' do it 'shows both the `Edit` and `Reopen` button' do
click_button 'Toggle dropdown'
expect(container).to have_link('Edit') expect(container).to have_link('Edit')
expect(container).not_to have_button('Report abuse') expect(container).to have_link('Report abuse')
expect(container).not_to have_button('Close merge request')
expect(container).to have_link('Reopen merge request') expect(container).to have_link('Reopen merge request')
expect(container).not_to have_link('Close merge request')
end end
context 'when the merge request author is the current user' do context 'when the merge request author is the current user' do
let(:issuable) { create(:merge_request, :closed, source_project: project, author: user) } let(:issuable) { create(:merge_request, :closed, source_project: project, author: user) }
it 'shows both the `Edit` and `Reopen` button' do it 'shows both the `Edit` and `Reopen` button' do
click_button 'Toggle dropdown'
expect(container).to have_link('Edit') expect(container).to have_link('Edit')
expect(container).not_to have_link('Report abuse')
expect(container).not_to have_selector('button.dropdown-toggle')
expect(container).not_to have_button('Close merge request')
expect(container).to have_link('Reopen merge request') expect(container).to have_link('Reopen merge request')
expect(container).not_to have_link('Close merge request')
expect(container).not_to have_link('Report abuse')
end end
end end
end end

View File

@ -16,10 +16,13 @@ RSpec.describe 'Merge request > User marks merge request as draft', :js do
end end
it 'toggles draft status' do it 'toggles draft status' do
click_button 'Toggle dropdown'
click_link 'Mark as draft' click_link 'Mark as draft'
expect(page).to have_content("Draft: #{merge_request.title}") expect(page).to have_content("Draft: #{merge_request.title}")
click_button 'Toggle dropdown'
page.within('.detail-page-header-actions') do page.within('.detail-page-header-actions') do
click_link 'Mark as ready' click_link 'Mark as ready'
end end

View File

@ -2378,6 +2378,23 @@
"created_at": "2019-12-26T10:17:14.621Z", "created_at": "2019-12-26T10:17:14.621Z",
"updated_at": "2019-12-26T10:17:14.621Z" "updated_at": "2019-12-26T10:17:14.621Z"
} }
],
"milestone_releases": [
{
"milestone_id": 1349,
"release_id": 9172,
"milestone": {
"id": 1,
"title": "test milestone",
"project_id": 8,
"description": "test milestone",
"due_date": null,
"created_at": "2016-06-14T15:02:04.415Z",
"updated_at": "2016-06-14T15:02:04.415Z",
"state": "active",
"iid": 1
}
}
] ]
} }
], ],

View File

@ -1 +1 @@
{"id":1,"tag":"release-1.1","description":"Some release notes","project_id":5,"created_at":"2019-12-26T10:17:14.621Z","updated_at":"2019-12-26T10:17:14.621Z","author_id":1,"name":"release-1.1","sha":"901de3a8bd5573f4a049b1457d28bc1592ba6bf9","released_at":"2019-12-26T10:17:14.615Z","links":[{"id":1,"release_id":1,"url":"http://localhost/namespace6/project6/-/jobs/140463678/artifacts/download","name":"release-1.1.dmg","created_at":"2019-12-26T10:17:14.621Z","updated_at":"2019-12-26T10:17:14.621Z"}]} {"id":1,"tag":"release-1.1","description":"Some release notes","project_id":5,"created_at":"2019-12-26T10:17:14.621Z","updated_at":"2019-12-26T10:17:14.621Z","author_id":1,"name":"release-1.1","sha":"901de3a8bd5573f4a049b1457d28bc1592ba6bf9","released_at":"2019-12-26T10:17:14.615Z","links":[{"id":1,"release_id":1,"url":"http://localhost/namespace6/project6/-/jobs/140463678/artifacts/download","name":"release-1.1.dmg","created_at":"2019-12-26T10:17:14.621Z","updated_at":"2019-12-26T10:17:14.621Z"}],"milestone_releases":[{"milestone_id":1349,"release_id":9172,"milestone":{"id":1,"title":"test milestone","project_id":8,"description":"test milestone","due_date":null,"created_at":"2016-06-14T15:02:04.415Z","updated_at":"2016-06-14T15:02:04.415Z","state":"active","iid":1}}]}

View File

@ -52,7 +52,7 @@ describe('content_editor/components/bubble_menus/code_block', () => {
await emitEditorEvent({ event: 'transaction', tiptapEditor }); await emitEditorEvent({ event: 'transaction', tiptapEditor });
expect(bubbleMenu.props('editor')).toBe(tiptapEditor); expect(bubbleMenu.props('editor')).toBe(tiptapEditor);
expect(bubbleMenu.classes()).toEqual(['gl-shadow', 'gl-rounded-base']); expect(bubbleMenu.classes()).toEqual(['gl-shadow', 'gl-rounded-base', 'gl-bg-white']);
}); });
it('selects plaintext language by default', async () => { it('selects plaintext language by default', async () => {

View File

@ -42,15 +42,15 @@ describe('content_editor/components/bubble_menus/formatting', () => {
const bubbleMenu = wrapper.findComponent(BubbleMenu); const bubbleMenu = wrapper.findComponent(BubbleMenu);
expect(bubbleMenu.props().editor).toBe(tiptapEditor); expect(bubbleMenu.props().editor).toBe(tiptapEditor);
expect(bubbleMenu.classes()).toEqual(['gl-shadow', 'gl-rounded-base']); expect(bubbleMenu.classes()).toEqual(['gl-shadow', 'gl-rounded-base', 'gl-bg-white']);
}); });
describe.each` describe.each`
testId | controlProps testId | controlProps
${'bold'} | ${{ contentType: 'bold', iconName: 'bold', label: 'Bold text', editorCommand: 'toggleBold', size: 'medium', category: 'primary' }} ${'bold'} | ${{ contentType: 'bold', iconName: 'bold', label: 'Bold text', editorCommand: 'toggleBold', size: 'medium', category: 'tertiary' }}
${'italic'} | ${{ contentType: 'italic', iconName: 'italic', label: 'Italic text', editorCommand: 'toggleItalic', size: 'medium', category: 'primary' }} ${'italic'} | ${{ contentType: 'italic', iconName: 'italic', label: 'Italic text', editorCommand: 'toggleItalic', size: 'medium', category: 'tertiary' }}
${'strike'} | ${{ contentType: 'strike', iconName: 'strikethrough', label: 'Strikethrough', editorCommand: 'toggleStrike', size: 'medium', category: 'primary' }} ${'strike'} | ${{ contentType: 'strike', iconName: 'strikethrough', label: 'Strikethrough', editorCommand: 'toggleStrike', size: 'medium', category: 'tertiary' }}
${'code'} | ${{ contentType: 'code', iconName: 'code', label: 'Code', editorCommand: 'toggleCode', size: 'medium', category: 'primary' }} ${'code'} | ${{ contentType: 'code', iconName: 'code', label: 'Code', editorCommand: 'toggleCode', size: 'medium', category: 'tertiary' }}
`('given a $testId toolbar control', ({ testId, controlProps }) => { `('given a $testId toolbar control', ({ testId, controlProps }) => {
beforeEach(() => { beforeEach(() => {
buildWrapper(); buildWrapper();

View File

@ -42,9 +42,8 @@ describe('UncollapsedReviewerList component', () => {
expect(wrapper.findAll(ReviewerAvatarLink).length).toBe(1); expect(wrapper.findAll(ReviewerAvatarLink).length).toBe(1);
}); });
it('shows one user with avatar, username and author name', () => { it('shows one user with avatar, and author name', () => {
expect(wrapper.text()).toContain(user.name); expect(wrapper.text()).toContain(user.name);
expect(wrapper.text()).toContain(`@root`);
}); });
it('renders re-request loading icon', async () => { it('renders re-request loading icon', async () => {
@ -84,11 +83,9 @@ describe('UncollapsedReviewerList component', () => {
expect(wrapper.findAll(ReviewerAvatarLink).length).toBe(2); expect(wrapper.findAll(ReviewerAvatarLink).length).toBe(2);
}); });
it('shows both users with avatar, username and author name', () => { it('shows both users with avatar, and author name', () => {
expect(wrapper.text()).toContain(user.name); expect(wrapper.text()).toContain(user.name);
expect(wrapper.text()).toContain(`@root`);
expect(wrapper.text()).toContain(user2.name); expect(wrapper.text()).toContain(user2.name);
expect(wrapper.text()).toContain(`@hello-world`);
}); });
it('renders approval icon', () => { it('renders approval icon', () => {

View File

@ -146,7 +146,6 @@ describe('Reviewer component', () => {
const userItems = wrapper.findAll('[data-testid="reviewer"]'); const userItems = wrapper.findAll('[data-testid="reviewer"]');
expect(userItems.length).toBe(3); expect(userItems.length).toBe(3);
expect(userItems.at(0).find('a').attributes('title')).toBe(users[2].name);
}); });
it('passes the sorted reviewers to the collapsed-reviewer-list', () => { it('passes the sorted reviewers to the collapsed-reviewer-list', () => {

View File

@ -379,7 +379,7 @@ RSpec.describe Gitlab::ImportExport::Project::TreeRestorer do
end end
end end
it 'restores releases with links' do it 'restores releases with links & milestones' do
release = @project.releases.last release = @project.releases.last
link = release.links.last link = release.links.last
@ -389,6 +389,8 @@ RSpec.describe Gitlab::ImportExport::Project::TreeRestorer do
expect(release.name).to eq('release-1.1') expect(release.name).to eq('release-1.1')
expect(release.sha).to eq('901de3a8bd5573f4a049b1457d28bc1592ba6bf9') expect(release.sha).to eq('901de3a8bd5573f4a049b1457d28bc1592ba6bf9')
expect(release.released_at).to eq('2019-12-26T10:17:14.615Z') expect(release.released_at).to eq('2019-12-26T10:17:14.615Z')
expect(release.milestone_releases.count).to eq(1)
expect(release.milestone_releases.first.milestone.title).to eq('test milestone')
expect(link.url).to eq('http://localhost/namespace6/project6/-/jobs/140463678/artifacts/download') expect(link.url).to eq('http://localhost/namespace6/project6/-/jobs/140463678/artifacts/download')
expect(link.name).to eq('release-1.1.dmg') expect(link.name).to eq('release-1.1.dmg')

View File

@ -10,6 +10,124 @@ RSpec.describe Gitlab::Metrics::Subscribers::ActiveRecord do
let(:connection) { ActiveRecord::Base.retrieve_connection } let(:connection) { ActiveRecord::Base.retrieve_connection }
let(:db_config_name) { ::Gitlab::Database.db_config_name(connection) } let(:db_config_name) { ::Gitlab::Database.db_config_name(connection) }
describe '.load_balancing_metric_counter_keys' do
context 'multiple databases' do
before do
skip_if_multiple_databases_not_setup
end
it 'has expected keys' do
expect(described_class.load_balancing_metric_counter_keys).to include(
:db_replica_count,
:db_primary_count,
:db_main_count,
:db_main_replica_count,
:db_ci_count,
:db_ci_replica_count,
:db_replica_cached_count,
:db_primary_cached_count,
:db_main_cached_count,
:db_main_replica_cached_count,
:db_ci_cached_count,
:db_ci_replica_cached_count,
:db_replica_wal_count,
:db_primary_wal_count,
:db_main_wal_count,
:db_main_replica_wal_count,
:db_ci_wal_count,
:db_ci_replica_wal_count,
:db_replica_wal_cached_count,
:db_primary_wal_cached_count,
:db_main_wal_cached_count,
:db_main_replica_wal_cached_count,
:db_ci_wal_cached_count,
:db_ci_replica_wal_cached_count
)
end
end
context 'single database' do
before do
skip_if_multiple_databases_are_setup
end
it 'has expected keys' do
expect(described_class.load_balancing_metric_counter_keys).to include(
:db_replica_count,
:db_primary_count,
:db_main_count,
:db_main_replica_count,
:db_replica_cached_count,
:db_primary_cached_count,
:db_main_cached_count,
:db_main_replica_cached_count,
:db_replica_wal_count,
:db_primary_wal_count,
:db_main_wal_count,
:db_main_replica_wal_count,
:db_replica_wal_cached_count,
:db_primary_wal_cached_count,
:db_main_wal_cached_count,
:db_main_replica_wal_cached_count
)
end
it 'does not have ci keys' do
expect(described_class.load_balancing_metric_counter_keys).not_to include(
:db_ci_count,
:db_ci_replica_count,
:db_ci_cached_count,
:db_ci_replica_cached_count,
:db_ci_wal_count,
:db_ci_replica_wal_count,
:db_ci_wal_cached_count,
:db_ci_replica_wal_cached_count
)
end
end
end
describe '.load_balancing_metric_duration_keys' do
context 'multiple databases' do
before do
skip_if_multiple_databases_not_setup
end
it 'has expected keys' do
expect(described_class.load_balancing_metric_duration_keys).to include(
:db_replica_duration_s,
:db_primary_duration_s,
:db_main_duration_s,
:db_main_replica_duration_s,
:db_ci_duration_s,
:db_ci_replica_duration_s
)
end
end
context 'single database' do
before do
skip_if_multiple_databases_are_setup
end
it 'has expected keys' do
expect(described_class.load_balancing_metric_duration_keys).to include(
:db_replica_duration_s,
:db_primary_duration_s,
:db_main_duration_s,
:db_main_replica_duration_s
)
end
it 'does not have ci keys' do
expect(described_class.load_balancing_metric_duration_keys).not_to include(
:db_ci_duration_s,
:db_ci_replica_duration_s
)
end
end
end
describe '#transaction' do describe '#transaction' do
let(:web_transaction) { double('Gitlab::Metrics::WebTransaction') } let(:web_transaction) { double('Gitlab::Metrics::WebTransaction') }
let(:background_transaction) { double('Gitlab::Metrics::WebTransaction') } let(:background_transaction) { double('Gitlab::Metrics::WebTransaction') }

View File

@ -48,7 +48,7 @@ RSpec.shared_examples 'an editable merge request' do
end end
page.within '.reviewer' do page.within '.reviewer' do
expect(page).to have_content user.username expect(page).to have_content user.name
end end
page.within '.milestone' do page.within '.milestone' do

View File

@ -40,7 +40,7 @@ RSpec.shared_examples 'multiple reviewers merge request' do |action, save_button
# Closing dropdown to persist # Closing dropdown to persist
click_link 'Edit' click_link 'Edit'
expect(page).to have_content user2.username expect(page).to have_content user2.name
end end
end end
end end

View File

@ -16,7 +16,6 @@ RSpec.describe 'projects/merge_requests/show.html.haml', :aggregate_failures do
render render
expect(rendered).to have_css('a', visible: true, text: 'Mark as draft') expect(rendered).to have_css('a', visible: true, text: 'Mark as draft')
expect(rendered).to have_css('a', visible: false, text: 'Reopen')
expect(rendered).to have_css('a', visible: true, text: 'Close') expect(rendered).to have_css('a', visible: true, text: 'Close')
end end
end end
@ -31,7 +30,6 @@ RSpec.describe 'projects/merge_requests/show.html.haml', :aggregate_failures do
expect(rendered).not_to have_css('a', visible: true, text: 'Mark as draft') expect(rendered).not_to have_css('a', visible: true, text: 'Mark as draft')
expect(rendered).to have_css('a', visible: true, text: 'Reopen') expect(rendered).to have_css('a', visible: true, text: 'Reopen')
expect(rendered).to have_css('a', visible: false, text: 'Close')
end end
context 'when source project does not exist' do context 'when source project does not exist' do
@ -40,8 +38,7 @@ RSpec.describe 'projects/merge_requests/show.html.haml', :aggregate_failures do
render render
expect(rendered).to have_css('a', visible: false, text: 'Reopen') expect(rendered).not_to have_css('a', visible: false, text: 'Reopen')
expect(rendered).to have_css('a', visible: false, text: 'Close')
end end
end end
end end