Skip to content
Snippets Groups Projects
Commit 9735395f authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 33586a7a
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -8,7 +8,7 @@ help GitLab administrators diagnose problem repositories so they can be fixed.
 
There are 3 things that are checked to determine integrity.
 
1. Git repository file system check ([git fsck](https://git-scm.com/docs/git-fsck)).
1. Git repository file system check ([`git fsck`](https://git-scm.com/docs/git-fsck)).
This step verifies the connectivity and validity of objects in the repository.
1. Check for `config.lock` in the repository directory.
1. Check for any branch/references lock files in `refs/heads`.
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
## Git housekeeping
 
There are few tasks you can run to schedule a git housekeeping to start at the
There are few tasks you can run to schedule a Git housekeeping to start at the
next repository sync in a **Secondary node**:
 
### Incremental Repack
Loading
Loading
Loading
Loading
@@ -62,7 +62,7 @@ It will check that each component was set up according to the installation guide
You may also have a look at our Troubleshooting Guides:
 
- [Troubleshooting Guide (GitLab)](../index.md#troubleshooting)
- [Troubleshooting Guide (Omnibus Gitlab)](https://docs.gitlab.com/omnibus/README.html#troubleshooting)
- [Troubleshooting Guide (Omnibus GitLab)](https://docs.gitlab.com/omnibus/README.html#troubleshooting)
 
**Omnibus Installation**
 
Loading
Loading
@@ -76,7 +76,7 @@ sudo gitlab-rake gitlab:check
bundle exec rake gitlab:check RAILS_ENV=production
```
 
NOTE: Use SANITIZE=true for gitlab:check if you want to omit project names from the output.
NOTE: Use `SANITIZE=true` for `gitlab:check` if you want to omit project names from the output.
 
Example output:
 
Loading
Loading
@@ -146,7 +146,7 @@ You will lose any data stored in authorized_keys file.
Do you want to continue (yes/no)? yes
```
 
## Clear redis cache
## Clear Redis cache
 
If for some reason the dashboard shows wrong information you might want to
clear Redis' cache.
Loading
Loading
@@ -183,7 +183,7 @@ For omnibus versions, the unoptimized assets (JavaScript, CSS) are frozen at
the release of upstream GitLab. The omnibus version includes optimized versions
of those assets. Unless you are modifying the JavaScript / CSS code on your
production machine after installing the package, there should be no reason to redo
rake gitlab:assets:compile on the production machine. If you suspect that assets
`rake gitlab:assets:compile` on the production machine. If you suspect that assets
have been corrupted, you should reinstall the omnibus package.
 
## Tracking Deployments
Loading
Loading
Loading
Loading
@@ -459,7 +459,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| Name | Type | Description |
| --- | ---- | ---------- |
| `storageSize` | Int! | The total storage in Bytes |
| `repositorySize` | Int! | The git repository size in Bytes |
| `repositorySize` | Int! | The Git repository size in Bytes |
| `lfsObjectsSize` | Int! | The LFS objects size in Bytes |
| `buildArtifactsSize` | Int! | The CI artifacts size in Bytes |
| `packagesSize` | Int! | The packages size in Bytes |
Loading
Loading
Loading
Loading
@@ -823,7 +823,7 @@ Parameters:
 
## Create MR Pipeline
 
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/31722) in Gitlab 12.3.
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/31722) in GitLab 12.3.
 
Create a new [pipeline for a merge request](../ci/merge_request_pipelines/index.md). A pipeline created via this endpoint will not run a regular branch/tag pipeline, it requires `.gitlab-ci.yml` to be configured with `only: [merge_requests]` to create jobs.
 
Loading
Loading
Loading
Loading
@@ -102,7 +102,7 @@ CAUTION: **Important:**
Avoid using this flow for applications that store data outside of the GitLab
instance. If you do, make sure to verify `application id` associated with the
access token before granting access to the data
(see [/oauth/token/info](https://github.com/doorkeeper-gem/doorkeeper/wiki/API-endpoint-descriptions-and-examples#get----oauthtokeninfo)).
(see [`/oauth/token/info`](https://github.com/doorkeeper-gem/doorkeeper/wiki/API-endpoint-descriptions-and-examples#get----oauthtokeninfo)).
 
Unlike the web flow, the client receives an `access token` immediately as a
result of the authorization request. The flow does not use the client secret
Loading
Loading
Loading
Loading
@@ -10,7 +10,7 @@ Asana - Teamwork without email
 
Set Asana service for a project.
 
> This service adds commit messages as comments to Asana tasks. Once enabled, commit messages are checked for Asana task URLs (for example, `https://app.asana.com/0/123456/987654`) or task IDs starting with # (for example, `#987654`). Every task ID found will get the commit comment added to it. You can also close a task with a message containing: `fix #123456`. You can find your Api Keys here: <https://asana.com/developers/documentation/getting-started/auth#api-key>.
> This service adds commit messages as comments to Asana tasks. Once enabled, commit messages are checked for Asana task URLs (for example, `https://app.asana.com/0/123456/987654`) or task IDs starting with # (for example, `#987654`). Every task ID found will get the commit comment added to it. You can also close a task with a message containing: `fix #123456`. You can find your API Keys here: <https://asana.com/developers/documentation/getting-started/auth#api-key>.
 
```
PUT /projects/:id/services/asana
Loading
Loading
Loading
Loading
@@ -179,8 +179,8 @@ are listed in the descriptions of the relevant settings.
| `admin_notification_email` | string | no | Abuse reports will be sent to this address if it is set. Abuse reports are always available in the admin area. |
| `after_sign_out_path` | string | no | Where to redirect users after logout. |
| `after_sign_up_text` | string | no | Text shown to the user after signing up |
| `akismet_api_key` | string | required by: `akismet_enabled` | API key for akismet spam protection. |
| `akismet_enabled` | boolean | no | (**If enabled, requires:** `akismet_api_key`) Enable or disable akismet spam protection. |
| `akismet_api_key` | string | required by: `akismet_enabled` | API key for Akismet spam protection. |
| `akismet_enabled` | boolean | no | (**If enabled, requires:** `akismet_api_key`) Enable or disable Akismet spam protection. |
| `allow_group_owners_to_manage_ldap` | boolean | no | **(PREMIUM)** Set to `true` to allow group owners to manage LDAP |
| `allow_local_requests_from_hooks_and_services` | boolean | no | (Deprecated: Use `allow_local_requests_from_web_hooks_and_services` instead) Allow requests to the local network from hooks and services. |
| `allow_local_requests_from_system_hooks` | boolean | no | Allow requests to the local network from system hooks. |
Loading
Loading
@@ -214,7 +214,7 @@ are listed in the descriptions of the relevant settings.
| `ed25519_key_restriction` | integer | no | The minimum allowed curve size (in bits) of an uploaded ED25519 key. Default is `0` (no restriction). `-1` disables ED25519 keys. |
| `elasticsearch_aws_access_key` | string | no | **(PREMIUM)** AWS IAM access key |
| `elasticsearch_aws` | boolean | no | **(PREMIUM)** Enable the use of AWS hosted Elasticsearch |
| `elasticsearch_aws_region` | string | no | **(PREMIUM)** The AWS region the elasticsearch domain is configured |
| `elasticsearch_aws_region` | string | no | **(PREMIUM)** The AWS region the Elasticsearch domain is configured |
| `elasticsearch_aws_secret_access_key` | string | no | **(PREMIUM)** AWS IAM secret access key |
| `elasticsearch_indexing` | boolean | no | **(PREMIUM)** Enable Elasticsearch indexing |
| `elasticsearch_limit_indexing` | boolean | no | **(PREMIUM)** Limit Elasticsearch to index certain namespaces and projects |
Loading
Loading
@@ -286,12 +286,12 @@ are listed in the descriptions of the relevant settings.
| `plantuml_url` | string | required by: `plantuml_enabled` | The PlantUML instance URL for integration. |
| `polling_interval_multiplier` | decimal | no | Interval multiplier used by endpoints that perform polling. Set to `0` to disable polling. |
| `project_export_enabled` | boolean | no | Enable project export. |
| `prometheus_metrics_enabled` | boolean | no | Enable prometheus metrics. |
| `prometheus_metrics_enabled` | boolean | no | Enable Prometheus metrics. |
| `protected_ci_variables` | boolean | no | Environment variables are protected by default. |
| `pseudonymizer_enabled` | boolean | no | **(PREMIUM)** When enabled, GitLab will run a background job that will produce pseudonymized CSVs of the GitLab database that will be uploaded to your configured object storage directory.
| `recaptcha_enabled` | boolean | no | (**If enabled, requires:** `recaptcha_private_key` and `recaptcha_site_key`) Enable recaptcha. |
| `recaptcha_private_key` | string | required by: `recaptcha_enabled` | Private key for recaptcha. |
| `recaptcha_site_key` | string | required by: `recaptcha_enabled` | Site key for recaptcha. |
| `recaptcha_enabled` | boolean | no | (**If enabled, requires:** `recaptcha_private_key` and `recaptcha_site_key`) Enable reCAPTCHA. |
| `recaptcha_private_key` | string | required by: `recaptcha_enabled` | Private key for reCAPTCHA. |
| `recaptcha_site_key` | string | required by: `recaptcha_enabled` | Site key for reCAPTCHA. |
| `receive_max_input_size` | integer | no | Maximum push size (MB). |
| `repository_checks_enabled` | boolean | no | GitLab will periodically run `git fsck` in all project and wiki repositories to look for silent disk corruption issues. |
| `repository_size_limit` | integer | no | **(PREMIUM)** Size limit per repository (MB) |
Loading
Loading
Loading
Loading
@@ -58,9 +58,9 @@ For example, here's a single definition for Insights that will display one page
 
```yaml
bugsCharts:
title: 'Charts for Bugs'
title: "Charts for bugs"
charts:
- title: Monthly Bugs Created (bar)
- title: "Monthly bugs created"
type: bar
query:
issuable_type: issue
Loading
Loading
@@ -76,7 +76,7 @@ Each chart definition is made up of a hash composed of key-value pairs.
For example, here's single chart definition:
 
```yaml
- title: Monthly Bugs Created (bar)
- title: "Monthly bugs created"
type: bar
query:
issuable_type: issue
Loading
Loading
@@ -111,7 +111,7 @@ For example:
 
```yaml
monthlyBugsCreated:
title: Monthly Bugs Created (bar)
title: "Monthly bugs created"
```
 
### `type`
Loading
Loading
@@ -122,7 +122,7 @@ For example:
 
```yaml
monthlyBugsCreated:
title: Monthly Bugs Created (bar)
title: "Monthly bugs created"
type: bar
```
 
Loading
Loading
@@ -145,7 +145,7 @@ Example:
 
```yaml
monthlyBugsCreated:
title: Monthly Bugs Created (bar)
title: "Monthly bugs created"
type: bar
query:
issuable_type: issue
Loading
Loading
@@ -174,7 +174,7 @@ Supported values are:
 
Filter by the state of the queried "issuable".
 
If you omit it, the `opened` state filter will be applied.
By default, the `opened` state filter will be applied.
 
Supported values are:
 
Loading
Loading
@@ -188,14 +188,14 @@ Supported values are:
 
Filter by labels applied to the queried "issuable".
 
If you omit it, no labels filter will be applied. All the defined labels must be
By default, no labels filter will be applied. All the defined labels must be
applied to the "issuable" in order for it to be selected.
 
Example:
 
```yaml
monthlyBugsCreated:
title: Monthly regressions Created (bar)
title: "Monthly regressions created"
type: bar
query:
issuable_type: issue
Loading
Loading
@@ -209,14 +209,14 @@ monthlyBugsCreated:
 
Group "issuable" by the configured labels.
 
If you omit it, no grouping will be done. When using this keyword, you need to
By default, no grouping will be done. When using this keyword, you need to
set `type` to either `line` or `stacked-bar`.
 
Example:
 
```yaml
weeklyBugsBySeverity:
title: Weekly Bugs By Severity (stacked bar)
title: "Weekly bugs by severity"
type: stacked-bar
query:
issuable_type: issue
Loading
Loading
@@ -248,7 +248,7 @@ The unit is related to the `query.group_by` you defined. For instance if you
defined `query.group_by: 'day'` then `query.period_limit: 365` would mean
"Gather and display data for the last 365 days".
 
If you omit it, default values will be applied depending on the `query.group_by`
By default, default values will be applied depending on the `query.group_by`
you defined.
 
| `query.group_by` | Default value |
Loading
Loading
@@ -257,14 +257,63 @@ you defined.
| `week` | 4 |
| `month` | 12 |
 
### `projects`
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/10904) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 12.4.
You can limit where the "issuables" can be queried from:
- If `.gitlab/insights.yml` is used for a [group's insights](../../group/insights/index.md#configure-your-insights), with `projects`, you can limit the projects to be queried. By default, all projects under the group will be used.
- If `.gitlab/insights.yml` is used for a project's insights, specifying any other projects will yield no results. By default, the project itself will be used.
#### `projects.only`
The `projects.only` option specifies the projects which the "issuables"
should be queried from.
Projects listed here will be ignored when:
- They don't exist.
- The current user doesn't have sufficient permissions to read them.
- They are outside of the group.
In the following `insights.yml` example, we specify the projects
the queries will be used on. This example is useful when setting
a group's insights:
```yaml
monthlyBugsCreated:
title: "Monthly bugs created"
type: bar
query:
issuable_type: issue
issuable_state: opened
filter_labels:
- bug
projects:
only:
- 3 # You can use the project ID
- groupA/projectA # Or full project path
- groupA/subgroupB/projectC # Projects in subgroups can be included
- groupB/project # Projects outside the group will be ignored
```
## Complete example
 
```yaml
.projectsOnly: &projectsOnly
projects:
only:
- 3
- groupA/projectA
- groupA/subgroupB/projectC
bugsCharts:
title: 'Charts for Bugs'
title: "Charts for bugs"
charts:
- title: Monthly Bugs Created (bar)
- title: "Monthly bugs created"
type: bar
<<: *projectsOnly
query:
issuable_type: issue
issuable_state: opened
Loading
Loading
@@ -272,8 +321,10 @@ bugsCharts:
- bug
group_by: month
period_limit: 24
- title: Weekly Bugs By Severity (stacked bar)
- title: "Weekly bugs by severity"
type: stacked-bar
<<: *projectsOnly
query:
issuable_type: issue
issuable_state: opened
Loading
Loading
@@ -286,8 +337,10 @@ bugsCharts:
- S4
group_by: week
period_limit: 104
- title: Monthly Bugs By Team (line)
- title: "Monthly bugs by team"
type: line
<<: *projectsOnly
query:
issuable_type: merge_request
issuable_state: opened
Loading
Loading
import Tracking from '~/tracking';
export default Tracking;
let document;
let handlers;
export function mockTracking(category = '_category_', documentOverride, spyMethod) {
document = documentOverride || window.document;
window.snowplow = () => {};
Tracking.bindDocument(category, document);
return spyMethod ? spyMethod(Tracking, 'event') : null;
}
export function unmockTracking() {
window.snowplow = undefined;
handlers.forEach(event => document.removeEventListener(event.name, event.func));
}
export function triggerEvent(selectorOrEl, eventName = 'click') {
const event = new Event(eventName, { bubbles: true });
const el = typeof selectorOrEl === 'string' ? document.querySelector(selectorOrEl) : selectorOrEl;
el.dispatchEvent(event);
}
Loading
Loading
@@ -95,18 +95,18 @@ describe('IDE error message component', () => {
});
 
it('shows loading icon when loading', () => {
let resolve;
let resolveAction;
actionMock.mockImplementation(
() =>
new Promise(ok => {
resolve = ok;
new Promise(resolve => {
resolveAction = resolve;
}),
);
wrapper.find('button').trigger('click');
 
return wrapper.vm.$nextTick(() => {
expect(wrapper.find(GlLoadingIcon).isVisible()).toBe(true);
resolve();
resolveAction();
});
});
 
Loading
Loading
import Vue from 'vue';
import confidentialIssueSidebar from '~/sidebar/components/confidential/confidential_issue_sidebar.vue';
import { mockTracking, triggerEvent } from 'spec/helpers/tracking_helper';
import { mockTracking, triggerEvent } from 'helpers/tracking_helper';
 
describe('Confidential Issue Sidebar Block', () => {
let vm1;
Loading
Loading
@@ -37,40 +37,36 @@ describe('Confidential Issue Sidebar Block', () => {
expect(vm2.$el.innerHTML.includes('Not confidential')).toBe(true);
});
 
it('displays the edit form when editable', done => {
it('displays the edit form when editable', () => {
expect(vm1.edit).toBe(false);
 
vm1.$el.querySelector('.confidential-edit').click();
 
expect(vm1.edit).toBe(true);
 
setTimeout(() => {
return Vue.nextTick().then(() => {
expect(vm1.$el.innerHTML.includes('You are going to turn off the confidentiality.')).toBe(
true,
);
done();
});
});
 
it('displays the edit form when opened from collapsed state', done => {
it('displays the edit form when opened from collapsed state', () => {
expect(vm1.edit).toBe(false);
 
vm1.$el.querySelector('.sidebar-collapsed-icon').click();
 
expect(vm1.edit).toBe(true);
 
setTimeout(() => {
return Vue.nextTick().then(() => {
expect(vm1.$el.innerHTML.includes('You are going to turn off the confidentiality.')).toBe(
true,
);
done();
});
});
 
it('tracks the event when "Edit" is clicked', () => {
const spy = mockTracking('_category_', vm1.$el, spyOn);
const spy = mockTracking('_category_', vm1.$el, jest.spyOn);
triggerEvent('.confidential-edit');
 
expect(spy).toHaveBeenCalledWith('_category_', 'click_edit_button', {
Loading
Loading
Loading
Loading
@@ -4,11 +4,24 @@ require 'spec_helper'
 
describe Gitlab::Ci::Build::Rules::Rule::Clause::Exists do
describe '#satisfied_by?' do
let(:pipeline) { build(:ci_pipeline, project: project, sha: project.repository.head_commit.sha) }
subject { described_class.new(globs).satisfied_by?(pipeline, nil) }
it_behaves_like 'a glob matching rule' do
let(:project) { create(:project, :custom_repo, files: files) }
let(:pipeline) { build(:ci_pipeline, project: project, sha: project.repository.head_commit.sha) }
end
context 'after pattern comparision limit is reached' do
let(:globs) { ['*definitely_not_a_matching_glob*'] }
let(:project) { create(:project, :repository) }
before do
stub_const('Gitlab::Ci::Build::Rules::Rule::Clause::Exists::MAX_PATTERN_COMPARISONS', 2)
expect(File).to receive(:fnmatch?).exactly(2).times.and_call_original
end
 
subject { described_class.new(globs).satisfied_by?(pipeline, nil) }
it { is_expected.to be_truthy }
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment