Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-02-04 09:09:30 +00:00
parent a0806c7320
commit 72241c5e0a
71 changed files with 388 additions and 149 deletions

View File

@ -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/**/*'

View File

@ -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;

View File

@ -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

View File

@ -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';

View File

@ -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>

View File

@ -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"
>

View File

@ -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();

View File

@ -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];

View File

@ -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

View File

@ -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]';

View File

@ -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: {

View File

@ -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';

View File

@ -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,

View File

@ -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',

View File

@ -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,

View File

@ -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

View File

@ -0,0 +1,5 @@
---
title: Re-add migration to fix invalid merge request index
merge_request: 53042
author:
type: other

View File

@ -0,0 +1,5 @@
---
title: Update (?) link to sprite question icon
merge_request: 52655
author: Yogi (@yo)
type: other

View File

@ -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

View File

@ -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

View File

@ -0,0 +1 @@
71220cfc36215f6c22d22d1fb0b74389e90c58733214b5fa36dcb8da0377a120

View File

@ -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`

View File

@ -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:

View File

@ -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:

View File

@ -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.

View File

@ -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

View File

@ -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.

View File

@ -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)

View File

@ -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):

View File

@ -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.

View File

@ -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

View File

@ -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:

View File

@ -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.

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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).

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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)) }

View File

@ -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

View File

@ -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.

View File

@ -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).

View File

@ -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.

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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)

View File

@ -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),

View File

@ -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`.

View File

@ -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

View File

@ -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)**

View File

@ -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",

View File

@ -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

View File

@ -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|

View File

@ -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

View File

@ -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')

View File

@ -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

View File

@ -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;

View File

@ -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(),

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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';

View File

@ -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"