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>2020-08-12 00:10:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-12 00:10:09 +0300
commitda100a690f61e02ab0244aafe7434af838e913c0 (patch)
treeb98e82a74a7ac0a1e2e834a9dfd7a7b0946a8faf
parent7a1895c74ad57da757c02b2675147a5a5e2cfe6d (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--app/assets/javascripts/badges/components/badge_form.vue16
-rw-r--r--app/assets/javascripts/behaviors/quick_submit.js2
-rw-r--r--app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue21
-rw-r--r--app/assets/javascripts/pipelines/stores/test_reports/mutations.js27
-rw-r--r--app/assets/javascripts/releases/stores/modules/detail/state.js4
-rw-r--r--app/assets/stylesheets/pages/pipelines.scss1
-rw-r--r--app/helpers/releases_helper.rb3
-rw-r--r--app/models/audit_event.rb2
-rw-r--r--app/serializers/pipeline_entity.rb2
-rw-r--r--app/serializers/test_report_summary_entity.rb4
-rw-r--r--app/views/admin/application_settings/_account_and_limit.html.haml4
-rw-r--r--app/views/admin/application_settings/_diff_limits.html.haml4
-rw-r--r--app/views/admin/application_settings/_external_authorization_service_form.html.haml4
-rw-r--r--app/views/admin/application_settings/_signin.html.haml4
-rw-r--r--app/views/admin/application_settings/_signup.html.haml4
-rw-r--r--app/views/admin/application_settings/_terminal.html.haml4
-rw-r--r--app/views/admin/application_settings/_terms.html.haml4
-rw-r--r--app/views/admin/application_settings/_visibility_and_access.html.haml4
-rw-r--r--app/views/admin/application_settings/general.html.haml4
-rw-r--r--app/views/groups/settings/_advanced.html.haml7
-rw-r--r--app/views/groups/settings/_export.html.haml5
-rw-r--r--app/views/groups/settings/_general.html.haml6
-rw-r--r--app/views/groups/settings/_permanent_deletion.html.haml4
-rw-r--r--app/views/groups/settings/_permissions.html.haml4
-rw-r--r--app/views/projects/_export.html.haml3
-rw-r--r--app/views/projects/_visibility_modal.html.haml9
-rw-r--r--app/views/projects/edit.html.haml21
-rw-r--r--app/views/projects/pipelines/_with_tabs.html.haml2
-rw-r--r--app/views/projects/settings/_archive.html.haml3
-rw-r--r--app/views/projects/settings/_general.html.haml4
-rw-r--r--app/views/shared/_confirm_modal.html.haml2
-rw-r--r--changelogs/unreleased/220322-refactor-target-type.yml5
-rw-r--r--changelogs/unreleased/231348-fix-parallel-jobs-dropdown-from-cutting-off-in-the-pipeline-graph.yml5
-rw-r--r--changelogs/unreleased/nfriend-fix-quick-submit.yml5
-rw-r--r--changelogs/unreleased/nfriend-make-tag-name-required-on-new-release-page.yml5
-rw-r--r--db/post_migrate/20200810100921_add_target_type_to_audit_event.rb121
-rw-r--r--db/post_migrate/20200810101029_add_text_limit_to_audit_event_target_type.rb20
-rw-r--r--db/schema_migrations/202008101009211
-rw-r--r--db/schema_migrations/202008101010291
-rw-r--r--db/structure.sql7
-rw-r--r--doc/api/projects.md3
-rw-r--r--doc/user/compliance/license_compliance/index.md24
-rw-r--r--lib/api/entities/project_hook.rb2
-rw-r--r--lib/api/project_hooks.rb1
-rw-r--r--lib/gitlab/ci/reports/test_report_summary.rb35
-rw-r--r--lib/gitlab/ci/reports/test_suite_summary.rb31
-rw-r--r--lib/gitlab/metrics/templates/k8s_single-stat.metrics-dashboard.yml17
-rw-r--r--locale/gitlab.pot3
-rw-r--r--package.json2
-rw-r--r--spec/controllers/projects/pipelines/tests_controller_spec.rb4
-rw-r--r--spec/factories/project_hooks.rb1
-rw-r--r--spec/features/projects/pipelines/pipeline_spec.rb2
-rw-r--r--spec/frontend/badges/components/badge_form_spec.js4
-rw-r--r--spec/frontend/pages/admin/users/components/__snapshots__/delete_user_modal_spec.js.snap26
-rw-r--r--spec/frontend/pages/admin/users/components/delete_user_modal_spec.js4
-rw-r--r--spec/frontend/pipelines/test_reports/stores/mutations_spec.js15
-rw-r--r--spec/graphql/types/issue_type_spec.rb12
-rw-r--r--spec/graphql/types/project_type_spec.rb58
-rw-r--r--spec/graphql/types/snippets/blob_viewer_type_spec.rb4
-rw-r--r--spec/helpers/application_helper_spec.rb25
-rw-r--r--spec/helpers/releases_helper_spec.rb1
-rw-r--r--spec/lib/gitlab/ci/reports/test_report_summary_spec.rb64
-rw-r--r--spec/lib/gitlab/ci/reports/test_suite_summary_spec.rb10
-rw-r--r--spec/models/ci/pipeline_spec.rb18
-rw-r--r--spec/requests/api/graphql/metrics/dashboard/annotations_spec.rb22
-rw-r--r--spec/requests/api/graphql/project/jira_import_spec.rb4
-rw-r--r--spec/requests/api/graphql/project_query_spec.rb14
-rw-r--r--spec/requests/api/npm_packages_spec.rb152
-rw-r--r--spec/requests/api/project_hooks_spec.rb10
-rw-r--r--spec/serializers/test_report_summary_entity_spec.rb8
-rw-r--r--spec/serializers/test_suite_summary_entity_spec.rb2
-rw-r--r--yarn.lock8
72 files changed, 584 insertions, 360 deletions
diff --git a/app/assets/javascripts/badges/components/badge_form.vue b/app/assets/javascripts/badges/components/badge_form.vue
index 4145a4a4145..d9d1840fa94 100644
--- a/app/assets/javascripts/badges/components/badge_form.vue
+++ b/app/assets/javascripts/badges/components/badge_form.vue
@@ -184,7 +184,7 @@ export default {
@input="debouncedPreview"
/>
<div class="invalid-feedback">{{ s__('Badges|Please fill in a valid URL') }}</div>
- <span class="form-text text-muted"> {{ badgeLinkUrlExample }} </span>
+ <span class="form-text text-muted">{{ badgeLinkUrlExample }}</span>
</div>
<div class="form-group">
@@ -199,7 +199,7 @@ export default {
@input="debouncedPreview"
/>
<div class="invalid-feedback">{{ s__('Badges|Please fill in a valid URL') }}</div>
- <span class="form-text text-muted"> {{ badgeImageUrlExample }} </span>
+ <span class="form-text text-muted">{{ badgeImageUrlExample }}</span>
</div>
<div class="form-group">
@@ -210,22 +210,26 @@ export default {
:image-url="renderedImageUrl"
:link-url="renderedLinkUrl"
/>
- <p v-show="isRendering"><gl-loading-icon :inline="true" /></p>
+ <p v-show="isRendering">
+ <gl-loading-icon :inline="true" />
+ </p>
<p v-show="!renderedBadge && !isRendering" class="disabled-content">
{{ s__('Badges|No image to preview') }}
</p>
</div>
- <div v-if="isEditing" class="row-content-block">
+ <div v-if="isEditing" class="row-content-block gl-display-flex gl-justify-content-end">
+ <button class="btn btn-cancel gl-mr-4" type="button" @click="onCancel">
+ {{ __('Cancel') }}
+ </button>
<loading-button
:loading="isSaving"
:label="s__('Badges|Save changes')"
type="submit"
container-class="btn btn-success"
/>
- <button class="btn btn-cancel" type="button" @click="onCancel">{{ __('Cancel') }}</button>
</div>
- <div v-else class="form-group">
+ <div v-else class="gl-display-flex gl-justify-content-end form-group">
<loading-button
:loading="isSaving"
:label="s__('Badges|Add badge')"
diff --git a/app/assets/javascripts/behaviors/quick_submit.js b/app/assets/javascripts/behaviors/quick_submit.js
index 530ab0bd4d9..49eab3e4f09 100644
--- a/app/assets/javascripts/behaviors/quick_submit.js
+++ b/app/assets/javascripts/behaviors/quick_submit.js
@@ -72,7 +72,7 @@ $(document).on(
$this.tooltip({
container: 'body',
- html: 'true',
+ html: true,
placement: 'top',
title,
trigger: 'manual',
diff --git a/app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue b/app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue
index 71df677c7fd..e09b8e1bdd5 100644
--- a/app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue
+++ b/app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue
@@ -1,12 +1,12 @@
<script>
import { escape } from 'lodash';
-import { GlModal, GlDeprecatedButton, GlFormInput } from '@gitlab/ui';
+import { GlModal, GlButton, GlFormInput } from '@gitlab/ui';
import { s__, sprintf } from '~/locale';
export default {
components: {
GlModal,
- GlDeprecatedButton,
+ GlButton,
GlFormInput,
},
props: {
@@ -122,15 +122,18 @@ export default {
</form>
</template>
<template #modal-footer>
- <gl-deprecated-button variant="secondary" @click="onCancel">{{
- s__('Cancel')
- }}</gl-deprecated-button>
- <gl-deprecated-button :disabled="!canSubmit" variant="warning" @click="onSecondaryAction">
+ <gl-button @click="onCancel">{{ s__('Cancel') }}</gl-button>
+ <gl-button
+ :disabled="!canSubmit"
+ category="primary"
+ variant="warning"
+ @click="onSecondaryAction"
+ >
{{ secondaryAction }}
- </gl-deprecated-button>
- <gl-deprecated-button :disabled="!canSubmit" variant="danger" @click="onSubmit">{{
+ </gl-button>
+ <gl-button :disabled="!canSubmit" category="primary" variant="danger" @click="onSubmit">{{
action
- }}</gl-deprecated-button>
+ }}</gl-button>
</template>
</gl-modal>
</template>
diff --git a/app/assets/javascripts/pipelines/stores/test_reports/mutations.js b/app/assets/javascripts/pipelines/stores/test_reports/mutations.js
index 4f9e2c8c0cf..3652a12a6ba 100644
--- a/app/assets/javascripts/pipelines/stores/test_reports/mutations.js
+++ b/app/assets/javascripts/pipelines/stores/test_reports/mutations.js
@@ -10,7 +10,32 @@ export default {
},
[types.SET_SUMMARY](state, testReports) {
- Object.assign(state, { testReports });
+ const { total } = testReports;
+ state.testReports = {
+ ...testReports,
+
+ /*
+ TLDR; this is a temporary mapping that will be updated once
+ test suites have the new data schema
+
+ The backend is in the middle of updating the data schema
+ to have a `total` object containing the total data values.
+ The test suites don't have the new schema, but the summary
+ does. Currently the `test_summary.vue` component takes both
+ the summary and a test suite depending on what is being viewed.
+ This is a temporary change to map the new schema to the old until
+ we can update the schema for the test suites also.
+ Since test suites is an array, it is easier to just map the summary
+ to the old schema instead of mapping every test suite to the new.
+ */
+
+ total_time: total.time,
+ total_count: total.count,
+ success_count: total.success,
+ failed_count: total.failed,
+ skipped_count: total.skipped,
+ error_count: total.error,
+ };
},
[types.TOGGLE_LOADING](state) {
diff --git a/app/assets/javascripts/releases/stores/modules/detail/state.js b/app/assets/javascripts/releases/stores/modules/detail/state.js
index dc736c644d5..a46e750df53 100644
--- a/app/assets/javascripts/releases/stores/modules/detail/state.js
+++ b/app/assets/javascripts/releases/stores/modules/detail/state.js
@@ -6,9 +6,9 @@ export default ({
releaseAssetsDocsPath,
manageMilestonesPath,
newMilestonePath,
+ releasesPagePath,
tagName = null,
- releasesPagePath = null,
defaultBranch = null,
}) => ({
projectId,
@@ -18,6 +18,7 @@ export default ({
releaseAssetsDocsPath,
manageMilestonesPath,
newMilestonePath,
+ releasesPagePath,
/**
* The name of the tag associated with the release, provided by the backend.
@@ -25,7 +26,6 @@ export default ({
*/
tagName,
- releasesPagePath,
defaultBranch,
createFrom: defaultBranch,
diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss
index 5577d73bee7..ece678d2f02 100644
--- a/app/assets/stylesheets/pages/pipelines.scss
+++ b/app/assets/stylesheets/pages/pipelines.scss
@@ -445,6 +445,7 @@
.pipeline-tab-content {
display: flex;
width: 100%;
+ min-height: $dropdown-max-height-lg;
background-color: $gray-light;
padding: $gl-padding 0;
overflow: auto;
diff --git a/app/helpers/releases_helper.rb b/app/helpers/releases_helper.rb
index 232e10481e5..f1dff18523f 100644
--- a/app/helpers/releases_helper.rb
+++ b/app/helpers/releases_helper.rb
@@ -37,7 +37,8 @@ module ReleasesHelper
def data_for_new_release_page
new_edit_pages_shared_data.merge(
- default_branch: @project.default_branch
+ default_branch: @project.default_branch,
+ releases_page_path: project_releases_path(@project)
)
end
diff --git a/app/models/audit_event.rb b/app/models/audit_event.rb
index e7cfa30a892..335d66cc7cc 100644
--- a/app/models/audit_event.rb
+++ b/app/models/audit_event.rb
@@ -5,7 +5,7 @@ class AuditEvent < ApplicationRecord
include IgnorableColumns
include BulkInsertSafe
- PARALLEL_PERSISTENCE_COLUMNS = [:author_name, :entity_path, :target_details].freeze
+ PARALLEL_PERSISTENCE_COLUMNS = [:author_name, :entity_path, :target_details, :target_type].freeze
ignore_column :updated_at, remove_with: '13.4', remove_after: '2020-09-22'
diff --git a/app/serializers/pipeline_entity.rb b/app/serializers/pipeline_entity.rb
index 9fa0c58783d..9f26dda9eef 100644
--- a/app/serializers/pipeline_entity.rb
+++ b/app/serializers/pipeline_entity.rb
@@ -86,7 +86,7 @@ class PipelineEntity < Grape::Entity
end
expose :tests_total_count do |pipeline|
- pipeline.test_report_summary.total_count
+ pipeline.test_report_summary.total[:count]
end
private
diff --git a/app/serializers/test_report_summary_entity.rb b/app/serializers/test_report_summary_entity.rb
index 5995ca007d6..bc73c49092f 100644
--- a/app/serializers/test_report_summary_entity.rb
+++ b/app/serializers/test_report_summary_entity.rb
@@ -1,6 +1,8 @@
# frozen_string_literal: true
-class TestReportSummaryEntity < TestReportEntity
+class TestReportSummaryEntity < Grape::Entity
+ expose :total
+
expose :test_suites, using: TestSuiteSummaryEntity do |summary|
summary.test_suites.values
end
diff --git a/app/views/admin/application_settings/_account_and_limit.html.haml b/app/views/admin/application_settings/_account_and_limit.html.haml
index ee5bc909c10..184249bcaba 100644
--- a/app/views/admin/application_settings/_account_and_limit.html.haml
+++ b/app/views/admin/application_settings/_account_and_limit.html.haml
@@ -60,5 +60,5 @@
= render_if_exists 'admin/application_settings/updating_name_disabled_for_users', form: f
= render_if_exists 'admin/application_settings/availability_on_namespace_setting', form: f
-
- = f.submit _('Save changes'), class: 'btn btn-success qa-save-changes-button'
+ .gl-display-flex.gl-justify-content-end
+ = f.submit _('Save changes'), class: 'btn btn-success qa-save-changes-button'
diff --git a/app/views/admin/application_settings/_diff_limits.html.haml b/app/views/admin/application_settings/_diff_limits.html.haml
index 137b7281e0f..16b7fbe1ab6 100644
--- a/app/views/admin/application_settings/_diff_limits.html.haml
+++ b/app/views/admin/application_settings/_diff_limits.html.haml
@@ -12,5 +12,5 @@
= link_to icon('question-circle'),
help_page_path('user/admin_area/diff_limits',
anchor: 'maximum-diff-patch-size')
-
- = f.submit _('Save changes'), class: 'btn btn-success'
+ .gl-display-flex.gl-justify-content-end
+ = f.submit _('Save changes'), class: 'btn btn-success'
diff --git a/app/views/admin/application_settings/_external_authorization_service_form.html.haml b/app/views/admin/application_settings/_external_authorization_service_form.html.haml
index 73412133979..e82ed0db851 100644
--- a/app/views/admin/application_settings/_external_authorization_service_form.html.haml
+++ b/app/views/admin/application_settings/_external_authorization_service_form.html.haml
@@ -47,5 +47,5 @@
.form-group
= f.label :external_authorization_service_default_label, _('Default classification label'), class: 'label-bold'
= f.text_field :external_authorization_service_default_label, class: 'form-control'
-
- = f.submit 'Save changes', class: "btn btn-success"
+ .gl-display-flex.gl-justify-content-end
+ = f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_signin.html.haml b/app/views/admin/application_settings/_signin.html.haml
index 0972e10e12c..505be869620 100644
--- a/app/views/admin/application_settings/_signin.html.haml
+++ b/app/views/admin/application_settings/_signin.html.haml
@@ -57,5 +57,5 @@
= f.label :sign_in_text, class: 'label-bold'
= f.text_area :sign_in_text, class: 'form-control', rows: 4
.form-text.text-muted Markdown enabled
-
- = f.submit 'Save changes', class: "btn btn-success"
+ .gl-display-flex.gl-justify-content-end
+ = f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_signup.html.haml b/app/views/admin/application_settings/_signup.html.haml
index d8495c82af1..3b88696dc51 100644
--- a/app/views/admin/application_settings/_signup.html.haml
+++ b/app/views/admin/application_settings/_signup.html.haml
@@ -67,5 +67,5 @@
= f.label :after_sign_up_text, class: 'label-bold'
= f.text_area :after_sign_up_text, class: 'form-control', rows: 4
.form-text.text-muted Markdown enabled
-
- = f.submit 'Save changes', class: "btn btn-success"
+ .gl-display-flex.gl-justify-content-end
+ = f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_terminal.html.haml b/app/views/admin/application_settings/_terminal.html.haml
index 654aed54a15..25d23ea7a84 100644
--- a/app/views/admin/application_settings/_terminal.html.haml
+++ b/app/views/admin/application_settings/_terminal.html.haml
@@ -8,5 +8,5 @@
.form-text.text-muted
Maximum time for web terminal websocket connection (in seconds).
0 for unlimited.
-
- = f.submit 'Save changes', class: "btn btn-success"
+ .gl-display-flex.gl-justify-content-end
+ = f.submit 'Save changes', class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_terms.html.haml b/app/views/admin/application_settings/_terms.html.haml
index 19e7ab7c99a..a6d03ac1dde 100644
--- a/app/views/admin/application_settings/_terms.html.haml
+++ b/app/views/admin/application_settings/_terms.html.haml
@@ -15,5 +15,5 @@
= f.text_area :terms, class: 'form-control', rows: 8
.form-text.text-muted
= _("Markdown enabled")
-
- = f.submit _("Save changes"), class: "btn btn-success"
+ .gl-display-flex.gl-justify-content-end
+ = f.submit _("Save changes"), class: "btn btn-success"
diff --git a/app/views/admin/application_settings/_visibility_and_access.html.haml b/app/views/admin/application_settings/_visibility_and_access.html.haml
index 3c4fc75dbee..28208d923db 100644
--- a/app/views/admin/application_settings/_visibility_and_access.html.haml
+++ b/app/views/admin/application_settings/_visibility_and_access.html.haml
@@ -66,5 +66,5 @@
.form-group
= f.label field_name, "#{type.upcase} SSH keys", class: 'label-bold'
= f.select field_name, key_restriction_options_for_select(type), {}, class: 'form-control'
-
- = f.submit _('Save changes'), class: "btn btn-success"
+ .gl-display-flex.gl-justify-content-end
+ = f.submit _('Save changes'), class: "btn btn-success"
diff --git a/app/views/admin/application_settings/general.html.haml b/app/views/admin/application_settings/general.html.haml
index d0d8f408999..99526757a48 100644
--- a/app/views/admin/application_settings/general.html.haml
+++ b/app/views/admin/application_settings/general.html.haml
@@ -101,8 +101,8 @@
= s_('IDE|Live Preview')
%span.form-text.text-muted
= s_('IDE|Allow live previews of JavaScript projects in the Web IDE using CodeSandbox Live Preview.')
-
- = f.submit _('Save changes'), class: "btn btn-success"
+ .gl-display-flex.gl-justify-content-end
+ = f.submit _('Save changes'), class: "btn btn-success"
- if Feature.enabled?(:maintenance_mode)
%section.settings.no-animate#js-maintenance-mode-toggle{ class: ('expanded' if expanded_by_default?) }
diff --git a/app/views/groups/settings/_advanced.html.haml b/app/views/groups/settings/_advanced.html.haml
index 2a3292bf31f..98f4acaa5e3 100644
--- a/app/views/groups/settings/_advanced.html.haml
+++ b/app/views/groups/settings/_advanced.html.haml
@@ -22,8 +22,8 @@
pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS,
title: s_('GroupSettings|Please choose a group URL with no special characters.'),
"data-bind-in" => "#{'create_chat_team' if Gitlab.config.mattermost.enabled}"
-
- = f.submit s_('GroupSettings|Change group URL'), class: 'btn btn-warning'
+ .gl-display-flex.gl-justify-content-end
+ = f.submit s_('GroupSettings|Change group URL'), class: 'btn btn-warning'
.sub-section
%h4.warning-title= s_('GroupSettings|Transfer group')
@@ -39,7 +39,8 @@
%li= s_('GroupSettings|You can only transfer the group to a group you manage.')
%li= s_('GroupSettings|You will need to update your local repositories to point to the new location.')
%li= s_("GroupSettings|If the parent group's visibility is lower than the group current visibility, visibility levels for subgroups and projects will be changed to match the new parent group's visibility.")
- = f.submit s_('GroupSettings|Transfer group'), class: 'btn btn-warning'
+ .gl-display-flex.gl-justify-content-end
+ = f.submit s_('GroupSettings|Transfer group'), class: 'btn btn-warning'
= render 'groups/settings/remove', group: @group
= render_if_exists 'groups/settings/restore', group: @group
diff --git a/app/views/groups/settings/_export.html.haml b/app/views/groups/settings/_export.html.haml
index 94466b76ac8..af06cfff397 100644
--- a/app/views/groups/settings/_export.html.haml
+++ b/app/views/groups/settings/_export.html.haml
@@ -24,5 +24,6 @@
= link_to _('Download export'), download_export_group_path(group),
rel: 'nofollow', method: :get, class: 'btn btn-default', data: { qa_selector: 'download_export_link' }
- else
- = link_to _('Export group'), export_group_path(group),
- method: :post, class: 'btn btn-default', data: { qa_selector: 'export_group_link' }
+ .gl-display-flex.gl-justify-content-end
+ = link_to _('Export group'), export_group_path(group),
+ method: :post, class: 'btn btn-default', data: { qa_selector: 'export_group_link' }
diff --git a/app/views/groups/settings/_general.html.haml b/app/views/groups/settings/_general.html.haml
index 0094104e07d..e43d49b229e 100644
--- a/app/views/groups/settings/_general.html.haml
+++ b/app/views/groups/settings/_general.html.haml
@@ -19,7 +19,7 @@
= render_if_exists 'shared/repository_size_limit_setting', form: f, type: :group
- .form-group.gl-mt-3.append-bottom-20
+ .form-group.gl-mt-3.gl-mb-6
.avatar-container.rect-avatar.s90
= group_icon(@group, alt: '', class: 'avatar group-avatar s90')
= f.label :avatar, _('Group avatar'), class: 'label-bold d-block'
@@ -29,5 +29,5 @@
= link_to _('Remove avatar'), group_avatar_path(@group.to_param), data: { confirm: _('Avatar will be removed. Are you sure?')}, method: :delete, class: 'btn btn-link'
= render 'shared/visibility_level', f: f, visibility_level: @group.visibility_level, can_change_visibility_level: can_change_group_visibility_level?(@group), form_model: @group
-
- = f.submit _('Save changes'), class: 'btn btn-success mt-4 js-dirty-submit', data: { qa_selector: 'save_name_visibility_settings_button' }
+ .gl-display-flex.gl-justify-content-end
+ = f.submit _('Save changes'), class: 'btn btn-success mt-4 js-dirty-submit', data: { qa_selector: 'save_name_visibility_settings_button' }
diff --git a/app/views/groups/settings/_permanent_deletion.html.haml b/app/views/groups/settings/_permanent_deletion.html.haml
index 155efc03ffe..063ff6dd132 100644
--- a/app/views/groups/settings/_permanent_deletion.html.haml
+++ b/app/views/groups/settings/_permanent_deletion.html.haml
@@ -5,5 +5,5 @@
= _('Removing this group also removes all child projects, including archived projects, and their resources.')
%br
%strong= _('Removed group can not be restored!')
-
- = button_to _('Remove group'), '#', class: 'btn btn-remove js-confirm-danger', data: { 'confirm-danger-message' => remove_group_message(group) }
+ .gl-display-flex.gl-justify-content-end
+ = button_to _('Remove group'), '#', class: 'btn btn-remove js-confirm-danger', data: { 'confirm-danger-message' => remove_group_message(group) }
diff --git a/app/views/groups/settings/_permissions.html.haml b/app/views/groups/settings/_permissions.html.haml
index 74d6c3f01dd..86f49672d66 100644
--- a/app/views/groups/settings/_permissions.html.haml
+++ b/app/views/groups/settings/_permissions.html.haml
@@ -41,5 +41,5 @@
= render 'groups/settings/two_factor_auth', f: f
= render_if_exists 'groups/personal_access_token_expiration_policy', f: f, group: @group
= render_if_exists 'groups/member_lock_setting', f: f, group: @group
-
- = f.submit _('Save changes'), class: 'btn btn-success gl-mt-3 js-dirty-submit', data: { qa_selector: 'save_permissions_changes_button' }
+ .gl-display-flex.gl-justify-content-end
+ = f.submit _('Save changes'), class: 'btn btn-success gl-mt-3 js-dirty-submit', data: { qa_selector: 'save_permissions_changes_button' }
diff --git a/app/views/projects/_export.html.haml b/app/views/projects/_export.html.haml
index 7da15e0d8a5..41e13464b1e 100644
--- a/app/views/projects/_export.html.haml
+++ b/app/views/projects/_export.html.haml
@@ -26,5 +26,6 @@
= link_to _('Generate new export'), generate_new_export_project_path(project),
method: :post, class: "btn btn-default"
- else
- = link_to _('Export project'), export_project_path(project),
+ .gl-display-flex.gl-justify-content-end
+ = link_to _('Export project'), export_project_path(project),
method: :post, class: "btn btn-default", data: { qa_selector: 'export_project_link' }
diff --git a/app/views/projects/_visibility_modal.html.haml b/app/views/projects/_visibility_modal.html.haml
index c6e1ab079e6..144f726572b 100644
--- a/app/views/projects/_visibility_modal.html.haml
+++ b/app/views/projects/_visibility_modal.html.haml
@@ -23,8 +23,7 @@
= ("To confirm, type %{phrase_code}").html_safe % { phrase_code: '<code class="js-confirm-danger-match">%{phrase_name}</code>'.html_safe % { phrase_name: @project.full_path } }
.form-group
= text_field_tag 'confirm_path_input', '', class: 'form-control js-confirm-danger-input qa-confirm-input'
- .form-actions.clearfix
- .float-right
- %button.btn.btn-default{ type: "button", "data-dismiss": "modal" }
- = _('Cancel')
- = submit_tag _('Reduce project visibility'), class: "btn btn-danger js-confirm-danger-submit qa-confirm-button", disabled: true
+ .form-actions.gl-display-flex.gl-justify-content-end
+ %button.btn.btn-default.gl-mr-4{ type: "button", "data-dismiss": "modal" }
+ = _('Cancel')
+ = submit_tag _('Reduce project visibility'), class: "btn btn-danger js-confirm-danger-submit qa-confirm-button", disabled: true
diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml
index a2bd7e38a28..bf978b01652 100644
--- a/app/views/projects/edit.html.haml
+++ b/app/views/projects/edit.html.haml
@@ -21,9 +21,10 @@
%input{ name: 'update_section', type: 'hidden', value: 'js-shared-permissions' }
%template.js-project-permissions-form-data{ type: "application/json" }= project_permissions_panel_data_json(@project)
.js-project-permissions-form
- - if show_visibility_confirm_modal?(@project)
- = render "visibility_modal"
- = f.submit _('Save changes'), class: "btn btn-success #{('js-confirm-danger' if show_visibility_confirm_modal?(@project))}", data: { qa_selector: 'visibility_features_permissions_save_button', check_field_name: ("project[visibility_level]" if show_visibility_confirm_modal?(@project)), check_compare_value: @project.visibility_level }
+ .gl-display-flex.gl-justify-content-end
+ - if show_visibility_confirm_modal?(@project)
+ = render "visibility_modal"
+ = f.submit _('Save changes'), class: "btn btn-success #{('js-confirm-danger' if show_visibility_confirm_modal?(@project))}", data: { qa_selector: 'visibility_features_permissions_save_button', check_field_name: ("project[visibility_level]" if show_visibility_confirm_modal?(@project)), check_compare_value: @project.visibility_level }
%section.qa-merge-request-settings.rspec-merge-request-settings.settings.merge-requests-feature.no-animate#js-merge-request-settings{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:merge_requests_access_level) == 0)] }
.settings-header
@@ -37,7 +38,8 @@
= form_for @project, remote: true, html: { multipart: true, class: "merge-request-settings-form js-mr-settings-form" }, authenticity_token: true do |f|
%input{ name: 'update_section', type: 'hidden', value: 'js-merge-request-settings' }
= render 'projects/merge_request_settings', form: f
- = f.submit _('Save changes'), class: "btn btn-success qa-save-merge-request-changes rspec-save-merge-request-changes"
+ .gl-display-flex.gl-justify-content-end
+ = f.submit _('Save changes'), class: "btn btn-succes qa-save-merge-request-changes rspec-save-merge-request-changes"
= render_if_exists 'projects/merge_request_approvals_settings', expanded: expanded
@@ -68,8 +70,9 @@
.sub-section
%h4= _('Housekeeping')
%p= _('Runs a number of housekeeping tasks within the current repository, such as compressing file revisions and removing unreachable objects.')
- = link_to _('Run housekeeping'), housekeeping_project_path(@project),
- method: :post, class: "btn btn-default"
+ .gl-display-flex.gl-justify-content-end
+ = link_to _('Run housekeeping'), housekeeping_project_path(@project),
+ method: :post, class: "btn btn-default"
= render 'export', project: @project
@@ -91,7 +94,8 @@
%li= _('You will need to update your local repositories to point to the new location.')
- if @project.deployment_platform.present?
%li= _('Your deployment services will be broken, you will need to manually fix the services after renaming.')
- = f.submit _('Change path'), class: "btn btn-warning qa-change-path-button"
+ .gl-display-flex.gl-justify-content-end
+ = f.submit _('Change path'), class: "btn btn-warning qa-change-path-button"
- if can?(current_user, :change_namespace, @project)
.sub-section
@@ -107,7 +111,8 @@
%li= _('You can only transfer the project to namespaces you manage.')
%li= _('You will need to update your local repositories to point to the new location.')
%li= _('Project visibility level will be changed to match namespace rules when transferring to a group.')
- = f.submit 'Transfer project', class: "btn btn-remove js-confirm-danger qa-transfer-button", data: { "confirm-danger-message" => transfer_project_message(@project) }
+ .gl-display-flex.gl-justify-content-end
+ = f.submit 'Transfer project', class: "btn btn-remove js-confirm-danger qa-transfer-button", data: { "confirm-danger-message" => transfer_project_message(@project) }
- if @project.forked? && can?(current_user, :remove_fork_project, @project)
.sub-section
diff --git a/app/views/projects/pipelines/_with_tabs.html.haml b/app/views/projects/pipelines/_with_tabs.html.haml
index 8e78ba1c06e..f652346599d 100644
--- a/app/views/projects/pipelines/_with_tabs.html.haml
+++ b/app/views/projects/pipelines/_with_tabs.html.haml
@@ -23,7 +23,7 @@
%li.js-tests-tab-link
= link_to test_report_project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-tests', action: 'test_report', toggle: 'tab' }, class: 'test-tab' do
= s_('TestReports|Tests')
- %span.badge.badge-pill.js-test-report-badge-counter= @pipeline.test_report_summary.total_count
+ %span.badge.badge-pill.js-test-report-badge-counter= @pipeline.test_report_summary.total[:count]
= render_if_exists "projects/pipelines/tabs_holder", pipeline: @pipeline, project: @project
.tab-content
diff --git a/app/views/projects/settings/_archive.html.haml b/app/views/projects/settings/_archive.html.haml
index 3307c3775ec..ec46acc83a1 100644
--- a/app/views/projects/settings/_archive.html.haml
+++ b/app/views/projects/settings/_archive.html.haml
@@ -13,6 +13,7 @@
method: :post, class: "btn btn-success"
- else
%p= _("Archiving the project will make it entirely read only. It is hidden from the dashboard and doesn't show up in searches. %{strong_start}The repository cannot be committed to, and no issues, comments, or other entities can be created.%{strong_end}").html_safe % { strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe }
- = link_to _('Archive project'), archive_project_path(@project),
+ .gl-display-flex.gl-justify-content-end
+ = link_to _('Archive project'), archive_project_path(@project),
data: { confirm: _("Are you sure that you want to archive this project?"), qa_selector: 'archive_project_link' },
method: :post, class: "btn btn-warning"
diff --git a/app/views/projects/settings/_general.html.haml b/app/views/projects/settings/_general.html.haml
index fde6f79395b..50f80fd1e2f 100644
--- a/app/views/projects/settings/_general.html.haml
+++ b/app/views/projects/settings/_general.html.haml
@@ -40,5 +40,5 @@
%hr
= link_to _('Remove avatar'), project_avatar_path(@project), data: { confirm: _('Avatar will be removed. Are you sure?')}, method: :delete, class: 'btn btn-link'
-
- = f.submit _('Save changes'), class: "btn btn-success mt-4 qa-save-naming-topics-avatar-button"
+ .gl-display-flex.gl-justify-content-end
+ = f.submit _('Save changes'), class: "btn btn-success mt-4 qa-save-naming-topics-avatar-button"
diff --git a/app/views/shared/_confirm_modal.html.haml b/app/views/shared/_confirm_modal.html.haml
index ecb462205b0..dc95bcdc756 100644
--- a/app/views/shared/_confirm_modal.html.haml
+++ b/app/views/shared/_confirm_modal.html.haml
@@ -17,5 +17,5 @@
.form-group
= text_field_tag 'confirm_name_input', '', class: 'form-control js-confirm-danger-input qa-confirm-input'
- .form-actions
+ .form-actions.gl-display-flex.gl-justify-content-end
= submit_tag _('Confirm'), class: "btn btn-danger js-confirm-danger-submit qa-confirm-button"
diff --git a/changelogs/unreleased/220322-refactor-target-type.yml b/changelogs/unreleased/220322-refactor-target-type.yml
new file mode 100644
index 00000000000..559cd7f8f5c
--- /dev/null
+++ b/changelogs/unreleased/220322-refactor-target-type.yml
@@ -0,0 +1,5 @@
+---
+title: Add new target_type column on audit_events table
+merge_request: 36198
+author:
+type: changed
diff --git a/changelogs/unreleased/231348-fix-parallel-jobs-dropdown-from-cutting-off-in-the-pipeline-graph.yml b/changelogs/unreleased/231348-fix-parallel-jobs-dropdown-from-cutting-off-in-the-pipeline-graph.yml
new file mode 100644
index 00000000000..8d2f7bcfda5
--- /dev/null
+++ b/changelogs/unreleased/231348-fix-parallel-jobs-dropdown-from-cutting-off-in-the-pipeline-graph.yml
@@ -0,0 +1,5 @@
+---
+title: Fix parallel jobs dropdown from cutting off in small pipeline graphs
+merge_request: 39108
+author:
+type: fixed
diff --git a/changelogs/unreleased/nfriend-fix-quick-submit.yml b/changelogs/unreleased/nfriend-fix-quick-submit.yml
new file mode 100644
index 00000000000..26f8a46c556
--- /dev/null
+++ b/changelogs/unreleased/nfriend-fix-quick-submit.yml
@@ -0,0 +1,5 @@
+---
+title: Fix submit button tooltips for forms with quick submit behavior
+merge_request: 39225
+author:
+type: fixed
diff --git a/changelogs/unreleased/nfriend-make-tag-name-required-on-new-release-page.yml b/changelogs/unreleased/nfriend-make-tag-name-required-on-new-release-page.yml
new file mode 100644
index 00000000000..6e357acb14d
--- /dev/null
+++ b/changelogs/unreleased/nfriend-make-tag-name-required-on-new-release-page.yml
@@ -0,0 +1,5 @@
+---
+title: Fix cancel button on New Release page
+merge_request: 39144
+author:
+type: fixed
diff --git a/db/post_migrate/20200810100921_add_target_type_to_audit_event.rb b/db/post_migrate/20200810100921_add_target_type_to_audit_event.rb
new file mode 100644
index 00000000000..8dde5945f0d
--- /dev/null
+++ b/db/post_migrate/20200810100921_add_target_type_to_audit_event.rb
@@ -0,0 +1,121 @@
+# frozen_string_literal: true
+
+class AddTargetTypeToAuditEvent < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::SchemaHelpers
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+ SOURCE_TABLE_NAME = 'audit_events'
+ PARTITIONED_TABLE_NAME = 'audit_events_part_5fc467ac26'
+ TRIGGER_FUNCTION_NAME = 'table_sync_function_2be879775d'
+
+ def up
+ with_lock_retries do
+ # rubocop:disable Migration/AddLimitToTextColumns
+ add_column('audit_events', :target_type, :text)
+ add_column('audit_events_part_5fc467ac26', :target_type, :text)
+ # rubocop:enable Migration/AddLimitToTextColumns
+
+ create_trigger_function(TRIGGER_FUNCTION_NAME, replace: true) do
+ <<~SQL
+ IF (TG_OP = 'DELETE') THEN
+ DELETE FROM #{PARTITIONED_TABLE_NAME} where id = OLD.id;
+ ELSIF (TG_OP = 'UPDATE') THEN
+ UPDATE #{PARTITIONED_TABLE_NAME}
+ SET author_id = NEW.author_id,
+ type = NEW.type,
+ entity_id = NEW.entity_id,
+ entity_type = NEW.entity_type,
+ details = NEW.details,
+ ip_address = NEW.ip_address,
+ author_name = NEW.author_name,
+ entity_path = NEW.entity_path,
+ target_details = NEW.target_details,
+ target_type = NEW.target_type,
+ created_at = NEW.created_at
+ WHERE #{PARTITIONED_TABLE_NAME}.id = NEW.id;
+ ELSIF (TG_OP = 'INSERT') THEN
+ INSERT INTO #{PARTITIONED_TABLE_NAME} (id,
+ author_id,
+ type,
+ entity_id,
+ entity_type,
+ details,
+ ip_address,
+ author_name,
+ entity_path,
+ target_details,
+ target_type,
+ created_at)
+ VALUES (NEW.id,
+ NEW.author_id,
+ NEW.type,
+ NEW.entity_id,
+ NEW.entity_type,
+ NEW.details,
+ NEW.ip_address,
+ NEW.author_name,
+ NEW.entity_path,
+ NEW.target_details,
+ NEW.target_type,
+ NEW.created_at);
+ END IF;
+ RETURN NULL;
+ SQL
+ end
+ end
+ end
+
+ def down
+ with_lock_retries do
+ remove_column SOURCE_TABLE_NAME, :target_type
+
+ create_trigger_function(TRIGGER_FUNCTION_NAME, replace: true) do
+ <<~SQL
+ IF (TG_OP = 'DELETE') THEN
+ DELETE FROM #{PARTITIONED_TABLE_NAME} where id = OLD.id;
+ ELSIF (TG_OP = 'UPDATE') THEN
+ UPDATE #{PARTITIONED_TABLE_NAME}
+ SET author_id = NEW.author_id,
+ type = NEW.type,
+ entity_id = NEW.entity_id,
+ entity_type = NEW.entity_type,
+ details = NEW.details,
+ ip_address = NEW.ip_address,
+ author_name = NEW.author_name,
+ entity_path = NEW.entity_path,
+ target_details = NEW.target_details,
+ created_at = NEW.created_at
+ WHERE #{PARTITIONED_TABLE_NAME}.id = NEW.id;
+ ELSIF (TG_OP = 'INSERT') THEN
+ INSERT INTO #{PARTITIONED_TABLE_NAME} (id,
+ author_id,
+ type,
+ entity_id,
+ entity_type,
+ details,
+ ip_address,
+ author_name,
+ entity_path,
+ target_details,
+ created_at)
+ VALUES (NEW.id,
+ NEW.author_id,
+ NEW.type,
+ NEW.entity_id,
+ NEW.entity_type,
+ NEW.details,
+ NEW.ip_address,
+ NEW.author_name,
+ NEW.entity_path,
+ NEW.target_details,
+ NEW.created_at);
+ END IF;
+ RETURN NULL;
+ SQL
+ end
+
+ remove_column PARTITIONED_TABLE_NAME, :target_type
+ end
+ end
+end
diff --git a/db/post_migrate/20200810101029_add_text_limit_to_audit_event_target_type.rb b/db/post_migrate/20200810101029_add_text_limit_to_audit_event_target_type.rb
new file mode 100644
index 00000000000..2a5ea9cd245
--- /dev/null
+++ b/db/post_migrate/20200810101029_add_text_limit_to_audit_event_target_type.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class AddTextLimitToAuditEventTargetType < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+ DOWNTIME = false
+ SOURCE_TABLE_NAME = 'audit_events'
+ PARTITIONED_TABLE_NAME = 'audit_events_part_5fc467ac26'
+
+ disable_ddl_transaction!
+
+ def up
+ add_text_limit(SOURCE_TABLE_NAME, :target_type, 255)
+ add_text_limit(PARTITIONED_TABLE_NAME, :target_type, 255)
+ end
+
+ def down
+ remove_text_limit(SOURCE_TABLE_NAME, :target_type)
+ remove_text_limit(PARTITIONED_TABLE_NAME, :target_type)
+ end
+end
diff --git a/db/schema_migrations/20200810100921 b/db/schema_migrations/20200810100921
new file mode 100644
index 00000000000..14dc5a41721
--- /dev/null
+++ b/db/schema_migrations/20200810100921
@@ -0,0 +1 @@
+fe96df46a5f360cafe8f9816c6dfc2d00afdcf458fb38ace37ce59999dba2413 \ No newline at end of file
diff --git a/db/schema_migrations/20200810101029 b/db/schema_migrations/20200810101029
new file mode 100644
index 00000000000..59e0a236f3c
--- /dev/null
+++ b/db/schema_migrations/20200810101029
@@ -0,0 +1 @@
+8bb03ea2ded957a41aa1efd60a9908a3c597aaaade9190f8f1515bfd2ab9a282 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index c215ba1eba5..6e9719dc627 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -29,6 +29,7 @@ ELSIF (TG_OP = 'UPDATE') THEN
author_name = NEW.author_name,
entity_path = NEW.entity_path,
target_details = NEW.target_details,
+ target_type = NEW.target_type,
created_at = NEW.created_at
WHERE audit_events_part_5fc467ac26.id = NEW.id;
ELSIF (TG_OP = 'INSERT') THEN
@@ -42,6 +43,7 @@ ELSIF (TG_OP = 'INSERT') THEN
author_name,
entity_path,
target_details,
+ target_type,
created_at)
VALUES (NEW.id,
NEW.author_id,
@@ -53,6 +55,7 @@ ELSIF (TG_OP = 'INSERT') THEN
NEW.author_name,
NEW.entity_path,
NEW.target_details,
+ NEW.target_type,
NEW.created_at);
END IF;
RETURN NULL;
@@ -74,8 +77,10 @@ CREATE TABLE public.audit_events_part_5fc467ac26 (
entity_path text,
target_details text,
created_at timestamp without time zone NOT NULL,
+ target_type text,
CONSTRAINT check_492aaa021d CHECK ((char_length(entity_path) <= 5500)),
CONSTRAINT check_83ff8406e2 CHECK ((char_length(author_name) <= 255)),
+ CONSTRAINT check_97a8c868e7 CHECK ((char_length(target_type) <= 255)),
CONSTRAINT check_d493ec90b5 CHECK ((char_length(target_details) <= 5500))
)
PARTITION BY RANGE (created_at);
@@ -9470,7 +9475,9 @@ CREATE TABLE public.audit_events (
author_name text,
entity_path text,
target_details text,
+ target_type text,
CONSTRAINT check_492aaa021d CHECK ((char_length(entity_path) <= 5500)),
+ CONSTRAINT check_82294106dd CHECK ((char_length(target_type) <= 255)),
CONSTRAINT check_83ff8406e2 CHECK ((char_length(author_name) <= 255)),
CONSTRAINT check_d493ec90b5 CHECK ((char_length(target_details) <= 5500))
);
diff --git a/doc/api/projects.md b/doc/api/projects.md
index 22efce2141b..0b59e0193f9 100644
--- a/doc/api/projects.md
+++ b/doc/api/projects.md
@@ -1985,6 +1985,7 @@ GET /projects/:id/hooks/:hook_id
"job_events": true,
"pipeline_events": true,
"wiki_page_events": true,
+ "deployment_events": true,
"enable_ssl_verification": true,
"created_at": "2012-10-12T17:04:47Z"
}
@@ -2013,6 +2014,7 @@ POST /projects/:id/hooks
| `job_events` | boolean | no | Trigger hook on job events |
| `pipeline_events` | boolean | no | Trigger hook on pipeline events |
| `wiki_page_events` | boolean | no | Trigger hook on wiki events |
+| `deployment_events` | boolean | no | Trigger hook on deployment events |
| `enable_ssl_verification` | boolean | no | Do SSL verification when triggering the hook |
| `token` | string | no | Secret token to validate received payloads; this will not be returned in the response |
@@ -2040,6 +2042,7 @@ PUT /projects/:id/hooks/:hook_id
| `job_events` | boolean | no | Trigger hook on job events |
| `pipeline_events` | boolean | no | Trigger hook on pipeline events |
| `wiki_events` | boolean | no | Trigger hook on wiki events |
+| `deployment_events` | boolean | no | Trigger hook on deployment events |
| `enable_ssl_verification` | boolean | no | Do SSL verification when triggering the hook |
| `token` | string | no | Secret token to validate received payloads; this will not be returned in the response |
diff --git a/doc/user/compliance/license_compliance/index.md b/doc/user/compliance/license_compliance/index.md
index ad1f49708aa..3ea3180992f 100644
--- a/doc/user/compliance/license_compliance/index.md
+++ b/doc/user/compliance/license_compliance/index.md
@@ -398,6 +398,30 @@ specifying a [`BUNDLE_SSL_CA_CERT`](https://bundler.io/v2.0/man/bundle-config.1.
[environment variable](../../../ci/variables/README.md#custom-environment-variables)
in the job definition.
+### Configuring Cargo projects
+
+#### Using private Cargo registries
+
+If you have a private Cargo registry you can use the
+[`registries`](https://doc.rust-lang.org/cargo/reference/registries.html)
+setting to specify its location.
+
+For example:
+
+```toml
+[registries]
+my-registry = { index = "https://my-intranet:8080/git/index" }
+```
+
+#### Custom root certificates for Cargo
+
+To supply a custom root certificate to complete TLS verification, do one of the following:
+
+- Use the `ADDITIONAL_CA_CERT_BUNDLE` [environment variable](#available-variables).
+- Specify a [`CARGO_HTTP_CAINFO`](https://doc.rust-lang.org/cargo/reference/environment-variables.html)
+ [environment variable](../../../ci/variables/README.md#custom-environment-variables)
+ in the job definition.
+
### Configuring Composer projects
#### Using private Composer registries
diff --git a/lib/api/entities/project_hook.rb b/lib/api/entities/project_hook.rb
index cdd3714ed64..751f9500252 100644
--- a/lib/api/entities/project_hook.rb
+++ b/lib/api/entities/project_hook.rb
@@ -4,7 +4,7 @@ module API
module Entities
class ProjectHook < Hook
expose :project_id, :issues_events, :confidential_issues_events
- expose :note_events, :confidential_note_events, :pipeline_events, :wiki_page_events
+ expose :note_events, :confidential_note_events, :pipeline_events, :wiki_page_events, :deployment_events
expose :job_events
expose :push_events_branch_filter
end
diff --git a/lib/api/project_hooks.rb b/lib/api/project_hooks.rb
index 7cea44e6304..e68a3b106b1 100644
--- a/lib/api/project_hooks.rb
+++ b/lib/api/project_hooks.rb
@@ -20,6 +20,7 @@ module API
optional :job_events, type: Boolean, desc: "Trigger hook on job events"
optional :pipeline_events, type: Boolean, desc: "Trigger hook on pipeline events"
optional :wiki_page_events, type: Boolean, desc: "Trigger hook on wiki events"
+ optional :deployment_events, type: Boolean, desc: "Trigger hook on deployment events"
optional :enable_ssl_verification, type: Boolean, desc: "Do SSL verification when triggering the hook"
optional :token, type: String, desc: "Secret token to validate received payloads; this will not be returned in the response"
optional :push_events_branch_filter, type: String, desc: "Trigger hook on specified branch only"
diff --git a/lib/gitlab/ci/reports/test_report_summary.rb b/lib/gitlab/ci/reports/test_report_summary.rb
index 85b83b790e7..3e7227b7223 100644
--- a/lib/gitlab/ci/reports/test_report_summary.rb
+++ b/lib/gitlab/ci/reports/test_report_summary.rb
@@ -4,42 +4,17 @@ module Gitlab
module Ci
module Reports
class TestReportSummary
- attr_reader :all_results
-
- def initialize(all_results)
- @all_results = all_results
+ def initialize(build_report_results)
+ @build_report_results = build_report_results
+ @suite_summary = TestSuiteSummary.new(@build_report_results)
end
def total
- TestSuiteSummary.new(all_results)
- end
-
- def total_time
- total.total_time
- end
-
- def total_count
- total.total_count
- end
-
- def success_count
- total.success_count
- end
-
- def failed_count
- total.failed_count
- end
-
- def skipped_count
- total.skipped_count
- end
-
- def error_count
- total.error_count
+ @suite_summary.to_h
end
def test_suites
- all_results
+ @build_report_results
.group_by(&:tests_name)
.transform_values { |results| TestSuiteSummary.new(results) }
end
diff --git a/lib/gitlab/ci/reports/test_suite_summary.rb b/lib/gitlab/ci/reports/test_suite_summary.rb
index f9b0bedb712..32b06d0ad49 100644
--- a/lib/gitlab/ci/reports/test_suite_summary.rb
+++ b/lib/gitlab/ci/reports/test_suite_summary.rb
@@ -4,45 +4,54 @@ module Gitlab
module Ci
module Reports
class TestSuiteSummary
- attr_reader :results
-
- def initialize(results)
- @results = results
+ def initialize(build_report_results)
+ @build_report_results = build_report_results
end
def name
- @name ||= results.first.tests_name
+ @name ||= @build_report_results.first.tests_name
end
# rubocop: disable CodeReuse/ActiveRecord
def build_ids
- results.pluck(:build_id)
+ @build_report_results.pluck(:build_id)
end
def total_time
- @total_time ||= results.sum(&:tests_duration)
+ @total_time ||= @build_report_results.sum(&:tests_duration)
end
def success_count
- @success_count ||= results.sum(&:tests_success)
+ @success_count ||= @build_report_results.sum(&:tests_success)
end
def failed_count
- @failed_count ||= results.sum(&:tests_failed)
+ @failed_count ||= @build_report_results.sum(&:tests_failed)
end
def skipped_count
- @skipped_count ||= results.sum(&:tests_skipped)
+ @skipped_count ||= @build_report_results.sum(&:tests_skipped)
end
def error_count
- @error_count ||= results.sum(&:tests_errored)
+ @error_count ||= @build_report_results.sum(&:tests_errored)
end
def total_count
@total_count ||= [success_count, failed_count, skipped_count, error_count].sum
end
# rubocop: disable CodeReuse/ActiveRecord
+
+ def to_h
+ {
+ time: total_time,
+ count: total_count,
+ success: success_count,
+ failed: failed_count,
+ skipped: skipped_count,
+ error: error_count
+ }
+ end
end
end
end
diff --git a/lib/gitlab/metrics/templates/k8s_single-stat.metrics-dashboard.yml b/lib/gitlab/metrics/templates/k8s_single-stat.metrics-dashboard.yml
new file mode 100644
index 00000000000..829e12357ff
--- /dev/null
+++ b/lib/gitlab/metrics/templates/k8s_single-stat.metrics-dashboard.yml
@@ -0,0 +1,17 @@
+# Only one dashboard should be defined per file
+# More info: https://docs.gitlab.com/ee/operations/metrics/dashboards/yaml.html
+dashboard: 'Single Stat Panel Example'
+
+# For more information about the required properties of panel_groups
+# please visit: https://docs.gitlab.com/ee/operations/metrics/dashboards/yaml.html#panel-group-panel_groups-properties
+panel_groups:
+ - group: 'Server Statistics'
+ panels:
+ - title: "Memory usage"
+ # More information about heatmap panel types can be found here:
+ # https://docs.gitlab.com/ee/operations/metrics/dashboards/panel_types.html#single-stat
+ type: "single-stat"
+ metrics:
+ - query: 'avg(sum(container_memory_usage_bytes{container!="POD",pod=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}) by (job)) without (job) / count(avg(container_memory_usage_bytes{container!="POD",pod=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}) without (job)) /1024/1024 OR avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}) by (job)) without (job) / count(avg(container_memory_usage_bytes{container_name!="POD",pod_name=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}) without (job)) /1024/1024'
+ unit: 'MB'
+ label: "Used memory"
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 576515c5b18..d0fb8a9eedb 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -21399,6 +21399,9 @@ msgstr ""
msgid "Security Dashboard"
msgstr ""
+msgid "Security Dashboard - Settings"
+msgstr ""
+
msgid "Security dashboard"
msgstr ""
diff --git a/package.json b/package.json
index 20a19462875..b8293afcbc0 100644
--- a/package.json
+++ b/package.json
@@ -43,7 +43,7 @@
"@babel/preset-env": "^7.10.1",
"@gitlab/at.js": "1.5.5",
"@gitlab/svgs": "1.158.0",
- "@gitlab/ui": "18.6.0",
+ "@gitlab/ui": "18.6.1",
"@gitlab/visual-review-tools": "1.6.1",
"@rails/actioncable": "^6.0.3-1",
"@sentry/browser": "^5.10.2",
diff --git a/spec/controllers/projects/pipelines/tests_controller_spec.rb b/spec/controllers/projects/pipelines/tests_controller_spec.rb
index e24321fc1e2..61118487e20 100644
--- a/spec/controllers/projects/pipelines/tests_controller_spec.rb
+++ b/spec/controllers/projects/pipelines/tests_controller_spec.rb
@@ -19,7 +19,7 @@ RSpec.describe Projects::Pipelines::TestsController do
get_tests_summary_json
expect(response).to have_gitlab_http_status(:ok)
- expect(json_response['total_count']).to eq(2)
+ expect(json_response.dig('total', 'count')).to eq(2)
end
end
@@ -28,7 +28,7 @@ RSpec.describe Projects::Pipelines::TestsController do
get_tests_summary_json
expect(response).to have_gitlab_http_status(:ok)
- expect(json_response['total_count']).to eq(0)
+ expect(json_response.dig('total', 'count')).to eq(0)
end
end
end
diff --git a/spec/factories/project_hooks.rb b/spec/factories/project_hooks.rb
index 6592141e26d..15b240acba4 100644
--- a/spec/factories/project_hooks.rb
+++ b/spec/factories/project_hooks.rb
@@ -21,6 +21,7 @@ FactoryBot.define do
job_events { true }
pipeline_events { true }
wiki_page_events { true }
+ deployment_events { true }
end
end
end
diff --git a/spec/features/projects/pipelines/pipeline_spec.rb b/spec/features/projects/pipelines/pipeline_spec.rb
index 974e702cd7c..26c46190e7d 100644
--- a/spec/features/projects/pipelines/pipeline_spec.rb
+++ b/spec/features/projects/pipelines/pipeline_spec.rb
@@ -371,7 +371,7 @@ RSpec.describe 'Pipeline', :js do
context 'with test reports' do
it 'shows badge counter in Tests tab' do
- expect(page.find('.js-test-report-badge-counter').text).to eq(pipeline.test_report_summary.total_count.to_s)
+ expect(page.find('.js-test-report-badge-counter').text).to eq(pipeline.test_report_summary.total[:count].to_s)
end
it 'calls summary.json endpoint', :js do
diff --git a/spec/frontend/badges/components/badge_form_spec.js b/spec/frontend/badges/components/badge_form_spec.js
index d61bd29ca9d..f0752085b48 100644
--- a/spec/frontend/badges/components/badge_form_spec.js
+++ b/spec/frontend/badges/components/badge_form_spec.js
@@ -182,11 +182,11 @@ describe('BadgeForm component', () => {
const buttons = vm.$el.querySelectorAll('.row-content-block button');
expect(buttons.length).toBe(2);
- const buttonSaveElement = buttons[0];
+ const buttonSaveElement = buttons[1];
expect(buttonSaveElement).toBeVisible();
expect(buttonSaveElement).toHaveText('Save changes');
- const buttonCancelElement = buttons[1];
+ const buttonCancelElement = buttons[0];
expect(buttonCancelElement).toBeVisible();
expect(buttonCancelElement).toHaveText('Cancel');
diff --git a/spec/frontend/pages/admin/users/components/__snapshots__/delete_user_modal_spec.js.snap b/spec/frontend/pages/admin/users/components/__snapshots__/delete_user_modal_spec.js.snap
index 82589e5147c..4148c263d28 100644
--- a/spec/frontend/pages/admin/users/components/__snapshots__/delete_user_modal_spec.js.snap
+++ b/spec/frontend/pages/admin/users/components/__snapshots__/delete_user_modal_spec.js.snap
@@ -37,29 +37,35 @@ exports[`User Operation confirmation modal renders modal with form included 1`]
value=""
/>
</form>
- <gl-deprecated-button-stub
- size="md"
- variant="secondary"
+ <gl-button-stub
+ category="tertiary"
+ icon=""
+ size="medium"
+ variant="default"
>
Cancel
- </gl-deprecated-button-stub>
+ </gl-button-stub>
- <gl-deprecated-button-stub
+ <gl-button-stub
+ category="primary"
disabled="true"
- size="md"
+ icon=""
+ size="medium"
variant="warning"
>
secondaryAction
- </gl-deprecated-button-stub>
+ </gl-button-stub>
- <gl-deprecated-button-stub
+ <gl-button-stub
+ category="primary"
disabled="true"
- size="md"
+ icon=""
+ size="medium"
variant="danger"
>
action
- </gl-deprecated-button-stub>
+ </gl-button-stub>
</div>
`;
diff --git a/spec/frontend/pages/admin/users/components/delete_user_modal_spec.js b/spec/frontend/pages/admin/users/components/delete_user_modal_spec.js
index 16b0bd305cd..3efefa8137f 100644
--- a/spec/frontend/pages/admin/users/components/delete_user_modal_spec.js
+++ b/spec/frontend/pages/admin/users/components/delete_user_modal_spec.js
@@ -1,5 +1,5 @@
import { shallowMount } from '@vue/test-utils';
-import { GlDeprecatedButton, GlFormInput } from '@gitlab/ui';
+import { GlButton, GlFormInput } from '@gitlab/ui';
import DeleteUserModal from '~/pages/admin/users/components/delete_user_modal.vue';
import ModalStub from './stubs/modal_stub';
@@ -13,7 +13,7 @@ describe('User Operation confirmation modal', () => {
const findButton = variant =>
wrapper
- .findAll(GlDeprecatedButton)
+ .findAll(GlButton)
.filter(w => w.attributes('variant') === variant)
.at(0);
const findForm = () => wrapper.find('form');
diff --git a/spec/frontend/pipelines/test_reports/stores/mutations_spec.js b/spec/frontend/pipelines/test_reports/stores/mutations_spec.js
index 6df6fd3cf3c..b935029bc6a 100644
--- a/spec/frontend/pipelines/test_reports/stores/mutations_spec.js
+++ b/spec/frontend/pipelines/test_reports/stores/mutations_spec.js
@@ -44,10 +44,21 @@ describe('Mutations TestReports Store', () => {
describe('set summary', () => {
it('should set summary', () => {
- const summary = { total_count: 1 };
+ const summary = {
+ total: { time: 0, count: 10, success: 1, failed: 2, skipped: 3, error: 4 },
+ };
+ const expectedSummary = {
+ ...summary,
+ total_time: 0,
+ total_count: 10,
+ success_count: 1,
+ failed_count: 2,
+ skipped_count: 3,
+ error_count: 4,
+ };
mutations[types.SET_SUMMARY](mockState, summary);
- expect(mockState.testReports).toEqual(summary);
+ expect(mockState.testReports).toEqual(expectedSummary);
});
});
diff --git a/spec/graphql/types/issue_type_spec.rb b/spec/graphql/types/issue_type_spec.rb
index 4a86b07ab1c..24353f8fe3a 100644
--- a/spec/graphql/types/issue_type_spec.rb
+++ b/spec/graphql/types/issue_type_spec.rb
@@ -132,14 +132,14 @@ RSpec.describe GitlabSchema.types['Issue'] do
let(:query) do
%(
query {
- project(fullPath:"#{project.full_path}"){
- issue(iid:"#{issue.iid}"){
+ project(fullPath: "#{project.full_path}") {
+ issue(iid: "#{issue.iid}") {
descriptionHtml
- notes{
- edges{
- node{
+ notes {
+ edges {
+ node {
bodyHtml
- author{
+ author {
username
}
body
diff --git a/spec/graphql/types/project_type_spec.rb b/spec/graphql/types/project_type_spec.rb
index 87984dd0021..3fcd8f05c86 100644
--- a/spec/graphql/types/project_type_spec.rb
+++ b/spec/graphql/types/project_type_spec.rb
@@ -148,47 +148,47 @@ RSpec.describe GitlabSchema.types['Project'] do
let_it_be(:query) do
%(
query {
- project(fullPath: "#{project.full_path}") {
- sastCiConfiguration {
- global {
+ project(fullPath: "#{project.full_path}") {
+ sastCiConfiguration {
+ global {
+ nodes {
+ type
+ options {
nodes {
- type
- options {
- nodes {
- label
- value
- }
- }
- field
label
- defaultValue
value
}
}
- pipeline {
+ field
+ label
+ defaultValue
+ value
+ }
+ }
+ pipeline {
+ nodes {
+ type
+ options {
nodes {
- type
- options {
- nodes {
- label
- value
- }
- }
- field
label
- defaultValue
value
}
}
- analyzers {
- nodes {
- name
- label
- enabled
- }
- }
+ field
+ label
+ defaultValue
+ value
+ }
+ }
+ analyzers {
+ nodes {
+ name
+ label
+ enabled
}
}
+ }
+ }
}
)
end
diff --git a/spec/graphql/types/snippets/blob_viewer_type_spec.rb b/spec/graphql/types/snippets/blob_viewer_type_spec.rb
index 8210eb9a95c..295df992c67 100644
--- a/spec/graphql/types/snippets/blob_viewer_type_spec.rb
+++ b/spec/graphql/types/snippets/blob_viewer_type_spec.rb
@@ -44,7 +44,7 @@ RSpec.describe GitlabSchema.types['SnippetBlobViewer'] do
let(:query) do
%(
query {
- snippets(ids:"#{snippet.to_global_id}"){
+ snippets(ids: "#{snippet.to_global_id}") {
edges {
node {
blob {
@@ -70,7 +70,7 @@ RSpec.describe GitlabSchema.types['SnippetBlobViewer'] do
let(:query) do
%(
query {
- snippets(ids:"#{snippet.to_global_id}"){
+ snippets(ids: "#{snippet.to_global_id}") {
edges {
node {
blob {
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb
index 3538fe98628..ce4e73bdc55 100644
--- a/spec/helpers/application_helper_spec.rb
+++ b/spec/helpers/application_helper_spec.rb
@@ -168,15 +168,38 @@ RSpec.describe ApplicationHelper do
it { expect(helper.active_when(false)).to eq(nil) }
end
+ describe '#promo_host' do
+ subject { helper.promo_host }
+
+ it 'returns the url' do
+ is_expected.to eq('about.gitlab.com')
+ end
+ end
+
+ describe '#promo_url' do
+ subject { helper.promo_url }
+
+ it 'returns the url' do
+ is_expected.to eq('https://about.gitlab.com')
+ end
+
+ it 'changes if promo_host changes' do
+ allow(helper).to receive(:promo_host).and_return('foobar.baz')
+
+ is_expected.to eq('https://foobar.baz')
+ end
+ end
+
describe '#contact_sales_url' do
subject { helper.contact_sales_url }
- it 'passes a smoke test' do
+ it 'returns the url' do
is_expected.to eq('https://about.gitlab.com/sales')
end
it 'changes if promo_url changes' do
allow(helper).to receive(:promo_url).and_return('https://somewhere.else')
+
is_expected.to eq('https://somewhere.else/sales')
end
end
diff --git a/spec/helpers/releases_helper_spec.rb b/spec/helpers/releases_helper_spec.rb
index 82fc799f9b0..6ae99648ff3 100644
--- a/spec/helpers/releases_helper_spec.rb
+++ b/spec/helpers/releases_helper_spec.rb
@@ -80,6 +80,7 @@ RSpec.describe ReleasesHelper do
describe '#data_for_new_release_page' do
it 'has the needed data to display the "new release" page' do
keys = %i(project_id
+ releases_page_path
markdown_preview_path
markdown_docs_path
update_release_api_docs_path
diff --git a/spec/lib/gitlab/ci/reports/test_report_summary_spec.rb b/spec/lib/gitlab/ci/reports/test_report_summary_spec.rb
index 70d82851125..555682cc006 100644
--- a/spec/lib/gitlab/ci/reports/test_report_summary_spec.rb
+++ b/spec/lib/gitlab/ci/reports/test_report_summary_spec.rb
@@ -11,68 +11,8 @@ RSpec.describe Gitlab::Ci::Reports::TestReportSummary do
subject { test_report_summary.total }
context 'when test report summary has several build report results' do
- it 'returns test suite summary object' do
- expect(subject).to be_a_kind_of(Gitlab::Ci::Reports::TestSuiteSummary)
- end
- end
- end
-
- describe '#total_time' do
- subject { test_report_summary.total_time }
-
- context 'when test report summary has several build report results' do
- it 'returns the total' do
- expect(subject).to eq(0.84)
- end
- end
- end
-
- describe '#total_count' do
- subject { test_report_summary.total_count }
-
- context 'when test report summary has several build report results' do
- it 'returns the total count' do
- expect(subject).to eq(4)
- end
- end
- end
-
- describe '#success_count' do
- subject { test_report_summary.success_count }
-
- context 'when test suite summary has several build report results' do
- it 'returns the total success' do
- expect(subject).to eq(2)
- end
- end
- end
-
- describe '#failed_count' do
- subject { test_report_summary.failed_count }
-
- context 'when test suite summary has several build report results' do
- it 'returns the total failed' do
- expect(subject).to eq(0)
- end
- end
- end
-
- describe '#error_count' do
- subject { test_report_summary.error_count }
-
- context 'when test suite summary has several build report results' do
- it 'returns the total errored' do
- expect(subject).to eq(2)
- end
- end
- end
-
- describe '#skipped_count' do
- subject { test_report_summary.skipped_count }
-
- context 'when test suite summary has several build report results' do
- it 'returns the total skipped' do
- expect(subject).to eq(0)
+ it 'returns all the total count in a hash' do
+ expect(subject).to include(:time, :count, :success, :failed, :skipped, :error)
end
end
end
diff --git a/spec/lib/gitlab/ci/reports/test_suite_summary_spec.rb b/spec/lib/gitlab/ci/reports/test_suite_summary_spec.rb
index 12c96acdcf3..a98d3db4e82 100644
--- a/spec/lib/gitlab/ci/reports/test_suite_summary_spec.rb
+++ b/spec/lib/gitlab/ci/reports/test_suite_summary_spec.rb
@@ -86,4 +86,14 @@ RSpec.describe Gitlab::Ci::Reports::TestSuiteSummary do
end
end
end
+
+ describe '#to_h' do
+ subject { test_suite_summary.to_h }
+
+ context 'when test suite summary has several build report results' do
+ it 'returns the total as a hash' do
+ expect(subject).to include(:time, :count, :success, :failed, :skipped, :error)
+ end
+ end
+ end
end
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb
index 836cbf90829..20befc6f605 100644
--- a/spec/models/ci/pipeline_spec.rb
+++ b/spec/models/ci/pipeline_spec.rb
@@ -3069,24 +3069,14 @@ RSpec.describe Ci::Pipeline, :mailer do
create(:ci_build, :success, :report_results, name: 'java', pipeline: pipeline, project: project)
end
- it 'returns test report summary with collected data', :aggregate_failures do
- expect(subject.total_time).to be(0.84)
- expect(subject.total_count).to be(4)
- expect(subject.success_count).to be(0)
- expect(subject.failed_count).to be(0)
- expect(subject.error_count).to be(4)
- expect(subject.skipped_count).to be(0)
+ it 'returns test report summary with collected data' do
+ expect(subject.total).to include(time: 0.84, count: 4, success: 0, failed: 0, skipped: 0, error: 4)
end
end
context 'when pipeline does not have any builds with report results' do
- it 'returns empty test report sumary', :aggregate_failures do
- expect(subject.total_time).to be(0)
- expect(subject.total_count).to be(0)
- expect(subject.success_count).to be(0)
- expect(subject.failed_count).to be(0)
- expect(subject.error_count).to be(0)
- expect(subject.skipped_count).to be(0)
+ it 'returns empty test report summary' do
+ expect(subject.total).to include(time: 0, count: 0, success: 0, failed: 0, skipped: 0, error: 0)
end
end
end
diff --git a/spec/requests/api/graphql/metrics/dashboard/annotations_spec.rb b/spec/requests/api/graphql/metrics/dashboard/annotations_spec.rb
index c47920087dc..ca5a9165760 100644
--- a/spec/requests/api/graphql/metrics/dashboard/annotations_spec.rb
+++ b/spec/requests/api/graphql/metrics/dashboard/annotations_spec.rb
@@ -30,22 +30,22 @@ RSpec.describe 'Getting Metrics Dashboard Annotations' do
let(:query) do
%(
- query {
- project(fullPath:"#{project.full_path}") {
- environments(name: "#{environment.name}") {
- nodes {
- metricsDashboard(path: "#{path}"){
- annotations(#{args}){
- nodes {
- #{fields}
- }
- }
+ query {
+ project(fullPath: "#{project.full_path}") {
+ environments(name: "#{environment.name}") {
+ nodes {
+ metricsDashboard(path: "#{path}") {
+ annotations(#{args}) {
+ nodes {
+ #{fields}
}
}
}
}
}
- )
+ }
+ }
+ )
end
before do
diff --git a/spec/requests/api/graphql/project/jira_import_spec.rb b/spec/requests/api/graphql/project/jira_import_spec.rb
index 59d24835ae5..1cc30b95162 100644
--- a/spec/requests/api/graphql/project/jira_import_spec.rb
+++ b/spec/requests/api/graphql/project/jira_import_spec.rb
@@ -107,7 +107,7 @@ RSpec.describe 'query Jira import data' do
let(:query) do
%(
query {
- project(fullPath:"#{project.full_path}") {
+ project(fullPath: "#{project.full_path}") {
jiraImports(first: 1) {
nodes {
jiraProjectKey
@@ -133,7 +133,7 @@ RSpec.describe 'query Jira import data' do
let(:query) do
%(
query {
- project(fullPath:"#{project.full_path}") {
+ project(fullPath: "#{project.full_path}") {
jiraImports(last: 1) {
nodes {
jiraProjectKey
diff --git a/spec/requests/api/graphql/project_query_spec.rb b/spec/requests/api/graphql/project_query_spec.rb
index b115030afbc..c6049e098be 100644
--- a/spec/requests/api/graphql/project_query_spec.rb
+++ b/spec/requests/api/graphql/project_query_spec.rb
@@ -76,16 +76,16 @@ RSpec.describe 'getting project information' do
def run_query(number)
q = <<~GQL
- query {
- project(fullPath: "#{project.full_path}") {
- mergeRequests(first: #{number}) {
- nodes {
- assignees { nodes { username } }
- headPipeline { status }
+ query {
+ project(fullPath: "#{project.full_path}") {
+ mergeRequests(first: #{number}) {
+ nodes {
+ assignees { nodes { username } }
+ headPipeline { status }
+ }
}
}
}
- }
GQL
post_graphql(q, current_user: current_user)
diff --git a/spec/requests/api/npm_packages_spec.rb b/spec/requests/api/npm_packages_spec.rb
index 98a1ca978a8..214518f5c4b 100644
--- a/spec/requests/api/npm_packages_spec.rb
+++ b/spec/requests/api/npm_packages_spec.rb
@@ -407,39 +407,37 @@ RSpec.describe API::NpmPackages do
subject { get api(url) }
- context 'without the need for a license' do
- context 'with public project' do
- context 'with authenticated user' do
- subject { get api(url, personal_access_token: personal_access_token) }
-
- it_behaves_like 'returns package tags', :maintainer
- it_behaves_like 'returns package tags', :developer
- it_behaves_like 'returns package tags', :reporter
- it_behaves_like 'returns package tags', :guest
- end
+ context 'with public project' do
+ context 'with authenticated user' do
+ subject { get api(url, personal_access_token: personal_access_token) }
+
+ it_behaves_like 'returns package tags', :maintainer
+ it_behaves_like 'returns package tags', :developer
+ it_behaves_like 'returns package tags', :reporter
+ it_behaves_like 'returns package tags', :guest
+ end
- context 'with unauthenticated user' do
- it_behaves_like 'returns package tags', :no_type
- end
+ context 'with unauthenticated user' do
+ it_behaves_like 'returns package tags', :no_type
end
+ end
- context 'with private project' do
- before do
- project.update!(visibility_level: Gitlab::VisibilityLevel::PRIVATE)
- end
+ context 'with private project' do
+ before do
+ project.update!(visibility_level: Gitlab::VisibilityLevel::PRIVATE)
+ end
- context 'with authenticated user' do
- subject { get api(url, personal_access_token: personal_access_token) }
+ context 'with authenticated user' do
+ subject { get api(url, personal_access_token: personal_access_token) }
- it_behaves_like 'returns package tags', :maintainer
- it_behaves_like 'returns package tags', :developer
- it_behaves_like 'returns package tags', :reporter
- it_behaves_like 'rejects package tags access', :guest, :forbidden
- end
+ it_behaves_like 'returns package tags', :maintainer
+ it_behaves_like 'returns package tags', :developer
+ it_behaves_like 'returns package tags', :reporter
+ it_behaves_like 'rejects package tags access', :guest, :forbidden
+ end
- context 'with unauthenticated user' do
- it_behaves_like 'rejects package tags access', :no_type, :forbidden
- end
+ context 'with unauthenticated user' do
+ it_behaves_like 'rejects package tags access', :no_type, :forbidden
end
end
end
@@ -453,39 +451,37 @@ RSpec.describe API::NpmPackages do
subject { put api(url), env: { 'api.request.body': version } }
- context 'without the need for a license' do
- context 'with public project' do
- context 'with authenticated user' do
- subject { put api(url, personal_access_token: personal_access_token), env: { 'api.request.body': version } }
+ context 'with public project' do
+ context 'with authenticated user' do
+ subject { put api(url, personal_access_token: personal_access_token), env: { 'api.request.body': version } }
- it_behaves_like 'create package tag', :maintainer
- it_behaves_like 'create package tag', :developer
- it_behaves_like 'rejects package tags access', :reporter, :forbidden
- it_behaves_like 'rejects package tags access', :guest, :forbidden
- end
+ it_behaves_like 'create package tag', :maintainer
+ it_behaves_like 'create package tag', :developer
+ it_behaves_like 'rejects package tags access', :reporter, :forbidden
+ it_behaves_like 'rejects package tags access', :guest, :forbidden
+ end
- context 'with unauthenticated user' do
- it_behaves_like 'rejects package tags access', :no_type, :unauthorized
- end
+ context 'with unauthenticated user' do
+ it_behaves_like 'rejects package tags access', :no_type, :unauthorized
end
+ end
- context 'with private project' do
- before do
- project.update!(visibility_level: Gitlab::VisibilityLevel::PRIVATE)
- end
+ context 'with private project' do
+ before do
+ project.update!(visibility_level: Gitlab::VisibilityLevel::PRIVATE)
+ end
- context 'with authenticated user' do
- subject { put api(url, personal_access_token: personal_access_token), env: { 'api.request.body': version } }
+ context 'with authenticated user' do
+ subject { put api(url, personal_access_token: personal_access_token), env: { 'api.request.body': version } }
- it_behaves_like 'create package tag', :maintainer
- it_behaves_like 'create package tag', :developer
- it_behaves_like 'rejects package tags access', :reporter, :forbidden
- it_behaves_like 'rejects package tags access', :guest, :forbidden
- end
+ it_behaves_like 'create package tag', :maintainer
+ it_behaves_like 'create package tag', :developer
+ it_behaves_like 'rejects package tags access', :reporter, :forbidden
+ it_behaves_like 'rejects package tags access', :guest, :forbidden
+ end
- context 'with unauthenticated user' do
- it_behaves_like 'rejects package tags access', :no_type, :unauthorized
- end
+ context 'with unauthenticated user' do
+ it_behaves_like 'rejects package tags access', :no_type, :unauthorized
end
end
end
@@ -499,39 +495,37 @@ RSpec.describe API::NpmPackages do
subject { delete api(url) }
- context 'without the need for a license' do
- context 'with public project' do
- context 'with authenticated user' do
- subject { delete api(url, personal_access_token: personal_access_token) }
+ context 'with public project' do
+ context 'with authenticated user' do
+ subject { delete api(url, personal_access_token: personal_access_token) }
- it_behaves_like 'delete package tag', :maintainer
- it_behaves_like 'rejects package tags access', :developer, :forbidden
- it_behaves_like 'rejects package tags access', :reporter, :forbidden
- it_behaves_like 'rejects package tags access', :guest, :forbidden
- end
+ it_behaves_like 'delete package tag', :maintainer
+ it_behaves_like 'rejects package tags access', :developer, :forbidden
+ it_behaves_like 'rejects package tags access', :reporter, :forbidden
+ it_behaves_like 'rejects package tags access', :guest, :forbidden
+ end
- context 'with unauthenticated user' do
- it_behaves_like 'rejects package tags access', :no_type, :unauthorized
- end
+ context 'with unauthenticated user' do
+ it_behaves_like 'rejects package tags access', :no_type, :unauthorized
end
+ end
- context 'with private project' do
- before do
- project.update!(visibility_level: Gitlab::VisibilityLevel::PRIVATE)
- end
+ context 'with private project' do
+ before do
+ project.update!(visibility_level: Gitlab::VisibilityLevel::PRIVATE)
+ end
- context 'with authenticated user' do
- subject { delete api(url, personal_access_token: personal_access_token) }
+ context 'with authenticated user' do
+ subject { delete api(url, personal_access_token: personal_access_token) }
- it_behaves_like 'delete package tag', :maintainer
- it_behaves_like 'rejects package tags access', :developer, :forbidden
- it_behaves_like 'rejects package tags access', :reporter, :forbidden
- it_behaves_like 'rejects package tags access', :guest, :forbidden
- end
+ it_behaves_like 'delete package tag', :maintainer
+ it_behaves_like 'rejects package tags access', :developer, :forbidden
+ it_behaves_like 'rejects package tags access', :reporter, :forbidden
+ it_behaves_like 'rejects package tags access', :guest, :forbidden
+ end
- context 'with unauthenticated user' do
- it_behaves_like 'rejects package tags access', :no_type, :unauthorized
- end
+ context 'with unauthenticated user' do
+ it_behaves_like 'rejects package tags access', :no_type, :unauthorized
end
end
end
diff --git a/spec/requests/api/project_hooks_spec.rb b/spec/requests/api/project_hooks_spec.rb
index 8ab90e26a51..3b2a7895630 100644
--- a/spec/requests/api/project_hooks_spec.rb
+++ b/spec/requests/api/project_hooks_spec.rb
@@ -40,6 +40,7 @@ RSpec.describe API::ProjectHooks, 'ProjectHooks' do
expect(json_response.first['job_events']).to eq(true)
expect(json_response.first['pipeline_events']).to eq(true)
expect(json_response.first['wiki_page_events']).to eq(true)
+ expect(json_response.first['deployment_events']).to eq(true)
expect(json_response.first['enable_ssl_verification']).to eq(true)
expect(json_response.first['push_events_branch_filter']).to eq('master')
end
@@ -71,6 +72,7 @@ RSpec.describe API::ProjectHooks, 'ProjectHooks' do
expect(json_response['job_events']).to eq(hook.job_events)
expect(json_response['pipeline_events']).to eq(hook.pipeline_events)
expect(json_response['wiki_page_events']).to eq(hook.wiki_page_events)
+ expect(json_response['deployment_events']).to eq(true)
expect(json_response['enable_ssl_verification']).to eq(hook.enable_ssl_verification)
end
@@ -92,8 +94,11 @@ RSpec.describe API::ProjectHooks, 'ProjectHooks' do
describe "POST /projects/:id/hooks" do
it "adds hook to project" do
expect do
- post api("/projects/#{project.id}/hooks", user),
- params: { url: "http://example.com", issues_events: true, confidential_issues_events: true, wiki_page_events: true, job_events: true, push_events_branch_filter: 'some-feature-branch' }
+ post(api("/projects/#{project.id}/hooks", user),
+ params: { url: "http://example.com", issues_events: true,
+ confidential_issues_events: true, wiki_page_events: true,
+ job_events: true, deployment_events: true,
+ push_events_branch_filter: 'some-feature-branch' })
end.to change {project.hooks.count}.by(1)
expect(response).to have_gitlab_http_status(:created)
@@ -108,6 +113,7 @@ RSpec.describe API::ProjectHooks, 'ProjectHooks' do
expect(json_response['job_events']).to eq(true)
expect(json_response['pipeline_events']).to eq(false)
expect(json_response['wiki_page_events']).to eq(true)
+ expect(json_response['deployment_events']).to eq(true)
expect(json_response['enable_ssl_verification']).to eq(true)
expect(json_response['push_events_branch_filter']).to eq('some-feature-branch')
expect(json_response).not_to include('token')
diff --git a/spec/serializers/test_report_summary_entity_spec.rb b/spec/serializers/test_report_summary_entity_spec.rb
index fcac9af5c23..4b0af398b83 100644
--- a/spec/serializers/test_report_summary_entity_spec.rb
+++ b/spec/serializers/test_report_summary_entity_spec.rb
@@ -9,12 +9,8 @@ RSpec.describe TestReportSummaryEntity do
describe '#as_json' do
subject(:as_json) { entity.as_json }
- it 'contains the total time' do
- expect(as_json).to include(:total_time)
- end
-
- it 'contains the counts' do
- expect(as_json).to include(:total_count, :success_count, :failed_count, :skipped_count, :error_count)
+ it 'contains the total' do
+ expect(as_json).to include(:total)
end
context 'when summary has test suites' do
diff --git a/spec/serializers/test_suite_summary_entity_spec.rb b/spec/serializers/test_suite_summary_entity_spec.rb
index d26592bc60e..864781ccfce 100644
--- a/spec/serializers/test_suite_summary_entity_spec.rb
+++ b/spec/serializers/test_suite_summary_entity_spec.rb
@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec.describe TestSuiteSummaryEntity do
let(:pipeline) { create(:ci_pipeline, :with_report_results) }
- let(:entity) { described_class.new(pipeline.test_report_summary.total) }
+ let(:entity) { described_class.new(pipeline.test_report_summary.test_suites.each_value.first) }
describe '#as_json' do
subject(:as_json) { entity.as_json }
diff --git a/yarn.lock b/yarn.lock
index 9886c8653a4..3a3b52b04f3 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -848,10 +848,10 @@
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.158.0.tgz#300d416184a2b0e05f15a96547f726e1825b08a1"
integrity sha512-5OJl+7TsXN9PJhY6/uwi+mTwmDZa9n/6119rf77orQ/joFYUypaYhBmy/1TcKVPsy5Zs6KCxE1kmGsfoXc1TYA==
-"@gitlab/ui@18.6.0":
- version "18.6.0"
- resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-18.6.0.tgz#b0009ddbd0c6a058b3648786c8dbc5e038dd78c9"
- integrity sha512-kFrJIVeAyAjrEQuadReuFmSV4Lw1V9LkgnSzhE0TdIkjLtST9y0QLH1Z0REH3QQZe7GbJIRQfZ8ItXpVWJsrgw==
+"@gitlab/ui@18.6.1":
+ version "18.6.1"
+ resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-18.6.1.tgz#f45d89d2a16e454ad0774f455572c21664084444"
+ integrity sha512-oHP19SxONRaVhx04xEmU7KeYJILAaEuMIyoOtBOr5ukIXHBguFCHMIaYtIAU6DXm+kEhuZngxDe96PNgk4cxeQ==
dependencies:
"@babel/standalone" "^7.0.0"
"@gitlab/vue-toasted" "^1.3.0"