Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-10-13 21:09:56 +00:00
parent cb6a3f5f73
commit 85770eb3a2
35 changed files with 171 additions and 136 deletions

View File

@ -71,6 +71,12 @@ compile-test-assets as-if-foss:
- .frontend:rules:compile-test-assets-as-if-foss
- .as-if-foss
compile-test-assets as-if-jh:
extends:
- compile-test-assets
- .frontend:rules:compile-test-assets-as-if-jh
needs: ["add-jh-folder"]
update-assets-compile-production-cache:
extends:
- compile-production-assets
@ -112,7 +118,7 @@ update-storybook-yarn-cache:
- .rails-cache
- .use-pg12
stage: fixtures
needs: ["setup-test-env", "retrieve-tests-metadata", "compile-test-assets"]
needs: ["setup-test-env", "retrieve-tests-metadata"]
variables:
WEBPACK_VENDOR_DLL: "true"
script:
@ -128,19 +134,38 @@ update-storybook-yarn-cache:
- tmp/tests/frontend/
- knapsack/
# In gitlab-foss, generates FOSS fixtures. In gitlab, generates FOSS & EE fixtures.
# That way, we don't need to have two separate jobs.
# Builds FOSS, and EE fixtures in the EE project.
# Builds FOSS fixtures in the FOSS project.
rspec-all frontend_fixture:
extends:
- .frontend-fixtures-base
- .frontend:rules:default-frontend-jobs
needs:
- !reference [.frontend-fixtures-base, needs]
- "compile-test-assets"
parallel: 5
rspec frontend_fixture as-if-foss:
# Builds FOSS fixtures in the EE project, with the `ee/` folder removed (due to `as-if-foss`).
rspec-all frontend_fixture as-if-foss:
extends:
- .frontend-fixtures-base
- .frontend:rules:default-frontend-jobs-as-if-foss
- .as-if-foss
needs:
- !reference [.frontend-fixtures-base, needs]
- "compile-test-assets as-if-foss"
# Builds FOSS, EE, and JH fixtures in the EE project, with the `jh/` folder added (due to `as-if-jh`).
rspec-all frontend_fixture as-if-jh:
extends:
- .frontend-fixtures-base
- .frontend:rules:default-frontend-jobs-as-if-jh
needs:
- !reference [.frontend-fixtures-base, needs]
- "compile-test-assets as-if-jh"
- "add-jh-folder"
script:
- echo "This job is currently doing nothing since there's no specific JH fixtures yet. To enable this job, remove this line."
graphql-schema-dump:
variables:
@ -168,7 +193,9 @@ graphql-schema-dump:
# Disable warnings in browserslist which can break on backports
# https://github.com/browserslist/browserslist/blob/a287ec6/node.js#L367-L384
BROWSERSLIST_IGNORE_OLD_DATA: "true"
SETUP_DB: "false"
before_script:
- !reference [.default-before_script, before_script]
- *yarn-install
stage: test
@ -190,9 +217,7 @@ jest:
extends:
- .jest-base
- .frontend:rules:jest
needs:
- job: "detect-tests"
- job: "rspec-all frontend_fixture"
needs: ["rspec-all frontend_fixture"]
artifacts:
name: coverage-frontend
expire_in: 31d
@ -209,6 +234,9 @@ jest minimal:
extends:
- jest
- .frontend:rules:jest:minimal
needs:
- !reference [jest, needs]
- "detect-tests"
script:
- run_timed_command "yarn jest:ci:minimal"
@ -227,9 +255,17 @@ jest-as-if-foss:
- .jest-base
- .frontend:rules:default-frontend-jobs-as-if-foss
- .as-if-foss
needs: ["rspec frontend_fixture as-if-foss"]
needs: ["rspec-all frontend_fixture as-if-foss"]
parallel: 2
jest-as-if-jh:
extends:
- .jest-base
- .frontend:rules:default-frontend-jobs-as-if-jh
needs: ["rspec-all frontend_fixture as-if-jh", "add-jh-folder"]
script:
- echo "This job is currently doing nothing since there's no specific JH Jest tests yet. To enable this job, remove this line."
coverage-frontend:
extends:
- .default-retry
@ -342,7 +378,7 @@ startup-css-check as-if-foss:
- .frontend:rules:default-frontend-jobs-as-if-foss
needs:
- job: "compile-test-assets as-if-foss"
- job: "rspec frontend_fixture as-if-foss"
- job: "rspec-all frontend_fixture as-if-foss"
.compile-storybook-base:
extends:
@ -351,14 +387,15 @@ startup-css-check as-if-foss:
script:
- *storybook-yarn-install
- yarn run storybook:build
needs: ["graphql-schema-dump"]
compile-storybook:
extends:
- .compile-storybook-base
- .frontend:rules:default-frontend-jobs
needs:
- !reference [.compile-storybook-base, needs]
- job: "rspec-all frontend_fixture"
- job: "graphql-schema-dump"
artifacts:
name: storybook
expire_in: 31d
@ -372,5 +409,5 @@ compile-storybook as-if-foss:
- .as-if-foss
- .frontend:rules:default-frontend-jobs-as-if-foss
needs:
- job: "graphql-schema-dump"
- job: "rspec frontend_fixture as-if-foss"
- !reference [.compile-storybook-base, needs]
- job: "rspec-all frontend_fixture as-if-foss"

View File

@ -10,6 +10,7 @@
.default-before_script:
before_script:
- echo $FOSS_ONLY
- '[ "$FOSS_ONLY" = "1" ] && rm -rf ee/ qa/spec/ee/ qa/qa/specs/features/ee/ qa/qa/ee/ qa/qa/ee.rb'
- export GOPATH=$CI_PROJECT_DIR/.go
- mkdir -p $GOPATH

View File

@ -40,6 +40,9 @@
.if-merge-request-labels-as-if-foss: &if-merge-request-labels-as-if-foss
if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:run-as-if-foss/'
.if-merge-request-labels-as-if-jh: &if-merge-request-labels-as-if-jh
if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:run-as-if-jh/'
.if-merge-request-labels-update-caches: &if-merge-request-labels-update-caches
if: '$CI_MERGE_REQUEST_LABELS =~ /pipeline:update-cache/'
@ -491,8 +494,19 @@
rules:
- <<: *if-not-ee
when: never
- changes: *code-backstage-qa-patterns
- <<: *if-merge-request-labels-as-if-foss
- <<: *if-merge-request-labels-run-all-rspec
- changes: *code-backstage-qa-patterns
- changes: *startup-css-patterns
.frontend:rules:compile-test-assets-as-if-jh:
rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-labels-as-if-jh
- <<: *if-merge-request-labels-run-all-rspec
- changes: *code-backstage-qa-patterns
- changes: *startup-css-patterns
.frontend:rules:default-frontend-jobs:
rules:
@ -512,6 +526,19 @@
- <<: *if-merge-request
changes: *ci-patterns
.frontend:rules:default-frontend-jobs-as-if-jh:
rules:
- <<: *if-not-ee
when: never
- <<: *if-security-merge-request
changes: *code-backstage-patterns
- <<: *if-merge-request-labels-as-if-jh
- <<: *if-merge-request-labels-run-all-rspec
- <<: *if-merge-request
changes: *startup-css-patterns
- <<: *if-merge-request
changes: *ci-patterns
.frontend:rules:jest:
rules:
- <<: *if-merge-request-labels-run-all-jest
@ -552,6 +579,7 @@
rules:
- <<: *if-not-ee
when: never
# We already have `static-analysis as-if-foss` which already runs `lint:eslint:all` if the `pipeline:run-as-if-foss` label is set.
- <<: *if-merge-request-labels-as-if-foss
when: never
- <<: *if-merge-request
@ -1565,6 +1593,15 @@
changes: *code-backstage-patterns
when: on_success
.setup:rules:add-jh-folder:
rules:
- <<: *if-not-ee
when: never
- <<: *if-merge-request-labels-as-if-jh
- <<: *if-merge-request-labels-run-all-rspec
- changes: *code-backstage-qa-patterns
- changes: *startup-css-patterns
#######################
# Test metadata rules #
#######################

View File

@ -101,3 +101,19 @@ detect-tests as-if-foss:
MATCHED_TESTS_FILE: tmp/matching_foss_tests.txt
before_script:
- '[ "$FOSS_ONLY" = "1" ] && rm -rf ee/ qa/spec/ee/ qa/qa/specs/features/ee/ qa/qa/ee/ qa/qa/ee.rb'
add-jh-folder:
extends: .setup:rules:add-jh-folder
image: ${GITLAB_DEPENDENCY_PROXY}alpine:edge
stage: prepare
before_script:
- apk add --no-cache --update curl bash
script:
- curl --location -o "jh-folder.tar.gz" "https://gitlab.com/gitlab-jh/gitlab/-/archive/main-jh/gitlab-main-jh.tar.gz?path=jh"
- tar -xf "jh-folder.tar.gz"
- mv gitlab-main-jh-jh/jh/ ./
- ls -l jh/
artifacts:
expire_in: 2d
paths:
- jh/

View File

@ -26,6 +26,18 @@ export default class Emoji extends Node {
moji: el.textContent,
}),
},
{
tag: 'img.emoji',
getAttrs: (el) => {
const name = el.getAttribute('title').replace(/^:|:$/g, '');
return {
name,
title: name,
moji: name,
};
},
},
],
toDOM: (node) => [
'gl-emoji',

View File

@ -29,7 +29,7 @@ export default class Image extends BaseImage {
},
// Matches HTML generated by Banzai::Filter::ImageLazyLoadFilter
{
tag: 'img[src]',
tag: 'img[src]:not(.emoji)',
getAttrs: (el) => {
const imageSrc = el.src;
const imageUrl =

View File

@ -31,7 +31,7 @@ providers:
- [Salesforce](../../integration/salesforce.md)
- [SAML](../../integration/saml.md)
- [SAML for GitLab.com groups](../../user/group/saml_sso/index.md) **(PREMIUM SAAS)**
- [Shibboleth](../../integration/shibboleth.md)
- [Shibboleth](../../integration/saml.md)
- [Smartcard](smartcard.md) **(PREMIUM SELF)**
- [Twitter](../../integration/twitter.md)

View File

@ -0,0 +1,27 @@
---
stage: Monitor
group: Monitor
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
---
# Puma exporter **(FREE SELF)**
You can use the [Puma exporter](https://github.com/sapcc/puma-exporter)
to measure various Puma metrics.
To enable the Puma exporter:
1. [Enable Prometheus](index.md#configuring-prometheus).
1. Edit `/etc/gitlab/gitlab.rb` to add (or find and uncomment) the following lines. Make sure
`puma['exporter_enabled']` is set to `true`:
```ruby
puma['exporter_enabled'] = true
puma['exporter_address'] = "127.0.0.1"
puma['exporter_port'] = 8083
```
1. Save the file and [reconfigure GitLab](../../restart_gitlab.md#omnibus-gitlab-reconfigure)
for the changes to take effect.
Prometheus begins collecting performance data from the Puma exporter exposed at `localhost:8083`.

View File

@ -187,7 +187,7 @@ If the Rugged feature flag is explicitly set to either `true` or `false`, GitLab
NOTE:
From GitLab 12.7, Rugged is not automatically enabled if Puma thread count is greater than `1`.
If you want to use Rugged with Puma, [set Puma thread count to `1`](https://docs.gitlab.com/omnibus/settings/puma.html#puma-settings).
If you want to use Rugged with Puma, [set Puma thread count to `1`](../install/requirements.md#puma-settings).
If you want to use Rugged with Puma thread count more than `1`, Rugged can be enabled using the [feature flag](../development/gitaly.md#legacy-rugged-code).

View File

@ -30,7 +30,7 @@ To enable the dependency proxy feature:
```
1. Save the file and [reconfigure GitLab](../restart_gitlab.md#omnibus-gitlab-reconfigure "How to reconfigure Omnibus GitLab") for the changes to take effect.
1. Enable the [Puma web server](https://docs.gitlab.com/omnibus/settings/puma.html).
1. Enable the [Puma web server](../operations/puma.md).
**Helm chart installations**

View File

@ -225,7 +225,7 @@ gitlab_rails['env'] = {
```
For source installations, set the environment variable.
Refer to [Puma Worker timeout](https://docs.gitlab.com/omnibus/settings/puma.html#worker-timeout).
Refer to [Puma Worker timeout](../operations/puma.md#worker-timeout).
[Reconfigure](../restart_gitlab.md#omnibus-gitlab-reconfigure) GitLab for the changes to take effect.

View File

@ -1,9 +0,0 @@
---
redirect_to: '../pipelines/merge_request_pipelines.md'
remove_date: '2021-09-29'
---
This document was moved to [another location](../pipelines/merge_request_pipelines.md).
<!-- This redirect file can be deleted after 2021-09-29. -->
<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/#move-or-rename-a-page -->

View File

@ -1,9 +0,0 @@
---
redirect_to: '../../pipelines/pipelines_for_merged_results.md'
remove_date: '2021-09-29'
---
This document was moved to [another location](../../pipelines/pipelines_for_merged_results.md).
<!-- This redirect file can be deleted after 2021-09-29. -->
<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/#move-or-rename-a-page -->

View File

@ -1,9 +0,0 @@
---
redirect_to: '../../../pipelines/merge_trains.md'
remove_date: '2021-09-29'
---
This document was moved to [another location](../../../pipelines/merge_trains.md).
<!-- This redirect file can be deleted after 2021-09-29. -->
<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/#move-or-rename-a-page -->

View File

@ -42,8 +42,8 @@ can be a great resource.
## Manage organizational transition
An important part of transitioning from Jenkins to GitLab is the cultural and organizational
changes that comes with the move, and successfully managing them. There are a few
things we have found that helps this:
changes that come with the move, and successfully managing them. There are a few
things we have found that help this:
- Setting and communicating a clear vision of what your migration goals are helps
your users understand why the effort is worth it. The value is clear when

View File

@ -1,9 +0,0 @@
---
redirect_to: 'pipelines/multi_project_pipelines.md'
remove_date: '2021-09-29'
---
This document was moved to [another location](pipelines/multi_project_pipelines.md).
<!-- This redirect file can be deleted after 2021-09-29. -->
<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/#move-or-rename-a-page -->

View File

@ -1,9 +0,0 @@
---
redirect_to: 'pipelines/parent_child_pipelines.md'
remove_date: '2021-09-29'
---
This document was moved to [another location](pipelines/parent_child_pipelines.md).
<!-- This redirect file can be deleted after 2021-09-29. -->
<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/#move-or-rename-a-page -->

View File

@ -813,7 +813,7 @@ Starting with GitLab 13.0, Puma is the default web server.
- [Project page](https://gitlab.com/gitlab-org/gitlab/-/blob/master/README.md)
- Configuration:
- [Omnibus](https://docs.gitlab.com/omnibus/settings/puma.html)
- [Omnibus](../administration/operations/puma.md)
- [Charts](https://docs.gitlab.com/charts/charts/gitlab/webservice/)
- [Source](../install/installation.md#configure-it)
- [GDK](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/gitlab.yml.example)

View File

@ -149,6 +149,8 @@ For the heading:
If you do not put the full error in the title, include it in the body text.
If multiple causes or workarounds exist, consider putting them into a table format.
## Other types of content
There are other types of content in the GitLab documentation that don't

View File

@ -1,9 +0,0 @@
---
redirect_to: 'source_editor.md'
remove_date: '2021-09-19'
---
This document was moved to [another location](source_editor.md).
<!-- This redirect file can be deleted after <2021-09-19>. -->
<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/#move-or-rename-a-page -->

View File

@ -1,9 +0,0 @@
---
redirect_to: '../service_ping/index.md'
remove_date: '2021-10-09'
---
This file was moved to [another location](../service_ping/index.md).
<!-- This redirect file can be deleted after <2021-10-09>. -->
<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/#move-or-rename-a-page -->

View File

@ -1,9 +0,0 @@
---
redirect_to: '../service_ping/metrics_dictionary.md'
remove_date: '2021-10-09'
---
This file was moved to [another location](../service_ping/metrics_dictionary.md).
<!-- This redirect file can be deleted after <2021-10-09>. -->
<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/#move-or-rename-a-page -->

View File

@ -1,9 +0,0 @@
---
redirect_to: '../service_ping/metrics_instrumentation.md'
remove_date: '2021-10-09'
---
This file was moved to [another location](../service_ping/metrics_instrumentation.md).
<!-- This redirect file can be deleted after <2021-10-09>. -->
<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/#move-or-rename-a-page -->

View File

@ -1,9 +0,0 @@
---
redirect_to: '../service_ping/review_guidelines.md'
remove_date: '2021-10-09'
---
This file was moved to [another location](../service_ping/review_guidelines.md).
<!-- This redirect file can be deleted after <2021-10-09>. -->
<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/#move-or-rename-a-page -->

View File

@ -1,9 +0,0 @@
---
redirect_to: '../service_ping/review_guidelines.md'
remove_date: '2021-10-09'
---
This file was moved to [another location](../service_ping/review_guidelines.md).
<!-- This redirect file can be deleted after <2021-10-09>. -->
<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/#move-or-rename-a-page -->

View File

@ -47,7 +47,7 @@ contains some settings that are common for all providers.
| [OpenID Connect](../administration/auth/oidc.md) | `openid_connect` |
| [Salesforce](salesforce.md) | `salesforce` |
| [SAML](saml.md) | `saml` |
| [Shibboleth](shibboleth.md) | `shibboleth` |
| [Shibboleth](saml.md) | `shibboleth` |
| [Twitter](twitter.md) | `twitter` |
## Initial OmniAuth Configuration

View File

@ -1,9 +0,0 @@
---
redirect_to: 'saml.md'
remove_date: '2021-09-29'
---
This file was moved to [another location](saml.md).
<!-- This redirect file can be deleted after <2021-09-29>. -->
<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/#move-or-rename-a-page -->

View File

@ -22,6 +22,6 @@ The following timeouts are available.
| Timeout | Default | Description |
|:--------|:-----------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Default | 55 seconds | Timeout for most Gitaly calls (not enforced for `git` `fetch` and `push` operations, or Sidekiq jobs). For example, checking if a repository exists on disk. Makes sure that Gitaly calls made within a web request cannot exceed the entire request timeout. It should be shorter than the worker timeout that can be configured for [Puma](https://docs.gitlab.com/omnibus/settings/puma.html#puma-settings). If a Gitaly call timeout exceeds the worker timeout, the remaining time from the worker timeout is used to avoid having to terminate the worker. |
| Default | 55 seconds | Timeout for most Gitaly calls (not enforced for `git` `fetch` and `push` operations, or Sidekiq jobs). For example, checking if a repository exists on disk. Makes sure that Gitaly calls made within a web request cannot exceed the entire request timeout. It should be shorter than the worker timeout that can be configured for [Puma](../../../install/requirements.md#puma-settings). If a Gitaly call timeout exceeds the worker timeout, the remaining time from the worker timeout is used to avoid having to terminate the worker. |
| Fast | 10 seconds | Timeout for fast Gitaly operations used within requests, sometimes multiple times. For example, checking if a repository exists on disk. If fast operations exceed this threshold, there may be a problem with a storage shard. Failing fast can help maintain the stability of the GitLab instance. |
| Medium | 30 seconds | Timeout for Gitaly operations that should be fast (possibly within requests) but preferably not used multiple times within a request. For example, loading blobs. Timeout that should be set between Default and Fast. |

View File

@ -270,7 +270,7 @@ for `shared_buffers` is quite high, and we are
## Puma
GitLab.com uses the default of 60 seconds for [Puma request timeouts](https://docs.gitlab.com/omnibus/settings/puma.html#worker-timeout).
GitLab.com uses the default of 60 seconds for [Puma request timeouts](../../administration/operations/puma.md#worker-timeout).
## GitLab.com-specific rate limits

View File

@ -138,7 +138,7 @@ To view the published package, go to **Packages & Registries > Package Registry*
A more detailed Composer CI/CD file is also available as a `.gitlab-ci.yml` template:
1. On the left sidebar, select **Project information**.
1. Above the file list, click **Set up CI/CD**. If this button is not available, select **CI/CD Configuration** and then **Edit**.
1. Above the file list, select **Set up CI/CD**. If this button is not available, select **CI/CD Configuration** and then **Edit**.
1. From the **Apply a template** list, select **Composer**.
WARNING:

View File

@ -363,7 +363,7 @@ There are two ways to remove a Conan package from the GitLab Package Registry.
- From the GitLab user interface:
Go to your project's **Packages & Registries > Package Registry**. Remove the
package by clicking the red trash icon.
package by selecting **Remove repository** (**{remove}**).
## Search for Conan packages in the Package Registry

View File

@ -142,7 +142,7 @@ For an example, read [Table of contents](../../markdown.md#table-of-contents).
## Delete a wiki page
You need at least the [Maintainer role](../../permissions.md) to delete a wiki page:
You need at least the [Developer role](../../permissions.md) to delete a wiki page:
1. Go to your project or group and select **Wiki**.
1. Go to the page you want to delete.

View File

@ -7,6 +7,7 @@ module Tasks
module Assets
FOSS_ASSET_FOLDERS = %w[app/assets fixtures/emojis vendor/assets/javascripts].freeze
EE_ASSET_FOLDERS = %w[ee/app/assets].freeze
JH_ASSET_FOLDERS = %w[jh/app/assets].freeze
JS_ASSET_PATTERNS = %w[*.js config/**/*.js].freeze
JS_ASSET_FILES = %w[package.json yarn.lock].freeze
MASTER_MD5_HASH_FILE = 'master-assets-hash.txt'
@ -28,6 +29,7 @@ module Tasks
def self.assets_impacting_webpack_compilation
assets_folders = FOSS_ASSET_FOLDERS
assets_folders += EE_ASSET_FOLDERS if ::Gitlab.ee?
assets_folders += JH_ASSET_FOLDERS if ::Gitlab.jh?
asset_files = Dir.glob(JS_ASSET_PATTERNS)
asset_files += JS_ASSET_FILES

View File

@ -120,7 +120,7 @@ function rspec_paralellized_job() {
fi
if [[ "${test_tool}" =~ "-all" ]]; then
spec_folder_prefixes="['', 'ee/']"
spec_folder_prefixes="['', 'ee/', 'jh/']"
fi
export KNAPSACK_LOG_LEVEL="debug"

View File

@ -201,6 +201,15 @@ RSpec.describe 'Copy as GFM', :js do
GFM
)
aggregate_failures('CustomEmojiFilter') do
gfm = ':custom_emoji:'
html = '<img class="emoji" src="custom_emoji.svg" title=":custom_emoji:" height="20" width="20">'
output_gfm = html_to_gfm(html)
expect(output_gfm.strip).to eq(gfm.strip)
end
aggregate_failures('MathFilter: math as transformed from HTML to KaTeX') do
gfm = '$`c = \pm\sqrt{a^2 + b^2}`$'