Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
6f286d7717
commit
0250f48d9f
|
@ -23053,8 +23053,8 @@ CREATE TABLE vulnerability_state_transitions (
|
||||||
author_id bigint,
|
author_id bigint,
|
||||||
comment text,
|
comment text,
|
||||||
dismissal_reason smallint,
|
dismissal_reason smallint,
|
||||||
CONSTRAINT check_fca4a7ca39 CHECK ((char_length(comment) <= 255)),
|
CONSTRAINT check_d1ca8ec043 CHECK ((from_state <> to_state)),
|
||||||
CONSTRAINT state_not_equal CHECK ((from_state <> to_state))
|
CONSTRAINT check_fca4a7ca39 CHECK ((char_length(comment) <= 255))
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE SEQUENCE vulnerability_state_transitions_id_seq
|
CREATE SEQUENCE vulnerability_state_transitions_id_seq
|
||||||
|
|
|
@ -143,6 +143,8 @@ GitLab 14.0 introduced [batched background migrations](../user/admin_area/monito
|
||||||
|
|
||||||
Some installations [may need to run GitLab 14.0 for at least a day](#1400) to complete the database changes introduced by that upgrade.
|
Some installations [may need to run GitLab 14.0 for at least a day](#1400) to complete the database changes introduced by that upgrade.
|
||||||
|
|
||||||
|
Batched background migrations are handled by Sidekiq and [run in isolation](../development/database/batched_background_migrations.md#isolation), so an instance can remain operational while the migrations are processed. However, there may be performance degradation on larger instances that are heavily used while batched background migrations are run, so it's a good idea to [actively monitor the Sidekiq status](../user/admin_area/index.md#background-jobs) until all migrations are completed.
|
||||||
|
|
||||||
#### Check the status of batched background migrations
|
#### Check the status of batched background migrations
|
||||||
|
|
||||||
To check the status of batched background migrations:
|
To check the status of batched background migrations:
|
||||||
|
|
|
@ -159,7 +159,7 @@ module.exports = (path, options = {}) => {
|
||||||
return {
|
return {
|
||||||
clearMocks: true,
|
clearMocks: true,
|
||||||
testMatch,
|
testMatch,
|
||||||
moduleFileExtensions: ['js', 'json', 'vue', 'gql', 'graphql', 'yaml'],
|
moduleFileExtensions: ['js', 'json', 'vue', 'gql', 'graphql', 'yaml', 'yml'],
|
||||||
moduleNameMapper,
|
moduleNameMapper,
|
||||||
collectCoverageFrom,
|
collectCoverageFrom,
|
||||||
coverageDirectory: coverageDirectory(),
|
coverageDirectory: coverageDirectory(),
|
||||||
|
|
|
@ -67,7 +67,11 @@ module API
|
||||||
end
|
end
|
||||||
params do
|
params do
|
||||||
requires :ref, type: String, desc: 'Reference'
|
requires :ref, type: String, desc: 'Reference'
|
||||||
optional :variables, Array, desc: 'Array of variables available in the pipeline'
|
optional :variables, type: Array, desc: 'Array of variables available in the pipeline' do
|
||||||
|
optional :key, type: String, desc: 'The key of the variable'
|
||||||
|
optional :value, type: String, desc: 'The value of the variable'
|
||||||
|
optional :variable_type, type: String, values: ::Ci::PipelineVariable.variable_types.keys, default: 'env_var', desc: 'The type of variable, must be one of env_var or file. Defaults to env_var'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
post ':id/pipeline', urgency: :low, feature_category: :continuous_integration do
|
post ':id/pipeline', urgency: :low, feature_category: :continuous_integration do
|
||||||
Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab/-/issues/20711')
|
Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab/-/issues/20711')
|
||||||
|
|
|
@ -6,7 +6,7 @@ load_performance:
|
||||||
DOCKER_TLS_CERTDIR: ""
|
DOCKER_TLS_CERTDIR: ""
|
||||||
K6_IMAGE: loadimpact/k6
|
K6_IMAGE: loadimpact/k6
|
||||||
K6_VERSION: 0.27.0
|
K6_VERSION: 0.27.0
|
||||||
K6_TEST_FILE: github.com/loadimpact/k6/samples/http_get.js
|
K6_TEST_FILE: raw.githubusercontent.com/grafana/k6/master/samples/http_get.js
|
||||||
K6_OPTIONS: ''
|
K6_OPTIONS: ''
|
||||||
K6_DOCKER_OPTIONS: ''
|
K6_DOCKER_OPTIONS: ''
|
||||||
services:
|
services:
|
||||||
|
|
|
@ -17,7 +17,7 @@ load_performance:
|
||||||
variables:
|
variables:
|
||||||
K6_IMAGE: loadimpact/k6
|
K6_IMAGE: loadimpact/k6
|
||||||
K6_VERSION: 0.27.0
|
K6_VERSION: 0.27.0
|
||||||
K6_TEST_FILE: github.com/loadimpact/k6/samples/http_get.js
|
K6_TEST_FILE: raw.githubusercontent.com/grafana/k6/master/samples/http_get.js
|
||||||
K6_OPTIONS: ''
|
K6_OPTIONS: ''
|
||||||
K6_DOCKER_OPTIONS: ''
|
K6_DOCKER_OPTIONS: ''
|
||||||
services:
|
services:
|
||||||
|
|
|
@ -56,7 +56,7 @@ module Gitlab
|
||||||
# Note that we use ActiveRecord::Base here and not ApplicationRecord.
|
# Note that we use ActiveRecord::Base here and not ApplicationRecord.
|
||||||
# This is deliberate, as we also use these classes to apply load
|
# This is deliberate, as we also use these classes to apply load
|
||||||
# balancing to, and the load balancer must be enabled for _all_ models
|
# balancing to, and the load balancer must be enabled for _all_ models
|
||||||
# that inher from ActiveRecord::Base; not just our own models that
|
# that inherit from ActiveRecord::Base; not just our own models that
|
||||||
# inherit from ApplicationRecord.
|
# inherit from ApplicationRecord.
|
||||||
main: ::ActiveRecord::Base,
|
main: ::ActiveRecord::Base,
|
||||||
ci: ::Ci::ApplicationRecord.connection_class? ? ::Ci::ApplicationRecord : nil
|
ci: ::Ci::ApplicationRecord.connection_class? ? ::Ci::ApplicationRecord : nil
|
||||||
|
|
|
@ -6091,6 +6091,12 @@ msgstr ""
|
||||||
msgid "Be careful. Renaming a project's repository can have unintended side effects."
|
msgid "Be careful. Renaming a project's repository can have unintended side effects."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Because you enabled auto-banning, we have also automatically banned this user from %{scope}. If this is a mistake, you can %{link_start}unban them%{link_end}."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Because you enabled auto-banning, we have also automatically banned this user from %{scope}. If this is a mistake, you can unban them: %{url}."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Before enabling this integration, create a webhook for the room in Google Chat where you want to receive notifications from this project. %{docs_link}"
|
msgid "Before enabling this integration, create a webhook for the room in Google Chat where you want to receive notifications from this project. %{docs_link}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -20371,12 +20377,6 @@ msgstr ""
|
||||||
msgid "If this email was added in error, you can remove it here: %{profile_emails_url}"
|
msgid "If this email was added in error, you can remove it here: %{profile_emails_url}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "If this is a mistake, you can %{link_start}unban them%{link_end}."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "If this is a mistake, you can unban them: %{url}."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "If this was a mistake you can %{leave_link_start}leave the %{source_type}%{link_end}."
|
msgid "If this was a mistake you can %{leave_link_start}leave the %{source_type}%{link_end}."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -45283,7 +45283,7 @@ msgstr ""
|
||||||
msgid "We want to be sure it is you, please confirm you are not a robot."
|
msgid "We want to be sure it is you, please confirm you are not a robot."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "We want to let you know %{username} has been banned from %{scope} due to them downloading more than %{max_project_downloads} project repositories within %{within_minutes} minutes."
|
msgid "We want to let you know %{username} has exceeded the Git rate limit due to them downloading more than %{max_project_downloads} project %{repositories_text} within %{within_text}."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "We will notify %{inviter} that you declined their invitation to join GitLab. You will stop receiving reminders."
|
msgid "We will notify %{inviter} that you declined their invitation to join GitLab. You will stop receiving reminders."
|
||||||
|
@ -49076,6 +49076,11 @@ msgstr ""
|
||||||
msgid "repositories"
|
msgid "repositories"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "repository"
|
||||||
|
msgid_plural "repositories"
|
||||||
|
msgstr[0] ""
|
||||||
|
msgstr[1] ""
|
||||||
|
|
||||||
msgid "repository:"
|
msgid "repository:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ module QA
|
||||||
|
|
||||||
def context_matches?(*options)
|
def context_matches?(*options)
|
||||||
return false unless Runtime::Scenario.attributes[:gitlab_address]
|
return false unless Runtime::Scenario.attributes[:gitlab_address]
|
||||||
|
return false if Runtime::Scenario.attributes[:test_metadata_only]
|
||||||
|
|
||||||
opts = {}
|
opts = {}
|
||||||
opts[:domain] = '.+'
|
opts[:domain] = '.+'
|
||||||
|
|
|
@ -23,6 +23,8 @@ module QA
|
||||||
def rspec_tags
|
def rspec_tags
|
||||||
tags_for_rspec = []
|
tags_for_rspec = []
|
||||||
|
|
||||||
|
return tags_for_rspec if Runtime::Scenario.attributes[:test_metadata_only]
|
||||||
|
|
||||||
if tags.any?
|
if tags.any?
|
||||||
tags.each { |tag| tags_for_rspec.push(['--tag', tag.to_s]) }
|
tags.each { |tag| tags_for_rspec.push(['--tag', tag.to_s]) }
|
||||||
else
|
else
|
||||||
|
|
|
@ -36,6 +36,7 @@ module QA
|
||||||
# @param [<RSpec::Core::ExampleGroup, RSpec::Core::Example>] example
|
# @param [<RSpec::Core::ExampleGroup, RSpec::Core::Example>] example
|
||||||
# @return [void]
|
# @return [void]
|
||||||
def set_skip_metadata(example)
|
def set_skip_metadata(example)
|
||||||
|
return if Runtime::Scenario.attributes[:test_metadata_only]
|
||||||
return skip_only(example.metadata) if example.metadata.key?(:only)
|
return skip_only(example.metadata) if example.metadata.key?(:only)
|
||||||
return skip_except(example.metadata) if example.metadata.key?(:except)
|
return skip_except(example.metadata) if example.metadata.key?(:except)
|
||||||
end
|
end
|
||||||
|
|
|
@ -111,7 +111,7 @@ RSpec.describe QA::Specs::Runner do
|
||||||
|
|
||||||
it 'sets the `--dry-run` flag' do
|
it 'sets the `--dry-run` flag' do
|
||||||
expect_rspec_runner_arguments(
|
expect_rspec_runner_arguments(
|
||||||
['--dry-run'] + DEFAULT_SKIPPED_TAGS + ['--tag', '~geo', *described_class::DEFAULT_TEST_PATH_ARGS],
|
['--dry-run', *described_class::DEFAULT_TEST_PATH_ARGS],
|
||||||
[$stderr, anything]
|
[$stderr, anything]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,9 @@ printf "\nStarting GLFM snapshot example tests. See https://docs.gitlab.com/ee/d
|
||||||
printf "Set 'FOCUSED_MARKDOWN_EXAMPLES=example_name_1[,...]' for focused examples, with example name(s) from https://docs.gitlab.com/ee/development/gitlab_flavored_markdown/specification_guide/#glfm_specificationexample_snapshotsexamples_indexyml.\n"
|
printf "Set 'FOCUSED_MARKDOWN_EXAMPLES=example_name_1[,...]' for focused examples, with example name(s) from https://docs.gitlab.com/ee/development/gitlab_flavored_markdown/specification_guide/#glfm_specificationexample_snapshotsexamples_indexyml.\n"
|
||||||
printf "${Color_Off}"
|
printf "${Color_Off}"
|
||||||
|
|
||||||
|
# NOTE: Unlike the backend markdown_snapshot_spec.rb which has a CE and EE version, there is only
|
||||||
|
# one version of this spec. This is because the frontend markdown rendering does not require EE-only
|
||||||
|
# backend features.
|
||||||
printf "\n${BBlue}Running frontend 'yarn jest spec/frontend/content_editor/markdown_snapshot_spec.js'...${Color_Off}\n\n"
|
printf "\n${BBlue}Running frontend 'yarn jest spec/frontend/content_editor/markdown_snapshot_spec.js'...${Color_Off}\n\n"
|
||||||
yarn jest spec/frontend/content_editor/markdown_snapshot_spec.js
|
yarn jest spec/frontend/content_editor/markdown_snapshot_spec.js
|
||||||
printf "\n${BBlue}'yarn jest spec/frontend/content_editor/markdown_snapshot_spec.js' passed!${Color_Off}\n\n"
|
printf "\n${BBlue}'yarn jest spec/frontend/content_editor/markdown_snapshot_spec.js' passed!${Color_Off}\n\n"
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import path from 'path';
|
|
||||||
import { describeMarkdownSnapshots } from 'jest/content_editor/markdown_snapshot_spec_helper';
|
import { describeMarkdownSnapshots } from 'jest/content_editor/markdown_snapshot_spec_helper';
|
||||||
|
|
||||||
jest.mock('~/emoji');
|
jest.mock('~/emoji');
|
||||||
|
|
||||||
const glfmSpecificationDir = path.join(__dirname, '..', '..', '..', 'glfm_specification');
|
|
||||||
|
|
||||||
// See https://docs.gitlab.com/ee/development/gitlab_flavored_markdown/specification_guide/#markdown-snapshot-testing
|
// See https://docs.gitlab.com/ee/development/gitlab_flavored_markdown/specification_guide/#markdown-snapshot-testing
|
||||||
// for documentation on this spec.
|
// for documentation on this spec.
|
||||||
describeMarkdownSnapshots('CE markdown snapshots in ContentEditor', glfmSpecificationDir);
|
//
|
||||||
|
// NOTE: Unlike the backend markdown_snapshot_spec.rb which has a CE and EE version, there is only
|
||||||
|
// one version of this spec. This is because the frontend markdown rendering does not require EE-only
|
||||||
|
// backend features.
|
||||||
|
describeMarkdownSnapshots('markdown example snapshots in ContentEditor');
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
// See https://docs.gitlab.com/ee/development/gitlab_flavored_markdown/specification_guide/#markdown-snapshot-testing
|
// See https://docs.gitlab.com/ee/development/gitlab_flavored_markdown/specification_guide/#markdown-snapshot-testing
|
||||||
// for documentation on this spec.
|
// for documentation on this spec.
|
||||||
|
|
||||||
import fs from 'fs';
|
|
||||||
import path from 'path';
|
|
||||||
import jsYaml from 'js-yaml';
|
import jsYaml from 'js-yaml';
|
||||||
import { pick } from 'lodash';
|
import { pick } from 'lodash';
|
||||||
|
import glfmExampleStatusYml from '../../../glfm_specification/input/gitlab_flavored_markdown/glfm_example_status.yml';
|
||||||
|
import markdownYml from '../../../glfm_specification/output_example_snapshots/markdown.yml';
|
||||||
|
import htmlYml from '../../../glfm_specification/output_example_snapshots/html.yml';
|
||||||
|
import prosemirrorJsonYml from '../../../glfm_specification/output_example_snapshots/prosemirror_json.yml';
|
||||||
import {
|
import {
|
||||||
IMPLEMENTATION_ERROR_MSG,
|
IMPLEMENTATION_ERROR_MSG,
|
||||||
renderHtmlAndJsonForAllExamples,
|
renderHtmlAndJsonForAllExamples,
|
||||||
|
@ -18,29 +20,21 @@ const filterExamples = (examples) => {
|
||||||
return pick(examples, focusedMarkdownExamples);
|
return pick(examples, focusedMarkdownExamples);
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadExamples = (dir, fileName) => {
|
const loadExamples = (yaml) => {
|
||||||
const yaml = fs.readFileSync(path.join(dir, fileName));
|
|
||||||
const examples = jsYaml.safeLoad(yaml, {});
|
const examples = jsYaml.safeLoad(yaml, {});
|
||||||
return filterExamples(examples);
|
return filterExamples(examples);
|
||||||
};
|
};
|
||||||
|
|
||||||
// eslint-disable-next-line jest/no-export
|
// eslint-disable-next-line jest/no-export
|
||||||
export const describeMarkdownSnapshots = (description, glfmSpecificationDir) => {
|
export const describeMarkdownSnapshots = (description) => {
|
||||||
let actualHtmlAndJsonExamples;
|
let actualHtmlAndJsonExamples;
|
||||||
let skipRunningSnapshotWysiwygHtmlTests;
|
let skipRunningSnapshotWysiwygHtmlTests;
|
||||||
let skipRunningSnapshotProsemirrorJsonTests;
|
let skipRunningSnapshotProsemirrorJsonTests;
|
||||||
|
|
||||||
const exampleStatuses = loadExamples(
|
const exampleStatuses = loadExamples(glfmExampleStatusYml);
|
||||||
path.join(glfmSpecificationDir, 'input', 'gitlab_flavored_markdown'),
|
const markdownExamples = loadExamples(markdownYml);
|
||||||
'glfm_example_status.yml',
|
const expectedHtmlExamples = loadExamples(htmlYml);
|
||||||
);
|
const expectedProseMirrorJsonExamples = loadExamples(prosemirrorJsonYml);
|
||||||
const outputExampleSnapshotsDir = path.join(glfmSpecificationDir, 'output_example_snapshots');
|
|
||||||
const markdownExamples = loadExamples(outputExampleSnapshotsDir, 'markdown.yml');
|
|
||||||
const expectedHtmlExamples = loadExamples(outputExampleSnapshotsDir, 'html.yml');
|
|
||||||
const expectedProseMirrorJsonExamples = loadExamples(
|
|
||||||
outputExampleSnapshotsDir,
|
|
||||||
'prosemirror_json.yml',
|
|
||||||
);
|
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
return renderHtmlAndJsonForAllExamples(markdownExamples).then((examples) => {
|
return renderHtmlAndJsonForAllExamples(markdownExamples).then((examples) => {
|
||||||
|
|
Loading…
Reference in New Issue