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 = {
addition: {
icon: 'file-addition',
class: 'ide-file-addition',
class: 'file-addition ide-file-addition',
},
modified: {
icon: 'file-modified',
class: 'ide-file-modified',
class: 'file-modified ide-file-modified',
},
deleted: {
icon: 'file-deletion',
class: 'ide-file-deletion',
class: 'file-deletion ide-file-deletion',
},
};

View File

@ -47,7 +47,7 @@ export default {
newPage: s__(
'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: {
@ -402,10 +402,9 @@ export default {
<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" />
{{ titleHelpText }}
<gl-link :href="helpPath" target="_blank"
><gl-icon name="question-o" />
{{ $options.i18n.title.helpText.moreInformation }}</gl-link
>
<gl-link :href="helpPath" target="_blank">
{{ $options.i18n.title.helpText.learnMore }}
</gl-link>
</span>
</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 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 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"
```
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:
- 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 | |
| `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` |
| `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`. |

View File

@ -140,7 +140,7 @@ Enhancements to use these filters through the user interface
## 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
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
column: chat_name_id
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:
- to_table: clusters_applications_runners
column: runner_id

View File

@ -10,6 +10,12 @@
# alt_usage_data { Gitlab::VERSION }
# redis_usage_data(Gitlab::UsageDataCounters::WikiPageCounter)
# 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
class UsageData
DEPRECATED_VALUE = -1000

View File

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

View File

@ -38,7 +38,7 @@ describe('WikiForm', () => {
wrapper.findByRole('button', { name: 'Try this later' });
const findSwitchToOldEditorButton = () =>
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 findContentEditor = () => wrapper.findComponent(ContentEditor);
const findClassicEditor = () => wrapper.findComponent(MarkdownField);

View File

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

View File

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

View File

@ -25,7 +25,9 @@ RSpec.shared_examples 'it has loose foreign keys' do
it 'records record deletions' do
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)
@ -35,7 +37,7 @@ RSpec.shared_examples 'it has loose foreign keys' do
it 'cleans up record deletions' do
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