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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-04 12:09:30 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-04 12:09:30 +0300
commit72241c5e0a5ced1416fcf69ed1a6d8f57b9bf3e2 (patch)
treed5369f41d14dcc3480c8eb3ac525ee907d8db7a6
parenta0806c73204d0fe3c3986b5c8140c582283f83c8 (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--.eslintrc.yml38
-rw-r--r--app/assets/javascripts/boards/boards_util.js2
-rw-r--r--app/assets/javascripts/boards/components/board_list_header_deprecated.vue2
-rw-r--r--app/assets/javascripts/diffs/components/diff_row.vue2
-rw-r--r--app/assets/javascripts/members/components/action_buttons/remove_group_link_button.vue1
-rw-r--r--app/assets/javascripts/members/components/modals/remove_group_link_modal.vue1
-rw-r--r--app/assets/javascripts/mr_notes/index.js2
-rw-r--r--app/assets/javascripts/pages/groups/shared/group_details.js2
-rw-r--r--app/assets/javascripts/pages/profiles/notifications/show/index.js2
-rw-r--r--app/assets/javascripts/pipeline_editor/components/commit/commit_section.vue6
-rw-r--r--app/assets/javascripts/pipeline_editor/components/pipeline_editor_tabs.vue2
-rw-r--r--app/assets/javascripts/pipelines/components/graph/job_item.vue2
-rw-r--r--app/assets/javascripts/projects/members/utils.js2
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue4
-rw-r--r--app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/labels_select_root.vue9
-rw-r--r--app/views/admin/application_settings/_visibility_and_access.html.haml6
-rw-r--r--changelogs/unreleased/redo-changelog-index.yml5
-rw-r--r--changelogs/unreleased/yo-question-icon.yml5
-rw-r--r--db/migrate/20210127143025_add_oldest_merge_requests_index.rb23
-rw-r--r--db/migrate/20210201140434_add_oldest_merge_requests_index_again.rb59
-rw-r--r--db/schema_migrations/202102011404341
-rw-r--r--doc/administration/encrypted_configuration.md2
-rw-r--r--doc/administration/geo/replication/datatypes.md24
-rw-r--r--doc/administration/geo/replication/object_storage.md2
-rw-r--r--doc/administration/geo/replication/security_review.md8
-rw-r--r--doc/administration/gitaly/praefect.md2
-rw-r--r--doc/administration/index.md2
-rw-r--r--doc/administration/nfs.md8
-rw-r--r--doc/administration/object_storage.md4
-rw-r--r--doc/administration/operations/filesystem_benchmarking.md14
-rw-r--r--doc/administration/operations/index.md4
-rw-r--r--doc/administration/pages/index.md2
-rw-r--r--doc/administration/raketasks/maintenance.md33
-rw-r--r--doc/administration/troubleshooting/linux_cheat_sheet.md2
-rw-r--r--doc/api/group_wikis.md4
-rw-r--r--doc/api/wikis.md4
-rw-r--r--doc/ci/docker/using_docker_build.md2
-rw-r--r--doc/ci/runners/README.md8
-rw-r--r--doc/development/code_review.md2
-rw-r--r--doc/development/contributing/merge_request_workflow.md2
-rw-r--r--doc/development/fe_guide/index.md4
-rw-r--r--doc/development/fe_guide/troubleshooting.md41
-rw-r--r--doc/development/foreign_keys.md2
-rw-r--r--doc/development/secure_coding_guidelines.md4
-rw-r--r--doc/development/shared_files.md2
-rw-r--r--doc/development/shell_commands.md2
-rw-r--r--doc/raketasks/backup_restore.md10
-rw-r--r--doc/raketasks/cleanup.md2
-rw-r--r--doc/user/admin_area/index.md8
-rw-r--r--doc/user/admin_area/monitoring/health_check.md2
-rw-r--r--doc/user/analytics/productivity_analytics.md2
-rw-r--r--doc/user/application_security/api_fuzzing/index.md2
-rw-r--r--doc/user/application_security/coverage_fuzzing/index.md2
-rw-r--r--doc/user/application_security/vulnerability_report/index.md4
-rw-r--r--doc/user/feature_flags.md4
-rw-r--r--doc/user/packages/generic_packages/index.md4
-rw-r--r--doc/user/project/import/svn.md2
-rw-r--r--doc/user/project/repository/repository_mirroring.md2
-rw-r--r--package.json2
-rw-r--r--qa/qa/page/project/members.rb24
-rw-r--r--qa/qa/resource/merge_request.rb6
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb12
-rw-r--r--qa/qa/specs/features/browser_ui/2_plan/email/trigger_email_notification_spec.rb9
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_via_template_spec.rb47
-rw-r--r--spec/frontend/notes/components/note_actions_spec.js2
-rw-r--r--spec/frontend/pipeline_editor/components/commit/commit_section_spec.js2
-rw-r--r--spec/frontend/pipeline_editor/components/text_editor_spec.js5
-rw-r--r--spec/frontend/pipeline_editor/pipeline_editor_app_spec.js12
-rw-r--r--spec/frontend/pipelines/graph/linked_pipeline_spec.js2
-rw-r--r--spec/frontend/vue_mr_widget/components/states/mr_widget_merged_spec.js2
-rw-r--r--yarn.lock8
71 files changed, 388 insertions, 149 deletions
diff --git a/.eslintrc.yml b/.eslintrc.yml
index fddaf4929fe..99c390e5060 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -43,6 +43,44 @@ rules:
promise/always-return: off
promise/no-callback-in-promise: off
"@gitlab/no-global-event-off": error
+ import/order:
+ - error
+ - groups:
+ - builtin
+ - external
+ - internal
+ - parent
+ - sibling
+ - index
+ pathGroups:
+ - pattern: ~/**
+ group: internal
+ - pattern: emojis/**
+ group: internal
+ - pattern: "{ee_,}empty_states/**"
+ group: internal
+ - pattern: "{ee_,}icons/**"
+ group: internal
+ - pattern: "{ee_,}images/**"
+ group: internal
+ - pattern: vendor/**
+ group: internal
+ - pattern: shared_queries/**
+ group: internal
+ - pattern: "{ee_,}spec/**"
+ group: internal
+ - pattern: "{ee_,}jest/**"
+ group: internal
+ - pattern: ee_else_ce/**
+ group: internal
+ - pattern: ee/**
+ group: internal
+ - pattern: ee_component/**
+ group: internal
+ - pattern: "{test_,}helpers/**"
+ group: internal
+ - pattern: test_fixtures/**
+ group: internal
overrides:
- files:
- '**/spec/**/*'
diff --git a/app/assets/javascripts/boards/boards_util.js b/app/assets/javascripts/boards/boards_util.js
index a1b212ba1eb..13ad820477f 100644
--- a/app/assets/javascripts/boards/boards_util.js
+++ b/app/assets/javascripts/boards/boards_util.js
@@ -1,6 +1,6 @@
import { sortBy } from 'lodash';
-import { ListType, NOT_FILTER } from './constants';
import { getIdFromGraphQLId } from '~/graphql_shared/utils';
+import { ListType, NOT_FILTER } from './constants';
export function getMilestone() {
return null;
diff --git a/app/assets/javascripts/boards/components/board_list_header_deprecated.vue b/app/assets/javascripts/boards/components/board_list_header_deprecated.vue
index 5efe2fa1f5c..54cc56dcbeb 100644
--- a/app/assets/javascripts/boards/components/board_list_header_deprecated.vue
+++ b/app/assets/javascripts/boards/components/board_list_header_deprecated.vue
@@ -12,12 +12,12 @@ import {
import { n__, s__ } from '~/locale';
import sidebarEventHub from '~/sidebar/event_hub';
import { isScopedLabel } from '~/lib/utils/common_utils';
+import { BV_HIDE_TOOLTIP } from '~/lib/utils/constants';
import AccessorUtilities from '../../lib/utils/accessor';
import boardsStore from '../stores/boards_store';
import eventHub from '../eventhub';
import { inactiveId, LIST, ListType } from '../constants';
import IssueCount from './issue_count.vue';
-import { BV_HIDE_TOOLTIP } from '~/lib/utils/constants';
// This component is being replaced in favor of './board_list_header.vue' for GraphQL boards
diff --git a/app/assets/javascripts/diffs/components/diff_row.vue b/app/assets/javascripts/diffs/components/diff_row.vue
index 26a175cea51..a8aca6deee6 100644
--- a/app/assets/javascripts/diffs/components/diff_row.vue
+++ b/app/assets/javascripts/diffs/components/diff_row.vue
@@ -2,6 +2,7 @@
import { mapActions, mapGetters, mapState } from 'vuex';
import { GlTooltipDirective, GlIcon, GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
+import { BV_HIDE_TOOLTIP } from '~/lib/utils/constants';
import {
CONTEXT_LINE_CLASS_NAME,
PARALLEL_DIFF_VIEW_TYPE,
@@ -11,7 +12,6 @@ import {
CONFLICT_THEIR,
CONFLICT_MARKER,
} from '../constants';
-import { BV_HIDE_TOOLTIP } from '~/lib/utils/constants';
import DiffGutterAvatars from './diff_gutter_avatars.vue';
import * as utils from './diff_row_utils';
diff --git a/app/assets/javascripts/members/components/action_buttons/remove_group_link_button.vue b/app/assets/javascripts/members/components/action_buttons/remove_group_link_button.vue
index 9d89cb40676..0120ab08556 100644
--- a/app/assets/javascripts/members/components/action_buttons/remove_group_link_button.vue
+++ b/app/assets/javascripts/members/components/action_buttons/remove_group_link_button.vue
@@ -31,6 +31,7 @@ export default {
:title="$options.i18n.buttonTitle"
:aria-label="$options.i18n.buttonTitle"
icon="remove"
+ data-qa-selector="delete_group_access_link"
@click="showRemoveGroupLinkModal(groupLink)"
/>
</template>
diff --git a/app/assets/javascripts/members/components/modals/remove_group_link_modal.vue b/app/assets/javascripts/members/components/modals/remove_group_link_modal.vue
index 231d014a4ec..2bf61c7795a 100644
--- a/app/assets/javascripts/members/components/modals/remove_group_link_modal.vue
+++ b/app/assets/javascripts/members/components/modals/remove_group_link_modal.vue
@@ -52,6 +52,7 @@ export default {
:action-primary="$options.actionPrimary"
:action-cancel="$options.actionCancel"
size="sm"
+ data-qa-selector="remove_group_link_modal_content"
@primary="handlePrimary"
@hide="hideRemoveGroupLinkModal"
>
diff --git a/app/assets/javascripts/mr_notes/index.js b/app/assets/javascripts/mr_notes/index.js
index c6243175cff..e59991e638b 100644
--- a/app/assets/javascripts/mr_notes/index.js
+++ b/app/assets/javascripts/mr_notes/index.js
@@ -1,5 +1,6 @@
import Vue from 'vue';
import store from '~/mr_notes/stores';
+import initRevertCommitModal from '~/projects/commit/init_revert_commit_modal';
import initDiffsApp from '../diffs';
import discussionCounter from '../notes/components/discussion_counter.vue';
import initDiscussionFilters from '../notes/discussion_filters';
@@ -7,7 +8,6 @@ import initSortDiscussions from '../notes/sort_discussions';
import MergeRequest from '../merge_request';
import { resetServiceWorkersPublicPath } from '../lib/utils/webpack';
import initNotesApp from './init_notes';
-import initRevertCommitModal from '~/projects/commit/init_revert_commit_modal';
export default function initMrNotes() {
resetServiceWorkersPublicPath();
diff --git a/app/assets/javascripts/pages/groups/shared/group_details.js b/app/assets/javascripts/pages/groups/shared/group_details.js
index 96c7d920c0d..add955ab1f2 100644
--- a/app/assets/javascripts/pages/groups/shared/group_details.js
+++ b/app/assets/javascripts/pages/groups/shared/group_details.js
@@ -6,11 +6,11 @@ import notificationsDropdown from '~/notifications_dropdown';
import NotificationsForm from '~/notifications_form';
import ProjectsList from '~/projects_list';
import ShortcutsNavigation from '~/behaviors/shortcuts/shortcuts_navigation';
-import GroupTabs from './group_tabs';
import initInviteMembersBanner from '~/groups/init_invite_members_banner';
import initInviteMembersTrigger from '~/invite_members/init_invite_members_trigger';
import initInviteMembersModal from '~/invite_members/init_invite_members_modal';
import initNotificationsDropdown from '~/notifications';
+import GroupTabs from './group_tabs';
export default function initGroupDetails(actionName = 'show') {
const loadableActions = [ACTIVE_TAB_SHARED, ACTIVE_TAB_ARCHIVED];
diff --git a/app/assets/javascripts/pages/profiles/notifications/show/index.js b/app/assets/javascripts/pages/profiles/notifications/show/index.js
index 5fbe3e17888..cd1512df2da 100644
--- a/app/assets/javascripts/pages/profiles/notifications/show/index.js
+++ b/app/assets/javascripts/pages/profiles/notifications/show/index.js
@@ -1,6 +1,6 @@
+import initNotificationsDropdown from '~/notifications';
import NotificationsForm from '../../../../notifications_form';
import notificationsDropdown from '../../../../notifications_dropdown';
-import initNotificationsDropdown from '~/notifications';
document.addEventListener('DOMContentLoaded', () => {
new NotificationsForm(); // eslint-disable-line no-new
diff --git a/app/assets/javascripts/pipeline_editor/components/commit/commit_section.vue b/app/assets/javascripts/pipeline_editor/components/commit/commit_section.vue
index 01e7590f693..6e701f063a7 100644
--- a/app/assets/javascripts/pipeline_editor/components/commit/commit_section.vue
+++ b/app/assets/javascripts/pipeline_editor/components/commit/commit_section.vue
@@ -1,11 +1,11 @@
<script>
-import CommitForm from './commit_form.vue';
+import { mergeUrlParams, redirectTo } from '~/lib/utils/url_utility';
+import { __, s__, sprintf } from '~/locale';
import commitCIFile from '../../graphql/mutations/commit_ci_file.mutation.graphql';
import getCommitSha from '../../graphql/queries/client/commit_sha.graphql';
import { COMMIT_FAILURE, COMMIT_SUCCESS } from '../../constants';
-import { mergeUrlParams, redirectTo } from '~/lib/utils/url_utility';
-import { __, s__, sprintf } from '~/locale';
+import CommitForm from './commit_form.vue';
const MR_SOURCE_BRANCH = 'merge_request[source_branch]';
const MR_TARGET_BRANCH = 'merge_request[target_branch]';
diff --git a/app/assets/javascripts/pipeline_editor/components/pipeline_editor_tabs.vue b/app/assets/javascripts/pipeline_editor/components/pipeline_editor_tabs.vue
index 45f429b69bc..760a8b7e232 100644
--- a/app/assets/javascripts/pipeline_editor/components/pipeline_editor_tabs.vue
+++ b/app/assets/javascripts/pipeline_editor/components/pipeline_editor_tabs.vue
@@ -2,10 +2,10 @@
import { GlLoadingIcon, GlTabs, GlTab } from '@gitlab/ui';
import { s__ } from '~/locale';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
+import PipelineGraph from '~/pipelines/components/pipeline_graph/pipeline_graph.vue';
import CiLint from './lint/ci_lint.vue';
import EditorTab from './ui/editor_tab.vue';
import TextEditor from './text_editor.vue';
-import PipelineGraph from '~/pipelines/components/pipeline_graph/pipeline_graph.vue';
export default {
i18n: {
diff --git a/app/assets/javascripts/pipelines/components/graph/job_item.vue b/app/assets/javascripts/pipelines/components/graph/job_item.vue
index ae41ca200d0..52848fe3ade 100644
--- a/app/assets/javascripts/pipelines/components/graph/job_item.vue
+++ b/app/assets/javascripts/pipelines/components/graph/job_item.vue
@@ -2,9 +2,9 @@
import { GlTooltipDirective, GlLink } from '@gitlab/ui';
import { sprintf } from '~/locale';
import delayedJobMixin from '~/jobs/mixins/delayed_job_mixin';
+import { BV_HIDE_TOOLTIP } from '~/lib/utils/constants';
import ActionComponent from './action_component.vue';
import JobNameComponent from './job_name_component.vue';
-import { BV_HIDE_TOOLTIP } from '~/lib/utils/constants';
import { accessValue } from './accessors';
import { REST } from './constants';
import { reportToSentry } from './utils';
diff --git a/app/assets/javascripts/projects/members/utils.js b/app/assets/javascripts/projects/members/utils.js
index 0dd8de58223..cc27a43afa9 100644
--- a/app/assets/javascripts/projects/members/utils.js
+++ b/app/assets/javascripts/projects/members/utils.js
@@ -1,6 +1,6 @@
import { baseRequestFormatter } from '~/members/utils';
-import { PROJECT_MEMBER_BASE_PROPERTY_NAME } from './constants';
import { MEMBER_ACCESS_LEVEL_PROPERTY_NAME } from '~/members/constants';
+import { PROJECT_MEMBER_BASE_PROPERTY_NAME } from './constants';
export const projectMemberRequestFormatter = baseRequestFormatter(
PROJECT_MEMBER_BASE_PROPERTY_NAME,
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue
index a3a017b1883..31302904b2d 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue
@@ -4,11 +4,11 @@ import { GlLoadingIcon, GlButton, GlTooltipDirective } from '@gitlab/ui';
import { deprecatedCreateFlash as Flash } from '~/flash';
import { s__, __ } from '~/locale';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
+import modalEventHub from '~/projects/commit/event_hub';
+import { OPEN_REVERT_MODAL } from '~/projects/commit/constants';
import MrWidgetAuthorTime from '../mr_widget_author_time.vue';
import statusIcon from '../mr_widget_status_icon.vue';
import eventHub from '../../event_hub';
-import modalEventHub from '~/projects/commit/event_hub';
-import { OPEN_REVERT_MODAL } from '~/projects/commit/constants';
export default {
name: 'MRWidgetMerged',
diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/labels_select_root.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/labels_select_root.vue
index 683889b8611..9efc17908a2 100644
--- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/labels_select_root.vue
+++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/labels_select_root.vue
@@ -35,11 +35,13 @@ export default {
},
allowLabelEdit: {
type: Boolean,
- required: true,
+ required: false,
+ default: false,
},
allowLabelCreate: {
type: Boolean,
- required: true,
+ required: false,
+ default: false,
},
allowMultiselect: {
type: Boolean,
@@ -48,7 +50,8 @@ export default {
},
allowScopedLabels: {
type: Boolean,
- required: true,
+ required: false,
+ default: false,
},
variant: {
type: String,
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 a4135034f0d..0931ba50aa7 100644
--- a/app/views/admin/application_settings/_visibility_and_access.html.haml
+++ b/app/views/admin/application_settings/_visibility_and_access.html.haml
@@ -35,11 +35,11 @@
.form-check= source
%span.form-text.text-muted#import-sources-help
= _('Enabled sources for code import during project creation. OmniAuth must be configured for GitHub')
- = link_to "(?)", help_page_path("integration/github")
+ = link_to sprite_icon('question-o'), help_page_path("integration/github")
, Bitbucket
- = link_to "(?)", help_page_path("integration/bitbucket")
+ = link_to sprite_icon('question-o'), help_page_path("integration/bitbucket")
and GitLab.com
- = link_to "(?)", help_page_path("integration/gitlab")
+ = link_to sprite_icon('question-o'), help_page_path("integration/gitlab")
= render_if_exists 'admin/application_settings/ldap_access_setting', form: f
diff --git a/changelogs/unreleased/redo-changelog-index.yml b/changelogs/unreleased/redo-changelog-index.yml
new file mode 100644
index 00000000000..a65586a2a81
--- /dev/null
+++ b/changelogs/unreleased/redo-changelog-index.yml
@@ -0,0 +1,5 @@
+---
+title: Re-add migration to fix invalid merge request index
+merge_request: 53042
+author:
+type: other
diff --git a/changelogs/unreleased/yo-question-icon.yml b/changelogs/unreleased/yo-question-icon.yml
new file mode 100644
index 00000000000..2bc997a74aa
--- /dev/null
+++ b/changelogs/unreleased/yo-question-icon.yml
@@ -0,0 +1,5 @@
+---
+title: Update (?) link to sprite question icon
+merge_request: 52655
+author: Yogi (@yo)
+type: other
diff --git a/db/migrate/20210127143025_add_oldest_merge_requests_index.rb b/db/migrate/20210127143025_add_oldest_merge_requests_index.rb
index acd690a5cce..c25e12d89af 100644
--- a/db/migrate/20210127143025_add_oldest_merge_requests_index.rb
+++ b/db/migrate/20210127143025_add_oldest_merge_requests_index.rb
@@ -1,32 +1,13 @@
# frozen_string_literal: true
class AddOldestMergeRequestsIndex < ActiveRecord::Migration[6.0]
- include Gitlab::Database::SchemaHelpers
- include Gitlab::Database::MigrationHelpers
-
- disable_ddl_transaction!
-
- # Set this constant to true if this migration requires downtime.
DOWNTIME = false
- INDEX = 'index_on_merge_requests_for_latest_diffs'
-
def up
- return if index_exists_by_name?('merge_requests', INDEX)
-
- execute "CREATE INDEX CONCURRENTLY #{INDEX} ON merge_requests " \
- 'USING btree (target_project_id) INCLUDE (id, latest_merge_request_diff_id)'
-
- create_comment(
- 'INDEX',
- INDEX,
- 'Index used to efficiently obtain the oldest merge request for a commit SHA'
- )
+ # replaced by db/migrate/20210201140434_add_oldest_merge_requests_index_again.rb
end
def down
- return unless index_exists_by_name?('merge_requests', INDEX)
-
- execute "DROP INDEX CONCURRENTLY #{INDEX}"
+ # replaced by db/migrate/20210201140434_add_oldest_merge_requests_index_again.rb
end
end
diff --git a/db/migrate/20210201140434_add_oldest_merge_requests_index_again.rb b/db/migrate/20210201140434_add_oldest_merge_requests_index_again.rb
new file mode 100644
index 00000000000..a3fed9e576a
--- /dev/null
+++ b/db/migrate/20210201140434_add_oldest_merge_requests_index_again.rb
@@ -0,0 +1,59 @@
+# frozen_string_literal: true
+
+class AddOldestMergeRequestsIndexAgain < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::SchemaHelpers
+ include Gitlab::Database::MigrationHelpers
+
+ disable_ddl_transaction!
+
+ DOWNTIME = false
+
+ INDEX = 'index_on_merge_requests_for_latest_diffs'
+
+ def up
+ execute "DROP INDEX CONCURRENTLY #{INDEX}" if invalid_index?
+
+ return if index_exists_by_name?('merge_requests', INDEX)
+
+ begin
+ disable_statement_timeout do
+ execute "CREATE INDEX CONCURRENTLY #{INDEX} ON merge_requests " \
+ 'USING btree (target_project_id) INCLUDE (id, latest_merge_request_diff_id)'
+ end
+ rescue ActiveRecord::StatementInvalid => ex
+ # Due to https://github.com/lfittl/pg_query/issues/184, if the CREATE
+ # INDEX statement fails, we trigger a separate error due to the Gem not
+ # supporting the INCLUDE syntax.
+ #
+ # To work around this, we raise a custom error instead, as these won't
+ # have a query context injected.
+ raise "The index #{INDEX} couldn't be added: #{ex.message}"
+ end
+
+ create_comment(
+ 'INDEX',
+ INDEX,
+ 'Index used to efficiently obtain the oldest merge request for a commit SHA'
+ )
+ end
+
+ def down
+ return unless index_exists_by_name?('merge_requests', INDEX)
+
+ disable_statement_timeout do
+ execute "DROP INDEX CONCURRENTLY #{INDEX}"
+ end
+ end
+
+ def invalid_index?
+ result = execute(<<~SQL)
+ SELECT pg_class.relname
+ FROM pg_class, pg_index
+ WHERE pg_index.indisvalid = false
+ AND pg_index.indexrelid = pg_class.oid
+ AND pg_class.relname = '#{INDEX}';
+ SQL
+
+ result.values.any?
+ end
+end
diff --git a/db/schema_migrations/20210201140434 b/db/schema_migrations/20210201140434
new file mode 100644
index 00000000000..00671276b1c
--- /dev/null
+++ b/db/schema_migrations/20210201140434
@@ -0,0 +1 @@
+71220cfc36215f6c22d22d1fb0b74389e90c58733214b5fa36dcb8da0377a120 \ No newline at end of file
diff --git a/doc/administration/encrypted_configuration.md b/doc/administration/encrypted_configuration.md
index 17b36a71066..508f4314694 100644
--- a/doc/administration/encrypted_configuration.md
+++ b/doc/administration/encrypted_configuration.md
@@ -34,4 +34,4 @@ The new secret can be generated by running:
bundle exec rake gitlab:env:info RAILS_ENV=production GITLAB_GENERATE_ENCRYPTED_SETTINGS_KEY_BASE=true
```
-This will print general info on the GitLab instance, but will also cause the key to be generated in `<path-to-gitlab-rails>/config/secrets.yml`
+This will print general information on the GitLab instance, but will also cause the key to be generated in `<path-to-gitlab-rails>/config/secrets.yml`
diff --git a/doc/administration/geo/replication/datatypes.md b/doc/administration/geo/replication/datatypes.md
index c82a13ac88d..667dd83c3f1 100644
--- a/doc/administration/geo/replication/datatypes.md
+++ b/doc/administration/geo/replication/datatypes.md
@@ -35,21 +35,21 @@ verification methods:
| Git | Object pools for forked project deduplication | Geo with Gitaly | _Not implemented_ |
| Git | Project Snippets | Geo with Gitaly | _Not implemented_ |
| Git | Personal Snippets | Geo with Gitaly | _Not implemented_ |
-| Blobs | User uploads _(filesystem)_ | Geo with API | _Not implemented_ |
+| Blobs | User uploads _(file system)_ | Geo with API | _Not implemented_ |
| Blobs | User uploads _(object storage)_ | Geo with API/Managed (*2*) | _Not implemented_ |
-| Blobs | LFS objects _(filesystem)_ | Geo with API | _Not implemented_ |
+| Blobs | LFS objects _(file system)_ | Geo with API | _Not implemented_ |
| Blobs | LFS objects _(object storage)_ | Geo with API/Managed (*2*) | _Not implemented_ |
-| Blobs | CI job artifacts _(filesystem)_ | Geo with API | _Not implemented_ |
+| Blobs | CI job artifacts _(file system)_ | Geo with API | _Not implemented_ |
| Blobs | CI job artifacts _(object storage)_ | Geo with API/Managed (*2*) | _Not implemented_ |
-| Blobs | Archived CI build traces _(filesystem)_ | Geo with API | _Not implemented_ |
+| Blobs | Archived CI build traces _(file system)_ | Geo with API | _Not implemented_ |
| Blobs | Archived CI build traces _(object storage)_ | Geo with API/Managed (*2*) | _Not implemented_ |
-| Blobs | Container registry _(filesystem)_ | Geo with API/Docker API | _Not implemented_ |
+| Blobs | Container registry _(file system)_ | Geo with API/Docker API | _Not implemented_ |
| Blobs | Container registry _(object storage)_ | Geo with API/Managed/Docker API (*2*) | _Not implemented_ |
-| Blobs | Package registry _(filesystem)_ | Geo with API | _Not implemented_ |
+| Blobs | Package registry _(file system)_ | Geo with API | _Not implemented_ |
| Blobs | Package registry _(object storage)_ | Geo with API/Managed (*2*) | _Not implemented_ |
-| Blobs | Versioned Terraform State _(filesystem)_ | Geo with API | _Not implemented_ |
+| Blobs | Versioned Terraform State _(file system)_ | Geo with API | _Not implemented_ |
| Blobs | Versioned Terraform State _(object storage)_ | Geo with API/Managed (*2*) | _Not implemented_ |
-| Blobs | External Merge Request Diffs _(filesystem)_ | Geo with API | _Not implemented_ |
+| Blobs | External Merge Request Diffs _(file system)_ | Geo with API | _Not implemented_ |
| Blobs | External Merge Request Diffs _(object storage)_ | Geo with API/Managed (*2*) | _Not implemented_ |
- (*1*): Redis replication can be used as part of HA with Redis sentinel. It's not used between Geo nodes.
@@ -63,8 +63,8 @@ is responsible for allowing access and operations on the locally stored Git repo
on a machine with a single disk, multiple disks mounted as a single mount-point (like with a RAID array),
or using LVM.
-It requires no special filesystem and can work with NFS or a mounted Storage Appliance (there may be
-performance limitations when using a remote filesystem).
+It requires no special file system and can work with NFS or a mounted Storage Appliance (there may be
+performance limitations when using a remote file system).
Communication is done via Gitaly's own gRPC API. There are three possible ways of synchronization:
@@ -88,13 +88,13 @@ Both types will be synced to a secondary node.
GitLab stores files and blobs such as Issue attachments or LFS objects into either:
-- The filesystem in a specific location.
+- The file system in a specific location.
- An [Object Storage](../../object_storage.md) solution. Object Storage solutions can be:
- Cloud based like Amazon S3 Google Cloud Storage.
- Hosted by you (like MinIO).
- A Storage Appliance that exposes an Object Storage-compatible API.
-When using the filesystem store instead of Object Storage, you need to use network mounted filesystems
+When using the file system store instead of Object Storage, you need to use network mounted file systems
to run GitLab when using more than one server.
With respect to replication and verification:
diff --git a/doc/administration/geo/replication/object_storage.md b/doc/administration/geo/replication/object_storage.md
index 9eb6e0e446d..ad419f999b3 100644
--- a/doc/administration/geo/replication/object_storage.md
+++ b/doc/administration/geo/replication/object_storage.md
@@ -29,7 +29,7 @@ WARNING:
This is a [**beta** feature](https://about.gitlab.com/handbook/product/#beta) and is not ready yet for production use at any scale. The main limitations are a lack of testing at scale and no verification of any replicated data.
**Secondary** nodes can replicate files stored on the **primary** node regardless of
-whether they are stored on the local filesystem or in object storage.
+whether they are stored on the local file system or in object storage.
To enable GitLab replication, you must:
diff --git a/doc/administration/geo/replication/security_review.md b/doc/administration/geo/replication/security_review.md
index ca37117cd4e..70b58582435 100644
--- a/doc/administration/geo/replication/security_review.md
+++ b/doc/administration/geo/replication/security_review.md
@@ -194,7 +194,7 @@ from [owasp.org](https://owasp.org/).
administrator via SSH, and then back out to the **secondary** node in the same manner.
In particular, this includes the PostgreSQL replication credentials and a secret
key (`db_key_base`) which is used to decrypt certain columns in the database.
- The `db_key_base` secret is stored unencrypted on the filesystem, in
+ The `db_key_base` secret is stored unencrypted on the file system, in
`/etc/gitlab/gitlab-secrets.json`, along with a number of other secrets. There is
no at-rest protection for them.
@@ -217,7 +217,7 @@ from [owasp.org](https://owasp.org/).
- **Secondary** nodes and **primary** nodes interact via HTTP/HTTPS (secured with JSON web
tokens) and via PostgreSQL streaming replication.
-- Within a **primary** node or **secondary** node, the SSOT is the filesystem and the database
+- Within a **primary** node or **secondary** node, the SSOT is the file system and the database
(including Geo tracking database on **secondary** node). The various internal components
are orchestrated to make alterations to these stores.
@@ -231,7 +231,7 @@ from [owasp.org](https://owasp.org/).
### What data is or may need to be encrypted and what key management requirements have been defined?
-- Neither **primary** nodes or **secondary** nodes encrypt Git repository or filesystem data at
+- Neither **primary** nodes or **secondary** nodes encrypt Git repository or file system data at
rest. A subset of database columns are encrypted at rest using the `db_otp_key`.
- A static secret shared across all hosts in a GitLab deployment.
- In transit, data should be encrypted, although the application does permit
@@ -287,5 +287,5 @@ from [owasp.org](https://owasp.org/).
### What application auditing requirements have been defined? How are audit and debug logs accessed, stored, and secured?
-- Structured JSON log is written to the filesystem, and can also be ingested
+- Structured JSON log is written to the file system, and can also be ingested
into a Kibana installation for further analysis.
diff --git a/doc/administration/gitaly/praefect.md b/doc/administration/gitaly/praefect.md
index 349204e87f2..b4fd607c4be 100644
--- a/doc/administration/gitaly/praefect.md
+++ b/doc/administration/gitaly/praefect.md
@@ -113,7 +113,7 @@ In this example:
- Repositories are stored on a virtual storage called `storage-1`.
- Three Gitaly nodes provide `storage-1` access: `gitaly-1`, `gitaly-2`, and `gitaly-3`.
-- The three Gitaly nodes store data on their filesystems.
+- The three Gitaly nodes store data on their file systems.
### Virtual storage or direct Gitaly storage
diff --git a/doc/administration/index.md b/doc/administration/index.md
index 190f4dca619..f70948c63df 100644
--- a/doc/administration/index.md
+++ b/doc/administration/index.md
@@ -188,7 +188,7 @@ Learn how to install, configure, update, and maintain your GitLab instance.
## Git configuration options
-- [Server hooks](server_hooks.md): Server hooks (on the filesystem) for when webhooks aren't enough.
+- [Server hooks](server_hooks.md): Server hooks (on the file system) for when webhooks aren't enough.
- [Git LFS configuration](lfs/index.md): Learn how to configure LFS for GitLab.
- [Housekeeping](housekeeping.md): Keep your Git repositories tidy and fast.
- [Configuring Git Protocol v2](git_protocol.md): Git protocol version 2 support.
diff --git a/doc/administration/nfs.md b/doc/administration/nfs.md
index bddf770180b..a7009b702ed 100644
--- a/doc/administration/nfs.md
+++ b/doc/administration/nfs.md
@@ -20,10 +20,10 @@ From GitLab 14.0, technical support for NFS for Git repositories
will no longer be provided. Upgrade to [Gitaly Cluster](gitaly/praefect.md)
as soon as possible.
-Filesystem performance can impact overall GitLab performance, especially for
+File system performance can impact overall GitLab performance, especially for
actions that read or write to Git repositories. For steps you can use to test
-filesystem performance, see
-[Filesystem Performance Benchmarking](operations/filesystem_benchmarking.md).
+file system performance, see
+[File system Performance Benchmarking](operations/filesystem_benchmarking.md).
## Known kernel version incompatibilities
@@ -408,7 +408,7 @@ For supported database architecture, see our documentation about
### Finding the requests that are being made to NFS
In case of NFS-related problems, it can be helpful to trace
-the filesystem requests that are being made by using `perf`:
+the file system requests that are being made by using `perf`:
```shell
sudo perf trace -e 'nfs4:*' -p $(pgrep -fd ',' puma && pgrep -fd ',' unicorn)
diff --git a/doc/administration/object_storage.md b/doc/administration/object_storage.md
index d4035161e5f..d1b460df273 100644
--- a/doc/administration/object_storage.md
+++ b/doc/administration/object_storage.md
@@ -557,11 +557,11 @@ supported by consolidated configuration form, refer to the following guides:
| [Terraform state files](terraform_state.md#using-object-storage) | Yes |
| [GitLab Pages content](pages/index.md#using-object-storage) | Yes |
-### Other alternatives to filesystem storage
+### Other alternatives to file system storage
If you're working to [scale out](reference_architectures/index.md) your GitLab implementation,
or add fault tolerance and redundancy, you may be
-looking at removing dependencies on block or network filesystems.
+looking at removing dependencies on block or network file systems.
See the following additional guides and
[note that Pages requires disk storage](#gitlab-pages-requires-nfs):
diff --git a/doc/administration/operations/filesystem_benchmarking.md b/doc/administration/operations/filesystem_benchmarking.md
index 9072214eb02..6119fcdae45 100644
--- a/doc/administration/operations/filesystem_benchmarking.md
+++ b/doc/administration/operations/filesystem_benchmarking.md
@@ -4,15 +4,15 @@ group: Distribution
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---
-# Filesystem Performance Benchmarking
+# File system Performance Benchmarking
-Filesystem performance has a big impact on overall GitLab performance,
+File system performance has a big impact on overall GitLab performance,
especially for actions that read or write to Git repositories. This information
-will help benchmark filesystem performance against known good and bad real-world
+will help benchmark file system performance against known good and bad real-world
systems.
-Normally when talking about filesystem performance the biggest concern is
-with Network Filesystems (NFS). However, even some local disks can have slow
+Normally when talking about file system performance the biggest concern is
+with Network File Systems (NFS). However, even some local disks can have slow
I/O. The information on this page can be used for either scenario.
## Executing benchmarks
@@ -77,7 +77,7 @@ available on the system. It's possible to receive good results on this
test but still have poor performance due to read speed and various other
factors.
-The following one-line commands provide a quick benchmark for filesystem write and read
+The following one-line commands provide a quick benchmark for file system write and read
performance. This will write 1,000 small files to the directory in which it is
executed, and then read the same 1,000 files.
@@ -125,4 +125,4 @@ sys 0m1.663s
```
From experience with multiple customers, this task should take under 10
-seconds to indicate good filesystem performance.
+seconds to indicate good file system performance.
diff --git a/doc/administration/operations/index.md b/doc/administration/operations/index.md
index d35e5322760..eb1854fee10 100644
--- a/doc/administration/operations/index.md
+++ b/doc/administration/operations/index.md
@@ -27,10 +27,10 @@ Keep your GitLab instance up and running smoothly.
indexed lookup to the GitLab database](fast_ssh_key_lookup.md), and/or
by [doing away with user SSH keys stored on GitLab entirely in favor
of SSH certificates](ssh_certificates.md).
-- [Filesystem Performance Benchmarking](filesystem_benchmarking.md): Filesystem
+- [File System Performance Benchmarking](filesystem_benchmarking.md): File system
performance can have a big impact on GitLab performance, especially for actions
that read or write Git repositories. This information will help benchmark
- filesystem performance against known good and bad real-world systems.
+ file system performance against known good and bad real-world systems.
- [The Rails Console](rails_console.md): Provides a way to interact with your GitLab instance from the command line.
Used for troubleshooting a problem or retrieving some data that can only be done through direct access to GitLab.
- [ChatOps Scripts](https://gitlab.com/gitlab-com/chatops): The GitLab.com Infrastructure team uses this repository to house
diff --git a/doc/administration/pages/index.md b/doc/administration/pages/index.md
index f78dc83da91..460f8470092 100644
--- a/doc/administration/pages/index.md
+++ b/doc/administration/pages/index.md
@@ -845,7 +845,7 @@ open /etc/ssl/ca-bundle.pem: permission denied
```
The use of a `chroot` jail makes this error misleading, as it is not
-referring to `/etc/ssl` on the root filesystem.
+referring to `/etc/ssl` on the root file system.
The fix is to correct the source file permissions and restart Pages:
diff --git a/doc/administration/raketasks/maintenance.md b/doc/administration/raketasks/maintenance.md
index b58574257a2..85e905702c8 100644
--- a/doc/administration/raketasks/maintenance.md
+++ b/doc/administration/raketasks/maintenance.md
@@ -326,6 +326,39 @@ sudo gitlab-rake db:migrate
After the command completes, run `sudo gitlab-rake db:migrate:status` to check if all
migrations are completed (have an `up` status).
+## Rebuild database indexes
+
+WARNING:
+This is an experimental feature that isn't enabled by default.
+
+Database indexes can be rebuilt regularly to reclaim space and maintain healthy levels of index bloat over time.
+
+In order to rebuild the two indexes with the highest estimated bloat, use the following Rake task:
+
+```shell
+sudo gitlab-rake gitlab:db:reindex
+```
+
+In order to target a specific index, use the following Rake task:
+
+```shell
+sudo gitlab-rake gitlab:db:reindex['public.a_specific_index']
+```
+
+The following index types are not supported:
+
+1. Unique and primary key indexes
+1. Indexes used for constraint exclusion
+1. Partitioned indexes
+1. Expression indexes
+
+Optionally, this Rake task sends annotations to a Grafana (4.6 or later) endpoint. Use the following custom environment variables in order to enable annotations:
+
+1. `GRAFANA_API_URL` - Grafana's base URL, for example `http://some-host:3000`.
+1. `GRAFANA_API_KEY` - Grafana API key with at least `Editor role`.
+
+You can also [enable reindexing as a regular cron job](https://docs.gitlab.com/omnibus/settings/database.html#automatic-database-reindexing).
+
## Import common metrics
Sometimes you may need to re-import the common metrics that power the Metrics dashboards.
diff --git a/doc/administration/troubleshooting/linux_cheat_sheet.md b/doc/administration/troubleshooting/linux_cheat_sheet.md
index dbe8c5e2af0..c4e991ccc1b 100644
--- a/doc/administration/troubleshooting/linux_cheat_sheet.md
+++ b/doc/administration/troubleshooting/linux_cheat_sheet.md
@@ -266,7 +266,7 @@ Rough numbers for calls to `open` and `openat` (used to access files) on various
Slow storage can cause the dreaded `DeadlineExceeded` error in Gitaly.
Also [see this entry](../operations/filesystem_benchmarking.md)
-in the handbook for quick tests customers can perform to check their filesystem performance.
+in the handbook for quick tests customers can perform to check their file system performance.
Keep in mind that timing information from `strace` is often somewhat inaccurate, so
small differences should not be considered significant.
diff --git a/doc/api/group_wikis.md b/doc/api/group_wikis.md
index f8804d1eadc..50c1ce5bd84 100644
--- a/doc/api/group_wikis.md
+++ b/doc/api/group_wikis.md
@@ -179,9 +179,9 @@ POST /groups/:id/wikis/attachments
| `file` | string | yes | The attachment to be uploaded |
| `branch` | string | no | The name of the branch. Defaults to the wiki repository default branch |
-To upload a file from your filesystem, use the `--form` argument. This causes
+To upload a file from your file system, use the `--form` argument. This causes
cURL to post data using the header `Content-Type: multipart/form-data`.
-The `file=` parameter must point to a file on your filesystem and be preceded
+The `file=` parameter must point to a file on your file system and be preceded
by `@`. For example:
```shell
diff --git a/doc/api/wikis.md b/doc/api/wikis.md
index dfbedc9bfd1..0e423564da2 100644
--- a/doc/api/wikis.md
+++ b/doc/api/wikis.md
@@ -175,9 +175,9 @@ POST /projects/:id/wikis/attachments
| `file` | string | yes | The attachment to be uploaded |
| `branch` | string | no | The name of the branch. Defaults to the wiki repository default branch |
-To upload a file from your filesystem, use the `--form` argument. This causes
+To upload a file from your file system, use the `--form` argument. This causes
cURL to post data using the header `Content-Type: multipart/form-data`.
-The `file=` parameter must point to a file on your filesystem and be preceded
+The `file=` parameter must point to a file on your file system and be preceded
by `@`. For example:
```shell
diff --git a/doc/ci/docker/using_docker_build.md b/doc/ci/docker/using_docker_build.md
index 5506676a8b8..11020f0a090 100644
--- a/doc/ci/docker/using_docker_build.md
+++ b/doc/ci/docker/using_docker_build.md
@@ -801,7 +801,7 @@ NOTE:
The shared runners on GitLab.com use the `overlay2` driver by default.
By default, when using `docker:dind`, Docker uses the `vfs` storage driver which
-copies the filesystem on every run. This is a disk-intensive operation
+copies the file system on every run. This is a disk-intensive operation
which can be avoided if a different driver is used, for example `overlay2`.
### Requirements
diff --git a/doc/ci/runners/README.md b/doc/ci/runners/README.md
index d6ea4d83825..43fd0af6f39 100644
--- a/doc/ci/runners/README.md
+++ b/doc/ci/runners/README.md
@@ -37,10 +37,10 @@ multiple projects.
If you are using a self-managed instance of GitLab:
-- Your administrator can install and register shared runners by [following the documentation](https://docs.gitlab.com/runner/install/index.html).
- <!-- going to your project's-->
- <!-- **Settings > CI / CD**, expanding the **Runners** section, and clicking **Show runner installation instructions**.-->
- <!-- These instructions are also available [in the documentation](https://docs.gitlab.com/runner/install/index.html).-->
+- Your administrator can install and register shared runners by
+ going to your project's **Settings > CI / CD**, expanding the **Runners** section,
+ and clicking **Show runner installation instructions**.
+ These instructions are also available [in the documentation](https://docs.gitlab.com/runner/install/index.html).
- The administrator can also configure a maximum number of shared runner [pipeline minutes for
each group](../../user/admin_area/settings/continuous_integration.md#shared-runners-pipeline-minutes-quota).
diff --git a/doc/development/code_review.md b/doc/development/code_review.md
index 18257fffb67..d856541bd91 100644
--- a/doc/development/code_review.md
+++ b/doc/development/code_review.md
@@ -111,7 +111,7 @@ with [domain expertise](#domain-experts).
[GitLab Licensing and Compatibility documentation](licensing.md).
1. If your merge request includes adding a new UI/UX paradigm (*1*), it must be
**approved by a [UX lead](https://about.gitlab.com/company/team/)**.
-1. If your merge request includes a new dependency or a filesystem change, it must be
+1. If your merge request includes a new dependency or a file system change, it must be
**approved by a [Distribution team member](https://about.gitlab.com/company/team/)**. See how to work with the [Distribution team](https://about.gitlab.com/handbook/engineering/development/enablement/distribution/#how-to-work-with-distribution) for more details.
1. If your merge request includes documentation changes, it must be **approved
by a [Technical writer](https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments)**, based on
diff --git a/doc/development/contributing/merge_request_workflow.md b/doc/development/contributing/merge_request_workflow.md
index 7859af4e88b..5c8068fdee7 100644
--- a/doc/development/contributing/merge_request_workflow.md
+++ b/doc/development/contributing/merge_request_workflow.md
@@ -212,7 +212,7 @@ the contribution acceptance criteria below:
1. Changes do not degrade performance:
- Avoid repeated polling of endpoints that require a significant amount of overhead.
- Check for N+1 queries via the SQL log or [`QueryRecorder`](../merge_request_performance_guidelines.md).
- - Avoid repeated access of the filesystem.
+ - Avoid repeated access of the file system.
- Use [polling with ETag caching](../polling.md) if needed to support real-time features.
1. If the merge request adds any new libraries (gems, JavaScript libraries, etc.),
they should conform to our [Licensing guidelines](../licensing.md). See those
diff --git a/doc/development/fe_guide/index.md b/doc/development/fe_guide/index.md
index 65b2f6f9718..f590473c3c3 100644
--- a/doc/development/fe_guide/index.md
+++ b/doc/development/fe_guide/index.md
@@ -121,3 +121,7 @@ Our accessibility standards and resources.
Frontend internationalization support is described in [this document](../i18n/).
The [externalization part of the guide](../i18n/externalization.md) explains the helpers/methods available.
+
+## [Troubleshooting](troubleshooting.md)
+
+Running into a Frontend development problem? Check out [this guide](troubleshooting.md) to help resolve your issue.
diff --git a/doc/development/fe_guide/troubleshooting.md b/doc/development/fe_guide/troubleshooting.md
new file mode 100644
index 00000000000..641bbdcbd8d
--- /dev/null
+++ b/doc/development/fe_guide/troubleshooting.md
@@ -0,0 +1,41 @@
+---
+stage: none
+group: unassigned
+info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
+---
+
+# Troubleshooting
+
+Running into a problem? Maybe this will help ¯\_(ツ)_/¯.
+
+## Troubleshooting issues
+
+### This guide doesn't contain the issue I ran into
+
+If you run into a Frontend development issue that is not in this guide, please consider updating this guide with your issue and possible remedies. This way future adventurers can face these dragons with more success, being armed with your experience and knowedge.
+
+## Testing issues
+
+### ``Property or method `nodeType` is not defined`` but I'm not using `nodeType` anywhere
+
+This issue can happen in Vue component tests, when an expectation fails, but there is an error thrown when
+Jest tries to pretty print the diff in the console. It's been noted that using `toEqual` with an array as a
+property might also be a contributing factor.
+
+See [this video](https://youtu.be/-BkEhghP-kM) for an in-depth overview and investigation.
+
+**Remedy - Try cloning the object that has Vue watchers**
+
+```patch
+- expect(wrapper.find(ChildComponent).props()).toEqual(...);
++ expect(cloneDeep(wrapper.find(ChildComponent).props())).toEqual(...)
+```
+
+**Remedy - Try using `toMatchObject` instead of `toEqual`**
+
+```patch
+- expect(wrapper.find(ChildComponent).props()).toEqual(...);
++ expect(wrapper.find(ChildComponent).props()).toMatchObject(...);
+```
+
+Please note that `toMatchObject` actually changes the nature of the assertion and won't fail if some items are **missing** from the expectation.
diff --git a/doc/development/foreign_keys.md b/doc/development/foreign_keys.md
index 37764a12f97..abe191ace5e 100644
--- a/doc/development/foreign_keys.md
+++ b/doc/development/foreign_keys.md
@@ -75,7 +75,7 @@ your models _unless_ absolutely required and only when approved by database
specialists. For example, if each row in a table has a corresponding file on a
file system it may be tempting to add a `after_destroy` hook. This however
introduces non database logic to a model, and means we can no longer rely on
-foreign keys to remove the data as this would result in the filesystem data
+foreign keys to remove the data as this would result in the file system data
being left behind. In such a case you should use a service class instead that
takes care of removing non database data.
diff --git a/doc/development/secure_coding_guidelines.md b/doc/development/secure_coding_guidelines.md
index a73f57e727a..41a7defbc26 100644
--- a/doc/development/secure_coding_guidelines.md
+++ b/doc/development/secure_coding_guidelines.md
@@ -423,14 +423,14 @@ Path Traversal attacks can lead to multiple critical and high severity issues, l
### When to consider
-When working with user-controlled filenames/paths and filesystem APIs.
+When working with user-controlled filenames/paths and file system APIs.
### Mitigation and prevention
In order to prevent Path Traversal vulnerabilities, user-controlled filenames or paths should be validated before being processed.
- Comparing user input against an allowlist of allowed values or verifying that it only contains allowed characters.
-- After validating the user supplied input, it should be appended to the base directory and the path should be canonicalized using the filesystem API.
+- After validating the user supplied input, it should be appended to the base directory and the path should be canonicalized using the file system API.
#### GitLab specific validations
diff --git a/doc/development/shared_files.md b/doc/development/shared_files.md
index 859650c2e6c..6c273f2899d 100644
--- a/doc/development/shared_files.md
+++ b/doc/development/shared_files.md
@@ -32,7 +32,7 @@ disk in a temporary file so you can perform some checks on it. When the checks
pass, you make the file official. In scenarios like this please follow these
rules:
-- Store the temporary file under `shared/tmp`, i.e. on the same filesystem you
+- Store the temporary file under `shared/tmp`, i.e. on the same file system you
want the official file to be on.
- Use move/rename operations when operating on the file instead of copy
operations where possible, because renaming a file is much faster than
diff --git a/doc/development/shell_commands.md b/doc/development/shell_commands.md
index db72454b482..f28828c2e4e 100644
--- a/doc/development/shell_commands.md
+++ b/doc/development/shell_commands.md
@@ -202,7 +202,7 @@ When using regular expressions to validate user input that is passed as an argum
If you don't, an attacker could use this to execute commands with potentially harmful effect.
-For example, when a project's `import_url` is validated like below, the user could trick GitLab into cloning from a Git repository on the local filesystem.
+For example, when a project's `import_url` is validated like below, the user could trick GitLab into cloning from a Git repository on the local file system.
```ruby
validates :import_url, format: { with: URI.regexp(%w(ssh git http https)) }
diff --git a/doc/raketasks/backup_restore.md b/doc/raketasks/backup_restore.md
index 818788a7ef2..0b8a1b961ea 100644
--- a/doc/raketasks/backup_restore.md
+++ b/doc/raketasks/backup_restore.md
@@ -16,7 +16,7 @@ of GitLab on which it was created. The best way to migrate your repositories
from one server to another is through backup restore.
WARNING:
-GitLab doesn't back up items that aren't stored in the filesystem. If you're
+GitLab doesn't back up items that aren't stored in the file system. If you're
using [object storage](../administration/object_storage.md), be sure to enable
backups with your object storage provider, if desired.
@@ -1042,12 +1042,12 @@ is being discussed in [issue #17517](https://gitlab.com/gitlab-org/gitlab/-/issu
If your GitLab server contains a lot of Git repository data, you may find the
GitLab backup script to be too slow. In this case you can consider using
-filesystem snapshots as part of your backup strategy.
+file system snapshots as part of your backup strategy.
Example: Amazon EBS
> A GitLab server using Omnibus GitLab hosted on Amazon AWS.
-> An EBS drive containing an ext4 filesystem is mounted at `/var/opt/gitlab`.
+> An EBS drive containing an ext4 file system is mounted at `/var/opt/gitlab`.
> In this case you could make an application backup by taking an EBS snapshot.
> The backup includes all repositories, uploads and PostgreSQL data.
@@ -1055,7 +1055,7 @@ Example: LVM snapshots + rsync
> A GitLab server using Omnibus GitLab, with an LVM logical volume mounted at `/var/opt/gitlab`.
> Replicating the `/var/opt/gitlab` directory using rsync would not be reliable because too many files would change while rsync is running.
-> Instead of rsync-ing `/var/opt/gitlab`, we create a temporary LVM snapshot, which we mount as a read-only filesystem at `/mnt/gitlab_backup`.
+> Instead of rsync-ing `/var/opt/gitlab`, we create a temporary LVM snapshot, which we mount as a read-only file system at `/mnt/gitlab_backup`.
> Now we can have a longer running rsync job which creates a consistent replica on the remote server.
> The replica includes all repositories, uploads and PostgreSQL data.
@@ -1370,7 +1370,7 @@ To get your registry working again:
sudo chown -R registry:registry /var/opt/gitlab/gitlab-rails/shared/registry/docker
```
-If you changed the default filesystem location for the registry, run `chown`
+If you changed the default file system location for the registry, run `chown`
against your custom location, instead of `/var/opt/gitlab/gitlab-rails/shared/registry/docker`.
### Backup fails to complete with Gzip error
diff --git a/doc/raketasks/cleanup.md b/doc/raketasks/cleanup.md
index 9467ef1dd72..82b947746de 100644
--- a/doc/raketasks/cleanup.md
+++ b/doc/raketasks/cleanup.md
@@ -74,7 +74,7 @@ I, [2020-01-08T20:51:17.148765 #43765] INFO -- : Removed unreferenced LFS files
Clean up project upload files if they don't exist in GitLab database.
-### Clean up project upload files from filesystem
+### Clean up project upload files from file system
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/20863) in GitLab 11.2.
diff --git a/doc/user/admin_area/index.md b/doc/user/admin_area/index.md
index a5bbadf7e1b..a50ccc71b8f 100644
--- a/doc/user/admin_area/index.md
+++ b/doc/user/admin_area/index.md
@@ -24,7 +24,7 @@ The Admin Area is made up of the following sections:
| Section | Description |
|:-----------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **{overview}** [Overview](#overview-section) | View your GitLab [Dashboard](#admin-dashboard), and administer [projects](#administering-projects), [users](#administering-users), [groups](#administering-groups), [jobs](#administering-jobs), [runners](#administering-runners), and [Gitaly servers](#administering-gitaly-servers). |
-| **{monitor}** Monitoring | View GitLab [system information](#system-info), and information on [background jobs](#background-jobs), [logs](#logs), [health checks](monitoring/health_check.md), [requests profiles](#requests-profiles), and [audit events](#audit-events). |
+| **{monitor}** Monitoring | View GitLab [system information](#system-information), and information on [background jobs](#background-jobs), [logs](#logs), [health checks](monitoring/health_check.md), [requests profiles](#requests-profiles), and [audit events](#audit-events). |
| **{messages}** Messages | Send and manage [broadcast messages](broadcast_messages.md) for your users. |
| **{hook}** System Hooks | Configure [system hooks](../../system_hooks/system_hooks.md) for many events. |
| **{applications}** Applications | Create system [OAuth applications](../../integration/oauth_provider.md) for integrations with other services. |
@@ -37,7 +37,7 @@ The Admin Area is made up of the following sections:
| **{lock}** Credentials **(ULTIMATE SELF)** | View [credentials](credentials_inventory.md) that can be used to access your instance. |
| **{template}** Service Templates | Create [service templates](../project/integrations/services_templates.md) for projects. |
| **{labels}** Labels | Create and maintain [labels](labels.md) for your GitLab instance. |
-| **{appearance}** Appearance | Customize [GitLab appearance](appearance.md). |
+| **{appearance}** Appearance | Customize [GitLab appearance](appearance.md). |
| **{settings}** Settings | Modify the [settings](settings/index.md) for your GitLab instance. |
## Admin Dashboard
@@ -267,7 +267,7 @@ For each Gitaly server, the following details are listed:
The following topics document the **Monitoring** section of the Admin Area.
-### System Info
+### System Information
The **System Info** page provides the following statistics:
@@ -314,7 +314,7 @@ For multi-node systems we recommend ingesting the logs into services like Elasti
| `integrations_json.log` | Activity between GitLab and integrated systems |
| `kubernetes.log` | Kubernetes activity |
-The contents of these log files can be useful when troubleshooting a problem.
+The contents of these log files can be useful when troubleshooting a problem.
For details of these log files and their contents, see [Log system](../../administration/logs.md).
diff --git a/doc/user/admin_area/monitoring/health_check.md b/doc/user/admin_area/monitoring/health_check.md
index d24ccf0d10b..2d4683911fb 100644
--- a/doc/user/admin_area/monitoring/health_check.md
+++ b/doc/user/admin_area/monitoring/health_check.md
@@ -15,7 +15,7 @@ type: concepts, howto
GitLab provides liveness and readiness probes to indicate service health and
reachability to required services. These probes report on the status of the
-database connection, Redis connection, and access to the filesystem. These
+database connection, Redis connection, and access to the file system. These
endpoints [can be provided to schedulers like Kubernetes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) to hold
traffic until the system is ready or restart the container as needed.
diff --git a/doc/user/analytics/productivity_analytics.md b/doc/user/analytics/productivity_analytics.md
index 5a5f386353a..a06d94caf69 100644
--- a/doc/user/analytics/productivity_analytics.md
+++ b/doc/user/analytics/productivity_analytics.md
@@ -16,7 +16,7 @@ long, on average, it takes to deliver features is an enormous endeavor.
While [Value Stream Analytics](../analytics/value_stream_analytics.md) focuses on the entire
Software Development Life Cycle (SDLC) process, Productivity Analytics provides a way for Engineering Management to drill down in a systematic way to uncover patterns and causes for success or failure at an individual, project, or group level.
-Productivity can slow down for many reasons ranging from degrading code base to quickly growing teams. In order to investigate, department or team leaders can start by visualizing the time it takes for merge requests to be merged.
+Productivity can slow down for many reasons ranging from degrading codebase to quickly growing teams. In order to investigate, department or team leaders can start by visualizing the time it takes for merge requests to be merged.
## Supported features
diff --git a/doc/user/application_security/api_fuzzing/index.md b/doc/user/application_security/api_fuzzing/index.md
index 28f8d873f85..04ad7852771 100644
--- a/doc/user/application_security/api_fuzzing/index.md
+++ b/doc/user/application_security/api_fuzzing/index.md
@@ -69,7 +69,7 @@ Examples of both configurations can be found here:
The [OpenAPI Specification](https://www.openapis.org/) (formerly the Swagger Specification) is an
API description format for REST APIs. This section shows you how to configure API fuzzing by using
an OpenAPI specification to provide information about the target API to test. OpenAPI specifications
-are provided as a filesystem resource or URL.
+are provided as a file system resource or URL.
Follow these steps to configure API fuzzing in GitLab with an OpenAPI specification:
diff --git a/doc/user/application_security/coverage_fuzzing/index.md b/doc/user/application_security/coverage_fuzzing/index.md
index 1817bcba937..09f17f24470 100644
--- a/doc/user/application_security/coverage_fuzzing/index.md
+++ b/doc/user/application_security/coverage_fuzzing/index.md
@@ -201,7 +201,7 @@ is a good way to balance the needs of letting a developer's per-commit pipeline
and also giving the fuzzer a large amount of time to fully explore and test the app.
Long-running fuzzing jobs are usually necessary for the coverage guided fuzzer to find deeper bugs
-in your latest code base. THe following is an example of what `.gitlab-ci.yml` looks like in this
+in your latest codebase. THe following is an example of what `.gitlab-ci.yml` looks like in this
workflow (for the full example, see the [repository](https://gitlab.com/gitlab-org/security-products/demos/coverage-fuzzing/go-fuzzing-example/-/tree/continuous_fuzzing)):
```yaml
diff --git a/doc/user/application_security/vulnerability_report/index.md b/doc/user/application_security/vulnerability_report/index.md
index 1a423305c94..2f5435ec75f 100644
--- a/doc/user/application_security/vulnerability_report/index.md
+++ b/doc/user/application_security/vulnerability_report/index.md
@@ -52,7 +52,7 @@ You can also dismiss vulnerabilities in the table:
The vulnerabilities that exist in your project's
[default branch](../../project/repository/branches/index.md#default-branch) are accessed by navigating to
-**Security & Compliance > Vulnerability Report**.
+**Security & Compliance > Vulnerability Report**.
The project vulnerability report first displays the time at which the last pipeline completed on the project's
default branch. There's also a link to view this in more detail. In the case of any pipeline failures,
@@ -83,7 +83,7 @@ The fields in the export include:
- Status
- Vulnerability
- Details
-- Additional Info
+- Additional Information
- Severity
- [CVE](https://cve.mitre.org/) (Common Vulnerabilities and Exposures)
- [CWE](https://cwe.mitre.org/) (Common Weakness Enumeration)
diff --git a/doc/user/feature_flags.md b/doc/user/feature_flags.md
index 9a601871349..a6be4c69f81 100644
--- a/doc/user/feature_flags.md
+++ b/doc/user/feature_flags.md
@@ -29,11 +29,11 @@ GitLab.com. To see the full notes:
1. Click the three-dots icon (ellipsis) to expand version history notes:
- ![Version history note with FF info](img/version_history_notes_collapsed_v13_2.png)
+ ![Version history note with FF information](img/version_history_notes_collapsed_v13_2.png)
1. Read the version history information:
- ![Version history note with FF info](img/feature_flags_history_note_info_v13_2.png)
+ ![Version history note with FF information](img/feature_flags_history_note_info_v13_2.png)
If you're a user of a GitLab self-managed instance and you want to try to use a
disabled feature, you can ask a [GitLab administrator to enable it](../administration/feature_flags.md),
diff --git a/doc/user/packages/generic_packages/index.md b/doc/user/packages/generic_packages/index.md
index 83fc63863ce..11af10bf8a0 100644
--- a/doc/user/packages/generic_packages/index.md
+++ b/doc/user/packages/generic_packages/index.md
@@ -48,7 +48,7 @@ PUT /projects/:id/packages/generic/:package_name/:package_version/:file_name
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](../../../api/README.md#namespaced-path-encoding). |
| `package_name` | string | yes | The package name. It can contain only lowercase letters (`a-z`), uppercase letter (`A-Z`), numbers (`0-9`), dots (`.`), hyphens (`-`), or underscores (`_`).
| `package_version` | string | yes | The package version. It can contain only numbers (`0-9`), and dots (`.`). Must be in the format of `X.Y.Z`, i.e. should match `/\A\d+\.\d+\.\d+\z/` regular expression.
-| `file_name` | string | yes | The file name. It can contain only lowercase letters (`a-z`), uppercase letter (`A-Z`), numbers (`0-9`), dots (`.`), hyphens (`-`), or underscores (`_`).
+| `file_name` | string | yes | The filename. It can contain only lowercase letters (`a-z`), uppercase letter (`A-Z`), numbers (`0-9`), dots (`.`), hyphens (`-`), or underscores (`_`).
Provide the file context in the request body.
@@ -87,7 +87,7 @@ GET /projects/:id/packages/generic/:package_name/:package_version/:file_name
| `id` | integer/string | yes | The ID or [URL-encoded path of the project](../../../api/README.md#namespaced-path-encoding). |
| `package_name` | string | yes | The package name. |
| `package_version` | string | yes | The package version. |
-| `file_name` | string | yes | The file name. |
+| `file_name` | string | yes | The filename. |
The file context is served in the response body. The response content type is `application/octet-stream`.
diff --git a/doc/user/project/import/svn.md b/doc/user/project/import/svn.md
index 3642d07106c..a816dca59bc 100644
--- a/doc/user/project/import/svn.md
+++ b/doc/user/project/import/svn.md
@@ -30,7 +30,7 @@ There are two approaches to SVN to Git migration:
migration. It creates a writable Git mirror of a local or remote Subversion
repository and that way you can use both Subversion and Git as long as you like.
It requires access to your GitLab server as it talks with the Git repositories
-directly in a filesystem level.
+directly in a file system level.
### SubGit prerequisites
diff --git a/doc/user/project/repository/repository_mirroring.md b/doc/user/project/repository/repository_mirroring.md
index 2706a3daaae..efd7353c883 100644
--- a/doc/user/project/repository/repository_mirroring.md
+++ b/doc/user/project/repository/repository_mirroring.md
@@ -411,7 +411,7 @@ to generate a new key. You'll have to update the other repository with the new
key to keep the mirror running.
NOTE:
-The generated keys are stored in the GitLab database, not in the filesystem. Therefore,
+The generated keys are stored in the GitLab database, not in the file system. Therefore,
SSH public key authentication for mirrors cannot be used in a pre-receive hook.
## Forcing an update **(FREE)**
diff --git a/package.json b/package.json
index fa4a0ed618d..510a08c30b1 100644
--- a/package.json
+++ b/package.json
@@ -163,7 +163,7 @@
},
"devDependencies": {
"@babel/plugin-transform-modules-commonjs": "^7.10.1",
- "@gitlab/eslint-plugin": "7.0.2",
+ "@gitlab/eslint-plugin": "7.0.3",
"@testing-library/dom": "^7.16.2",
"@vue/test-utils": "1.1.2",
"acorn": "^6.3.0",
diff --git a/qa/qa/page/project/members.rb b/qa/qa/page/project/members.rb
index 447049ce22a..7e722e02ad0 100644
--- a/qa/qa/page/project/members.rb
+++ b/qa/qa/page/project/members.rb
@@ -11,10 +11,6 @@ module QA
element :invite_member_button
end
- view 'app/views/projects/project_members/_team.html.haml' do
- element :members_list
- end
-
view 'app/views/projects/project_members/index.html.haml' do
element :invite_group_tab
element :groups_list_tab
@@ -25,11 +21,18 @@ module QA
element :invite_group_button
end
- view 'app/views/shared/members/_group.html.haml' do
+ view 'app/assets/javascripts/pages/projects/project_members/index.js' do
element :group_row
+ end
+
+ view 'app/assets/javascripts/members/components/action_buttons/remove_group_link_button.vue' do
element :delete_group_access_link
end
+ view 'app/assets/javascripts/members/components/modals/remove_group_link_modal.vue' do
+ element :remove_group_link_modal_content
+ end
+
def select_group(group_name)
click_element :group_select_field
search_and_select(group_name)
@@ -50,10 +53,13 @@ module QA
def remove_group(group_name)
click_element :invite_group_tab
click_element :groups_list_tab
- page.accept_alert do
- within_element(:group_row, text: group_name) do
- click_element :delete_group_access_link
- end
+
+ within_element(:group_row, text: group_name) do
+ click_element :delete_group_access_link
+ end
+
+ within_element(:remove_group_link_modal_content) do
+ click_button 'Remove group'
end
end
end
diff --git a/qa/qa/resource/merge_request.rb b/qa/qa/resource/merge_request.rb
index 3f1a20a1b15..fd5f454f134 100644
--- a/qa/qa/resource/merge_request.rb
+++ b/qa/qa/resource/merge_request.rb
@@ -19,7 +19,8 @@ module QA
:file_name,
:file_content
attr_writer :no_preparation,
- :wait_for_merge
+ :wait_for_merge,
+ :template
attribute :merge_when_pipeline_succeeds
attribute :merge_status
@@ -73,7 +74,8 @@ module QA
Page::Project::Show.perform(&:new_merge_request)
Page::MergeRequest::New.perform do |new_page|
new_page.fill_title(@title)
- new_page.fill_description(@description)
+ new_page.choose_template(@template) if @template
+ new_page.fill_description(@description) unless @template
new_page.choose_milestone(@milestone) if @milestone
new_page.assign_to_me if @assignee == 'me'
labels.each do |label|
diff --git a/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb
index e71cbeb9837..85cfefd6c5c 100644
--- a/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb
+++ b/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb
@@ -1,8 +1,16 @@
# frozen_string_literal: true
module QA
- RSpec.describe 'Manage' do
+ RSpec.describe 'Manage', :requires_admin do
describe 'Add project member' do
+ before do
+ Runtime::Feature.enable('vue_project_members_list')
+ end
+
+ after do
+ Runtime::Feature.disable('vue_project_members_list')
+ end
+
it 'user adds project member', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/482' do
Flow::Login.sign_in
@@ -16,7 +24,7 @@ module QA
Page::Project::Members.perform do |members|
members.add_member(user.username)
- expect(members).to have_content(/@#{user.username}( Is using seat)?(\n| )?Given access/)
+ expect(members).to have_content("@#{user.username}")
end
end
end
diff --git a/qa/qa/specs/features/browser_ui/2_plan/email/trigger_email_notification_spec.rb b/qa/qa/specs/features/browser_ui/2_plan/email/trigger_email_notification_spec.rb
index fbaf4241cec..f623efe5a3a 100644
--- a/qa/qa/specs/features/browser_ui/2_plan/email/trigger_email_notification_spec.rb
+++ b/qa/qa/specs/features/browser_ui/2_plan/email/trigger_email_notification_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- RSpec.describe 'Plan', :orchestrated, :smtp do
+ RSpec.describe 'Plan', :orchestrated, :smtp, :requires_admin do
describe 'Email Notification' do
include Support::Api
@@ -16,9 +16,14 @@ module QA
end
before do
+ Runtime::Feature.enable('vue_project_members_list', project: project)
Flow::Login.sign_in
end
+ after do
+ Runtime::Feature.disable('vue_project_members_list', project: project)
+ end
+
it 'is received by a user for project invitation', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/676' do
project.visit!
@@ -27,7 +32,7 @@ module QA
member_settings.add_member(user.username)
end
- expect(page).to have_content(/@#{user.username}(\n| )?Given access/)
+ expect(page).to have_content("@#{user.username}")
mailhog_items = mailhog_json.dig('items')
diff --git a/qa/qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_via_template_spec.rb b/qa/qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_via_template_spec.rb
new file mode 100644
index 00000000000..d8341eff41d
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_via_template_spec.rb
@@ -0,0 +1,47 @@
+# frozen_string_literal: true
+
+module QA
+ RSpec.describe 'Create' do
+ describe 'Merge request custom templates' do
+ let(:template_name) { 'custom_merge_request_template'}
+ let(:template_content) { 'This is a custom merge request template test' }
+ let(:template_project) do
+ Resource::Project.fabricate_via_api! do |project|
+ project.name = 'custom-mr-template-project'
+ project.initialize_with_readme = true
+ end
+ end
+
+ let(:merge_request_title) { 'One merge request to rule them all' }
+
+ before do
+ Flow::Login.sign_in
+
+ Resource::Repository::Commit.fabricate_via_api! do |commit|
+ commit.project = template_project
+ commit.commit_message = 'Add custom merge request template'
+ commit.add_files([
+ {
+ file_path: ".gitlab/merge_request_templates/#{template_name}.md",
+ content: template_content
+ }
+ ])
+ end
+ end
+
+ it 'creates a merge request via custom template', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1230' do
+ Resource::MergeRequest.fabricate_via_browser_ui! do |merge_request|
+ merge_request.project = template_project
+ merge_request.title = merge_request_title
+ merge_request.template = template_name
+ merge_request.target_new_branch = false
+ end
+
+ Page::MergeRequest::Show.perform do |merge_request|
+ expect(merge_request).to have_title(merge_request_title)
+ expect(merge_request).to have_description(template_content)
+ end
+ end
+ end
+ end
+end
diff --git a/spec/frontend/notes/components/note_actions_spec.js b/spec/frontend/notes/components/note_actions_spec.js
index 4661e4b1279..7c3d747711c 100644
--- a/spec/frontend/notes/components/note_actions_spec.js
+++ b/spec/frontend/notes/components/note_actions_spec.js
@@ -5,8 +5,8 @@ import { TEST_HOST } from 'spec/test_constants';
import createStore from '~/notes/stores';
import noteActions from '~/notes/components/note_actions.vue';
import axios from '~/lib/utils/axios_utils';
-import { userDataMock } from '../mock_data';
import { BV_HIDE_TOOLTIP } from '~/lib/utils/constants';
+import { userDataMock } from '../mock_data';
describe('noteActions', () => {
let wrapper;
diff --git a/spec/frontend/pipeline_editor/components/commit/commit_section_spec.js b/spec/frontend/pipeline_editor/components/commit/commit_section_spec.js
index a480af3ea5b..269c0cb525e 100644
--- a/spec/frontend/pipeline_editor/components/commit/commit_section_spec.js
+++ b/spec/frontend/pipeline_editor/components/commit/commit_section_spec.js
@@ -5,6 +5,7 @@ import CommitForm from '~/pipeline_editor/components/commit/commit_form.vue';
import { objectToQuery, redirectTo } from '~/lib/utils/url_utility';
import commitCreate from '~/pipeline_editor/graphql/mutations/commit_ci_file.mutation.graphql';
+import { COMMIT_SUCCESS } from '~/pipeline_editor/constants';
import {
mockCiConfigPath,
mockCiYml,
@@ -15,7 +16,6 @@ import {
mockProjectFullPath,
mockNewMergeRequestPath,
} from '../../mock_data';
-import { COMMIT_SUCCESS } from '~/pipeline_editor/constants';
jest.mock('~/lib/utils/url_utility', () => ({
redirectTo: jest.fn(),
diff --git a/spec/frontend/pipeline_editor/components/text_editor_spec.js b/spec/frontend/pipeline_editor/components/text_editor_spec.js
index 86ee370bb72..9bb4bb6c210 100644
--- a/spec/frontend/pipeline_editor/components/text_editor_spec.js
+++ b/spec/frontend/pipeline_editor/components/text_editor_spec.js
@@ -1,5 +1,7 @@
import { shallowMount } from '@vue/test-utils';
+import { EDITOR_READY_EVENT } from '~/editor/constants';
+import TextEditor from '~/pipeline_editor/components/text_editor.vue';
import {
mockCiConfigPath,
mockCiYml,
@@ -8,9 +10,6 @@ import {
mockProjectNamespace,
} from '../mock_data';
-import { EDITOR_READY_EVENT } from '~/editor/constants';
-import TextEditor from '~/pipeline_editor/components/text_editor.vue';
-
describe('Pipeline Editor | Text editor component', () => {
let wrapper;
diff --git a/spec/frontend/pipeline_editor/pipeline_editor_app_spec.js b/spec/frontend/pipeline_editor/pipeline_editor_app_spec.js
index d9e7c708396..7ffdf1815ba 100644
--- a/spec/frontend/pipeline_editor/pipeline_editor_app_spec.js
+++ b/spec/frontend/pipeline_editor/pipeline_editor_app_spec.js
@@ -6,6 +6,12 @@ import createMockApollo from 'helpers/mock_apollo_helper';
import TextEditor from '~/pipeline_editor/components/text_editor.vue';
import httpStatusCodes from '~/lib/utils/http_status';
+
+import { COMMIT_SUCCESS, COMMIT_FAILURE, LOAD_FAILURE_UNKNOWN } from '~/pipeline_editor/constants';
+import CommitForm from '~/pipeline_editor/components/commit/commit_form.vue';
+import getCiConfigData from '~/pipeline_editor/graphql/queries/ci_config.graphql';
+import PipelineEditorApp from '~/pipeline_editor/pipeline_editor_app.vue';
+import PipelineEditorHome from '~/pipeline_editor/pipeline_editor_home.vue';
import {
mockCiConfigPath,
mockCiConfigQueryResponse,
@@ -14,12 +20,6 @@ import {
mockProjectFullPath,
} from './mock_data';
-import { COMMIT_SUCCESS, COMMIT_FAILURE, LOAD_FAILURE_UNKNOWN } from '~/pipeline_editor/constants';
-import CommitForm from '~/pipeline_editor/components/commit/commit_form.vue';
-import getCiConfigData from '~/pipeline_editor/graphql/queries/ci_config.graphql';
-import PipelineEditorApp from '~/pipeline_editor/pipeline_editor_app.vue';
-import PipelineEditorHome from '~/pipeline_editor/pipeline_editor_home.vue';
-
const localVue = createLocalVue();
localVue.use(VueApollo);
diff --git a/spec/frontend/pipelines/graph/linked_pipeline_spec.js b/spec/frontend/pipelines/graph/linked_pipeline_spec.js
index 75537104773..fcae4406950 100644
--- a/spec/frontend/pipelines/graph/linked_pipeline_spec.js
+++ b/spec/frontend/pipelines/graph/linked_pipeline_spec.js
@@ -3,8 +3,8 @@ import { GlButton, GlLoadingIcon } from '@gitlab/ui';
import LinkedPipelineComponent from '~/pipelines/components/graph/linked_pipeline.vue';
import CiStatus from '~/vue_shared/components/ci_icon.vue';
import { UPSTREAM, DOWNSTREAM } from '~/pipelines/components/graph/constants';
-import mockData from './linked_pipelines_mock_data';
import { BV_HIDE_TOOLTIP } from '~/lib/utils/constants';
+import mockData from './linked_pipelines_mock_data';
const mockPipeline = mockData.triggered[0];
const validTriggeredPipelineId = mockPipeline.project.id;
diff --git a/spec/frontend/vue_mr_widget/components/states/mr_widget_merged_spec.js b/spec/frontend/vue_mr_widget/components/states/mr_widget_merged_spec.js
index d52240b0b2e..cdb80b30d36 100644
--- a/spec/frontend/vue_mr_widget/components/states/mr_widget_merged_spec.js
+++ b/spec/frontend/vue_mr_widget/components/states/mr_widget_merged_spec.js
@@ -1,6 +1,6 @@
import Vue from 'vue';
-import mountComponent from 'helpers/vue_mount_component_helper';
import { getByRole } from '@testing-library/dom';
+import mountComponent from 'helpers/vue_mount_component_helper';
import mergedComponent from '~/vue_merge_request_widget/components/states/mr_widget_merged.vue';
import eventHub from '~/vue_merge_request_widget/event_hub';
import modalEventHub from '~/projects/commit/event_hub';
diff --git a/yarn.lock b/yarn.lock
index c33e7468723..05d09f74cc3 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -845,10 +845,10 @@
resolved "https://registry.yarnpkg.com/@gitlab/at.js/-/at.js-1.5.7.tgz#1ee6f838cc4410a1d797770934df91d90df8179e"
integrity sha512-c6ySRK/Ma7lxwpIVbSAF3P+xiTLrNTGTLRx4/pHK111AdFxwgUwrYF6aVZFXvmG65jHOJHoa0eQQ21RW6rm0Rg==
-"@gitlab/eslint-plugin@7.0.2":
- version "7.0.2"
- resolved "https://registry.yarnpkg.com/@gitlab/eslint-plugin/-/eslint-plugin-7.0.2.tgz#cb2ca7a54ed1f8c274829e050de720dbd0fc36d4"
- integrity sha512-ypFd4b5PL6mPFQHL9APU/Sq8KBa7GbPGgwnQgGEce9iioiriXFazBsoNgyBIHapCS0DIkYq+kC+pdIB+5s+ypA==
+"@gitlab/eslint-plugin@7.0.3":
+ version "7.0.3"
+ resolved "https://registry.yarnpkg.com/@gitlab/eslint-plugin/-/eslint-plugin-7.0.3.tgz#a5e020dd785cb71624af8f6a2e3b79128b4322b9"
+ integrity sha512-IVQRfiu/qA80h60HukMbg5wftl6axDCkdcApl4OGIy/wZ+sN33d602pZv5VEc5M7QffJY34c4EHYnQbMZ4nqOw==
dependencies:
babel-eslint "^10.0.3"
eslint-config-airbnb-base "^14.0.0"