Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-11-30 09:09:53 +00:00
parent c2bfdff5d3
commit 915a5b6e89
18 changed files with 96 additions and 16 deletions

View File

@ -76,15 +76,15 @@ export const stageKeys = {
export const commitItemIconMap = { export const commitItemIconMap = {
addition: { addition: {
icon: 'file-addition', icon: 'file-addition',
class: 'ide-file-addition', class: 'file-addition ide-file-addition',
}, },
modified: { modified: {
icon: 'file-modified', icon: 'file-modified',
class: 'ide-file-modified', class: 'file-modified ide-file-modified',
}, },
deleted: { deleted: {
icon: 'file-deletion', icon: 'file-deletion',
class: 'ide-file-deletion', class: 'file-deletion ide-file-deletion',
}, },
}; };

View File

@ -47,7 +47,7 @@ export default {
newPage: s__( newPage: s__(
'WikiPage|Tip: You can specify the full path for the new file. We will automatically create any missing directories.', 'WikiPage|Tip: You can specify the full path for the new file. We will automatically create any missing directories.',
), ),
moreInformation: s__('WikiPage|More Information.'), learnMore: s__('WikiPage|Learn more.'),
}, },
}, },
format: { format: {
@ -402,10 +402,9 @@ export default {
<span class="gl-display-inline-block gl-max-w-full gl-mt-2 gl-text-gray-600"> <span class="gl-display-inline-block gl-max-w-full gl-mt-2 gl-text-gray-600">
<gl-icon class="gl-mr-n1" name="bulb" /> <gl-icon class="gl-mr-n1" name="bulb" />
{{ titleHelpText }} {{ titleHelpText }}
<gl-link :href="helpPath" target="_blank" <gl-link :href="helpPath" target="_blank">
><gl-icon name="question-o" /> {{ $options.i18n.title.helpText.learnMore }}
{{ $options.i18n.title.helpText.moreInformation }}</gl-link </gl-link>
>
</span> </span>
</div> </div>
</div> </div>

View File

@ -0,0 +1,15 @@
# frozen_string_literal: true
class TrackCiPipelineDeletions < Gitlab::Database::Migration[1.0]
include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers
enable_lock_retries!
def up
track_record_deletions(:ci_pipelines)
end
def down
untrack_record_deletions(:ci_pipelines)
end
end

View File

@ -0,0 +1,15 @@
# frozen_string_literal: true
class TrackCiBuildDeletions < Gitlab::Database::Migration[1.0]
include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers
enable_lock_retries!
def up
track_record_deletions(:ci_builds)
end
def down
untrack_record_deletions(:ci_builds)
end
end

View File

@ -0,0 +1 @@
543feeedace6596d63207738829dcd62249a9f048a08928fbe4131ec69058322

View File

@ -0,0 +1 @@
2bceb12bdb90052cc8c1aedbd52c11cb8125471e1b59de3d75ef476fc64851c9

View File

@ -28723,6 +28723,10 @@ ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_p
CREATE TRIGGER chat_names_loose_fk_trigger AFTER DELETE ON chat_names REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records(); CREATE TRIGGER chat_names_loose_fk_trigger AFTER DELETE ON chat_names REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records();
CREATE TRIGGER ci_builds_loose_fk_trigger AFTER DELETE ON ci_builds REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records();
CREATE TRIGGER ci_pipelines_loose_fk_trigger AFTER DELETE ON ci_pipelines REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records();
CREATE TRIGGER ci_runners_loose_fk_trigger AFTER DELETE ON ci_runners REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records(); CREATE TRIGGER ci_runners_loose_fk_trigger AFTER DELETE ON ci_runners REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records();
CREATE TRIGGER trigger_delete_project_namespace_on_project_delete AFTER DELETE ON projects FOR EACH ROW WHEN ((old.project_namespace_id IS NOT NULL)) EXECUTE FUNCTION delete_associated_project_namespace(); CREATE TRIGGER trigger_delete_project_namespace_on_project_delete AFTER DELETE ON projects FOR EACH ROW WHEN ((old.project_namespace_id IS NOT NULL)) EXECUTE FUNCTION delete_associated_project_namespace();

View File

@ -293,6 +293,11 @@ Use the variables in a job script like this:
kubectl config set-cluster e2e --server="$KUBE_URL" --certificate-authority="$KUBE_CA_PEM" kubectl config set-cluster e2e --server="$KUBE_URL" --certificate-authority="$KUBE_CA_PEM"
``` ```
WARNING:
Be careful when assigning the value of a file variable to another variable. The other
variable takes the content of the file as its value, **not** the path to the file.
See [issue 29407](https://gitlab.com/gitlab-org/gitlab/-/issues/29407) for more details.
An alternative to `File` type variables is to: An alternative to `File` type variables is to:
- Read the value of a CI/CD variable (`variable` type). - Read the value of a CI/CD variable (`variable` type).

View File

@ -18,6 +18,7 @@ The [`StandardContext`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/g
|----------------|---------------------|-----------------------|---------------------------------------------------------------------------------------------| |----------------|---------------------|-----------------------|---------------------------------------------------------------------------------------------|
| `project_id` | **{dotted-circle}** | integer | | | `project_id` | **{dotted-circle}** | integer | |
| `namespace_id` | **{dotted-circle}** | integer | | | `namespace_id` | **{dotted-circle}** | integer | |
| `user_id` | **{dotted-circle}** | integer | User database record ID attribute. This file undergoes a pseudonymization process at the collector level. |
| `environment` | **{check-circle}** | string (max 32 chars) | Name of the source environment, such as `production` or `staging` | | `environment` | **{check-circle}** | string (max 32 chars) | Name of the source environment, such as `production` or `staging` |
| `source` | **{check-circle}** | string (max 32 chars) | Name of the source application, such as `gitlab-rails` or `gitlab-javascript` | | `source` | **{check-circle}** | string (max 32 chars) | Name of the source application, such as `gitlab-rails` or `gitlab-javascript` |
| `plan` | **{dotted-circle}** | string (max 32 chars) | Name of the plan for the namespace, such as `free`, `premium`, or `ultimate`. Automatically picked from the `namespace`. | | `plan` | **{dotted-circle}** | string (max 32 chars) | Name of the plan for the namespace, such as `free`, `premium`, or `ultimate`. Automatically picked from the `namespace`. |

View File

@ -140,7 +140,7 @@ Enhancements to use these filters through the user interface
## Automatic issue transitions ## Automatic issue transitions
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/...) in GitLab 13.10. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/55773) in GitLab 13.11.
When you configure automatic issue transitions, you can transition a referenced When you configure automatic issue transitions, you can transition a referenced
Jira issue to the next available status with a category of **Done**. To configure Jira issue to the next available status with a category of **Done**. To configure

View File

@ -2,6 +2,17 @@ chat_names:
- to_table: ci_pipeline_chat_data - to_table: ci_pipeline_chat_data
column: chat_name_id column: chat_name_id
on_delete: async_delete on_delete: async_delete
ci_builds:
- to_table: dast_site_profiles_builds
column: ci_build_id
on_delete: async_delete
- to_table: dast_scanner_profiles_builds
column: ci_build_id
on_delete: async_delete
ci_pipelines:
- to_table: dast_profiles_pipelines
column: ci_pipeline_id
on_delete: async_delete
ci_runners: ci_runners:
- to_table: clusters_applications_runners - to_table: clusters_applications_runners
column: runner_id column: runner_id

View File

@ -10,6 +10,12 @@
# alt_usage_data { Gitlab::VERSION } # alt_usage_data { Gitlab::VERSION }
# redis_usage_data(Gitlab::UsageDataCounters::WikiPageCounter) # redis_usage_data(Gitlab::UsageDataCounters::WikiPageCounter)
# redis_usage_data { ::Gitlab::UsageCounters::PodLogs.usage_totals[:total] } # redis_usage_data { ::Gitlab::UsageCounters::PodLogs.usage_totals[:total] }
# NOTE:
# Implementing metrics direct in `usage_data.rb` is deprecated,
# please add new instrumentation class and use add_metric method.
# For more information, see https://docs.gitlab.com/ee/development/service_ping/metrics_instrumentation.html
module Gitlab module Gitlab
class UsageData class UsageData
DEPRECATED_VALUE = -1000 DEPRECATED_VALUE = -1000

View File

@ -4818,6 +4818,9 @@ msgstr ""
msgid "Audit Events" msgid "Audit Events"
msgstr "" msgstr ""
msgid "Audit events"
msgstr ""
msgid "AuditLogs|(removed)" msgid "AuditLogs|(removed)"
msgstr "" msgstr ""
@ -11429,6 +11432,9 @@ msgstr ""
msgid "Dependency Scanning" msgid "Dependency Scanning"
msgstr "" msgstr ""
msgid "Dependency list"
msgstr ""
msgid "DependencyProxy|Cached %{time}" msgid "DependencyProxy|Cached %{time}"
msgstr "" msgstr ""
@ -20702,6 +20708,9 @@ msgstr ""
msgid "License Compliance" msgid "License Compliance"
msgstr "" msgstr ""
msgid "License compliance"
msgstr ""
msgid "License file" msgid "License file"
msgstr "" msgstr ""
@ -35855,7 +35864,7 @@ msgstr ""
msgid "Thread to reply to cannot be found" msgid "Thread to reply to cannot be found"
msgstr "" msgstr ""
msgid "Threat Monitoring" msgid "Threat monitoring"
msgstr "" msgstr ""
msgid "ThreatMonitoring|Alert Details" msgid "ThreatMonitoring|Alert Details"
@ -38552,6 +38561,9 @@ msgstr ""
msgid "Vulnerability remediated. Review before resolving." msgid "Vulnerability remediated. Review before resolving."
msgstr "" msgstr ""
msgid "Vulnerability report"
msgstr ""
msgid "Vulnerability resolved in %{branch}" msgid "Vulnerability resolved in %{branch}"
msgstr "" msgstr ""
@ -39337,7 +39349,7 @@ msgstr ""
msgid "WikiPage|Keep editing" msgid "WikiPage|Keep editing"
msgstr "" msgstr ""
msgid "WikiPage|More Information." msgid "WikiPage|Learn more."
msgstr "" msgstr ""
msgid "WikiPage|Page title" msgid "WikiPage|Page title"

View File

@ -38,7 +38,7 @@ describe('WikiForm', () => {
wrapper.findByRole('button', { name: 'Try this later' }); wrapper.findByRole('button', { name: 'Try this later' });
const findSwitchToOldEditorButton = () => const findSwitchToOldEditorButton = () =>
wrapper.findByRole('button', { name: 'Switch me back to the classic editor.' }); wrapper.findByRole('button', { name: 'Switch me back to the classic editor.' });
const findTitleHelpLink = () => wrapper.findByRole('link', { name: 'More Information.' }); const findTitleHelpLink = () => wrapper.findByRole('link', { name: 'Learn more.' });
const findMarkdownHelpLink = () => wrapper.findByTestId('wiki-markdown-help-link'); const findMarkdownHelpLink = () => wrapper.findByTestId('wiki-markdown-help-link');
const findContentEditor = () => wrapper.findComponent(ContentEditor); const findContentEditor = () => wrapper.findComponent(ContentEditor);
const findClassicEditor = () => wrapper.findComponent(MarkdownField); const findClassicEditor = () => wrapper.findComponent(MarkdownField);

View File

@ -5403,4 +5403,8 @@ RSpec.describe Ci::Build do
expect(subject).to be true expect(subject).to be true
end end
end end
it_behaves_like 'it has loose foreign keys' do
let(:factory_name) { :ci_build }
end
end end

View File

@ -4611,4 +4611,8 @@ RSpec.describe Ci::Pipeline, :mailer, factory_default: :keep do
expect(pipeline.authorized_cluster_agents).to contain_exactly(agent) # cached expect(pipeline.authorized_cluster_agents).to contain_exactly(agent) # cached
end end
end end
it_behaves_like 'it has loose foreign keys' do
let(:factory_name) { :ci_pipeline }
end
end end

View File

@ -5,7 +5,7 @@ RSpec.shared_context 'project navbar structure' do
{ {
nav_item: _('Security & Compliance'), nav_item: _('Security & Compliance'),
nav_sub_items: [ nav_sub_items: [
(_('Audit Events') if Gitlab.ee?), (_('Audit events') if Gitlab.ee?),
_('Configuration') _('Configuration')
] ]
} }
@ -165,7 +165,7 @@ RSpec.shared_context 'group navbar structure' do
{ {
nav_item: _('Security & Compliance'), nav_item: _('Security & Compliance'),
nav_sub_items: [ nav_sub_items: [
_('Audit Events') _('Audit events')
] ]
} }
end end

View File

@ -25,7 +25,9 @@ RSpec.shared_examples 'it has loose foreign keys' do
it 'records record deletions' do it 'records record deletions' do
model = create(factory_name) # rubocop: disable Rails/SaveBang model = create(factory_name) # rubocop: disable Rails/SaveBang
model.destroy!
# using delete to avoid cross-database modification errors when associations with dependent option are present
model.delete
deleted_record = LooseForeignKeys::DeletedRecord.find_by(fully_qualified_table_name: "#{connection.current_schema}.#{table_name}", primary_key_value: model.id) deleted_record = LooseForeignKeys::DeletedRecord.find_by(fully_qualified_table_name: "#{connection.current_schema}.#{table_name}", primary_key_value: model.id)
@ -35,7 +37,7 @@ RSpec.shared_examples 'it has loose foreign keys' do
it 'cleans up record deletions' do it 'cleans up record deletions' do
model = create(factory_name) # rubocop: disable Rails/SaveBang model = create(factory_name) # rubocop: disable Rails/SaveBang
expect { model.destroy! }.to change { LooseForeignKeys::DeletedRecord.count }.by(1) expect { model.delete }.to change { LooseForeignKeys::DeletedRecord.count }.by(1)
LooseForeignKeys::ProcessDeletedRecordsService.new(connection: connection).execute LooseForeignKeys::ProcessDeletedRecordsService.new(connection: connection).execute