Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-07-29 03:09:06 +00:00
parent ce806e2ad6
commit ff3bb8c2eb
56 changed files with 74 additions and 64 deletions

View File

@ -27,7 +27,7 @@ class Projects::ErrorTrackingController < Projects::ErrorTracking::BaseControlle
end
def update
service = ErrorTracking::IssueUpdateService.new(project, current_user, issue_update_params)
service = ::ErrorTracking::IssueUpdateService.new(project, current_user, issue_update_params)
result = service.execute
return if render_errors(result)
@ -40,7 +40,7 @@ class Projects::ErrorTrackingController < Projects::ErrorTracking::BaseControlle
private
def render_index_json
service = ErrorTracking::ListIssuesService.new(
service = ::ErrorTracking::ListIssuesService.new(
project,
current_user,
list_issues_params
@ -57,7 +57,7 @@ class Projects::ErrorTrackingController < Projects::ErrorTracking::BaseControlle
end
def render_issue_detail_json
service = ErrorTracking::IssueDetailsService.new(project, current_user, issue_details_params)
service = ::ErrorTracking::IssueDetailsService.new(project, current_user, issue_details_params)
result = service.execute
return if render_errors(result)
@ -91,13 +91,13 @@ class Projects::ErrorTrackingController < Projects::ErrorTracking::BaseControlle
end
def serialize_errors(errors)
ErrorTracking::ErrorSerializer
::ErrorTracking::ErrorSerializer
.new(project: project, user: current_user)
.represent(errors)
end
def serialize_detailed_error(error)
ErrorTracking::DetailedErrorSerializer
::ErrorTracking::DetailedErrorSerializer
.new(project: project, user: current_user)
.represent(error)
end

View File

@ -32,10 +32,6 @@
- if page_canonical_link
%link{ rel: 'canonical', href: page_canonical_link }
- if user_application_theme == 'gl-dark'
= preload_link_tag(path_to_stylesheet('application_utilities_dark'))
- else
= preload_link_tag(path_to_stylesheet('application_utilities'))
= yield :prefetch_asset_tags
= favicon_link_tag favicon, id: 'favicon', data: { original_href: favicon }, type: 'image/png'

View File

@ -1,11 +1,15 @@
= cache_if(Feature.enabled?(:cached_loading_hints, current_user), [ActionController::Base.asset_host, user_application_theme, user_color_scheme], expires_in: 1.minute) do
- css_crossorigin = ActionController::Base.asset_host ? 'anonymous' : nil
- if ActionController::Base.asset_host
%link{ rel: 'dns-prefetch', href: ActionController::Base.asset_host }
%link{ rel: 'preconnect', href: ActionController::Base.asset_host, crossorigin: '' }
- if user_application_theme == 'gl-dark'
%link{ { rel: 'preload', href: stylesheet_url('application_dark'), as: 'style' }, ActionController::Base.asset_host ? { crossorigin: 'anonymous' } : {} }
= preload_link_tag(path_to_stylesheet('application_utilities_dark'), crossorigin: css_crossorigin)
= preload_link_tag(path_to_stylesheet('application_dark'), crossorigin: css_crossorigin)
- else
%link{ { rel: 'preload', href: stylesheet_url('application'), as: 'style' }, ActionController::Base.asset_host ? { crossorigin: 'anonymous' } : {} }
%link{ { rel: 'preload', href: stylesheet_url("highlight/themes/#{user_color_scheme}"), as: 'style' }, ActionController::Base.asset_host ? { crossorigin: 'anonymous' } : {} }
= preload_link_tag(path_to_stylesheet('application_utilities'), crossorigin: css_crossorigin)
= preload_link_tag(path_to_stylesheet('application'), crossorigin: css_crossorigin)
= preload_link_tag(path_to_stylesheet("highlight/themes/#{user_color_scheme}"), crossorigin: css_crossorigin)
- if Gitlab::Tracking.enabled? && Gitlab::CurrentSettings.snowplow_collector_hostname
%link{ rel: 'preconnect', href: Gitlab::CurrentSettings.snowplow_collector_hostname, crossorigin: '' }

View File

@ -5,7 +5,6 @@ class AdminEmailWorker # rubocop:disable Scalability/IdempotentWorker
data_consistency :always
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue

View File

@ -8,7 +8,6 @@ module Analytics
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
DEFAULT_DELAY = 3.minutes.freeze

View File

@ -6,7 +6,6 @@ module AuthorizedProjectUpdate
data_consistency :always
sidekiq_options retry: 3
# This worker does not perform work scoped to a context
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext

View File

@ -6,7 +6,6 @@ module Ci
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :continuous_integration

View File

@ -7,7 +7,6 @@ module Ci
data_consistency :always
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue

View File

@ -6,7 +6,6 @@ module Ci
data_consistency :always
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue

View File

@ -5,8 +5,6 @@ class CiPlatformMetricsUpdateCronWorker # rubocop:disable Scalability/Idempotent
data_consistency :always
sidekiq_options retry: 3
# This worker does not perform work scoped to a context
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext

View File

@ -7,7 +7,6 @@ module Clusters
data_consistency :always
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue

View File

@ -5,7 +5,6 @@ class ContainerExpirationPolicyWorker # rubocop:disable Scalability/IdempotentWo
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue
include ExclusiveLeaseGuard

View File

@ -6,7 +6,6 @@ module Database
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :database

View File

@ -4,7 +4,6 @@ module Database
class PartitionManagementWorker
include ApplicationWorker
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
data_consistency :always

View File

@ -6,7 +6,6 @@ module Environments
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :continuous_delivery

View File

@ -5,7 +5,6 @@ class ExpireBuildArtifactsWorker # rubocop:disable Scalability/IdempotentWorker
data_consistency :always
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue

View File

@ -10,7 +10,6 @@ module Gitlab
included do
include ApplicationWorker
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker updates several import states inline and does not schedule
# other jobs. So no context needed

View File

@ -5,7 +5,6 @@ class ImportExportProjectCleanupWorker # rubocop:disable Scalability/IdempotentW
data_consistency :always
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue

View File

@ -5,7 +5,6 @@ class IssueDueSchedulerWorker # rubocop:disable Scalability/IdempotentWorker
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :issue_tracking

View File

@ -5,7 +5,6 @@ class MemberInvitationReminderEmailsWorker # rubocop:disable Scalability/Idempot
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :subgroups

View File

@ -7,7 +7,6 @@ module Metrics
data_consistency :always
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue

View File

@ -6,7 +6,6 @@ module Namespaces
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :subgroups

View File

@ -6,7 +6,6 @@ module Namespaces
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :source_code_management

View File

@ -7,7 +7,6 @@ module Packages
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :package_registry

View File

@ -5,7 +5,6 @@ class PagesDomainRemovalCronWorker # rubocop:disable Scalability/IdempotentWorke
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue
feature_category :pages

View File

@ -5,7 +5,6 @@ class PagesDomainSslRenewalCronWorker # rubocop:disable Scalability/IdempotentWo
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue
feature_category :pages

View File

@ -5,7 +5,6 @@ class PagesDomainVerificationCronWorker # rubocop:disable Scalability/Idempotent
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue
feature_category :pages

View File

@ -5,7 +5,6 @@ class PartitionCreationWorker
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :database

View File

@ -6,7 +6,6 @@ module PersonalAccessTokens
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue
feature_category :authentication_and_authorization

View File

@ -6,7 +6,6 @@ module PersonalAccessTokens
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue
feature_category :authentication_and_authorization

View File

@ -5,7 +5,6 @@ class PipelineScheduleWorker # rubocop:disable Scalability/IdempotentWorker
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue
feature_category :continuous_integration

View File

@ -5,7 +5,6 @@ class PruneOldEventsWorker # rubocop:disable Scalability/IdempotentWorker
data_consistency :always
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue

View File

@ -6,7 +6,6 @@ module Releases
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :release_evidence

View File

@ -5,7 +5,6 @@ class RemoveExpiredGroupLinksWorker # rubocop:disable Scalability/IdempotentWork
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :authentication_and_authorization

View File

@ -5,7 +5,6 @@ class RemoveExpiredMembersWorker # rubocop:disable Scalability/IdempotentWorker
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue
feature_category :authentication_and_authorization

View File

@ -5,7 +5,6 @@ class RemoveUnacceptedMemberInvitesWorker # rubocop:disable Scalability/Idempote
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :authentication_and_authorization

View File

@ -5,7 +5,6 @@ class RemoveUnreferencedLfsObjectsWorker
data_consistency :always
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue

View File

@ -5,7 +5,6 @@ class RepositoryArchiveCacheWorker # rubocop:disable Scalability/IdempotentWorke
data_consistency :always
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue

View File

@ -6,7 +6,6 @@ module RepositoryCheck
data_consistency :always
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue

View File

@ -5,7 +5,6 @@ class RequestsProfilesWorker # rubocop:disable Scalability/IdempotentWorker
data_consistency :always
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue

View File

@ -5,7 +5,6 @@ class ScheduleMergeRequestCleanupRefsWorker
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :code_review

View File

@ -5,7 +5,6 @@ class ScheduleMigrateExternalDiffsWorker # rubocop:disable Scalability/Idempoten
data_consistency :always
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext:
# This schedules the `MigrateExternalDiffsWorker`
# issue for adding context: https://gitlab.com/gitlab-org/gitlab/issues/202100

View File

@ -6,7 +6,6 @@ module SshKeys
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue
feature_category :compliance_management

View File

@ -6,7 +6,6 @@ module SshKeys
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue
feature_category :compliance_management

View File

@ -5,7 +5,6 @@ class StuckCiJobsWorker # rubocop:disable Scalability/IdempotentWorker
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue
feature_category :continuous_integration

View File

@ -6,7 +6,6 @@ class StuckExportJobsWorker
data_consistency :always
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker updates export states inline and does not schedule
# other jobs.

View File

@ -5,7 +5,6 @@ class StuckMergeJobsWorker # rubocop:disable Scalability/IdempotentWorker
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :code_review

View File

@ -5,7 +5,6 @@ class TrendingProjectsWorker # rubocop:disable Scalability/IdempotentWorker
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :source_code_management

View File

@ -5,7 +5,6 @@ class UpdateContainerRegistryInfoWorker
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
feature_category :container_registry

View File

@ -7,7 +7,6 @@ module UserStatusCleanup
data_consistency :always
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
include CronjobQueue
# rubocop:enable Scalability/CronWorkerContext

View File

@ -6,7 +6,6 @@ module Users
data_consistency :always
sidekiq_options retry: 3
# rubocop:disable Scalability/CronWorkerContext
# This worker does not perform work scoped to a context
include CronjobQueue

View File

@ -5,7 +5,6 @@ class X509IssuerCrlCheckWorker
data_consistency :always
sidekiq_options retry: 3
include CronjobQueue
feature_category :source_code_management

View File

@ -0,0 +1,20 @@
# frozen_string_literal: true
class AddRequestResponseToSupporingMessage < ActiveRecord::Migration[6.1]
def change
change_column_null(:vulnerability_finding_evidence_requests, :vulnerability_finding_evidence_id, true)
change_column_null(:vulnerability_finding_evidence_responses, :vulnerability_finding_evidence_id, true)
# rubocop: disable Migration/AddReference
# Table is empty, so no need to use add_concurrent_foreign_key and add_concurrent_index
add_reference(:vulnerability_finding_evidence_requests,
:vulnerability_finding_evidence_supporting_message,
index: { name: 'finding_evidence_requests_on_supporting_evidence_id' },
foreign_key: { on_delete: :cascade })
add_reference(:vulnerability_finding_evidence_responses,
:vulnerability_finding_evidence_supporting_message,
index: { name: 'finding_evidence_responses_on_supporting_evidence_id' },
foreign_key: { on_delete: :cascade })
# rubocop:enable Migration/AddReference
end
end

View File

@ -0,0 +1 @@
9320dcd2a5bed122310aefd630f9c406a25b22767dba3bf118a30df044c2d6a7

View File

@ -19239,10 +19239,11 @@ CREATE TABLE vulnerability_finding_evidence_requests (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
vulnerability_finding_evidence_id bigint NOT NULL,
vulnerability_finding_evidence_id bigint,
method text,
url text,
body text,
vulnerability_finding_evidence_supporting_message_id bigint,
CONSTRAINT check_7e37f2d01a CHECK ((char_length(body) <= 2048)),
CONSTRAINT check_8152fbb236 CHECK ((char_length(url) <= 2048)),
CONSTRAINT check_d9d11300f4 CHECK ((char_length(method) <= 32))
@ -19261,10 +19262,11 @@ CREATE TABLE vulnerability_finding_evidence_responses (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
vulnerability_finding_evidence_id bigint NOT NULL,
vulnerability_finding_evidence_id bigint,
status_code integer,
reason_phrase text,
body text,
vulnerability_finding_evidence_supporting_message_id bigint,
CONSTRAINT check_58b124ab48 CHECK ((char_length(reason_phrase) <= 2048)),
CONSTRAINT check_76bac0c32b CHECK ((char_length(body) <= 2048))
);
@ -22669,8 +22671,12 @@ CREATE INDEX finding_evidence_header_on_finding_evidence_response_id ON vulnerab
CREATE INDEX finding_evidence_requests_on_finding_evidence_id ON vulnerability_finding_evidence_requests USING btree (vulnerability_finding_evidence_id);
CREATE INDEX finding_evidence_requests_on_supporting_evidence_id ON vulnerability_finding_evidence_requests USING btree (vulnerability_finding_evidence_supporting_message_id);
CREATE INDEX finding_evidence_responses_on_finding_evidences_id ON vulnerability_finding_evidence_responses USING btree (vulnerability_finding_evidence_id);
CREATE INDEX finding_evidence_responses_on_supporting_evidence_id ON vulnerability_finding_evidence_responses USING btree (vulnerability_finding_evidence_supporting_message_id);
CREATE INDEX finding_evidence_sources_on_finding_evidence_id ON vulnerability_finding_evidence_sources USING btree (vulnerability_finding_evidence_id);
CREATE INDEX finding_evidence_supporting_messages_on_finding_evidence_id ON vulnerability_finding_evidence_supporting_messages USING btree (vulnerability_finding_evidence_id);
@ -27552,6 +27558,9 @@ ALTER TABLE ONLY project_error_tracking_settings
ALTER TABLE ONLY list_user_preferences
ADD CONSTRAINT fk_rails_916d72cafd FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
ALTER TABLE ONLY vulnerability_finding_evidence_responses
ADD CONSTRAINT fk_rails_929041a499 FOREIGN KEY (vulnerability_finding_evidence_supporting_message_id) REFERENCES vulnerability_finding_evidence_supporting_messages(id) ON DELETE CASCADE;
ALTER TABLE ONLY merge_request_cleanup_schedules
ADD CONSTRAINT fk_rails_92dd0e705c FOREIGN KEY (merge_request_id) REFERENCES merge_requests(id) ON DELETE CASCADE;
@ -27912,6 +27921,9 @@ ALTER TABLE ONLY resource_milestone_events
ALTER TABLE ONLY resource_iteration_events
ADD CONSTRAINT fk_rails_cee126f66c FOREIGN KEY (iteration_id) REFERENCES sprints(id) ON DELETE CASCADE;
ALTER TABLE ONLY vulnerability_finding_evidence_requests
ADD CONSTRAINT fk_rails_cf0f278cb0 FOREIGN KEY (vulnerability_finding_evidence_supporting_message_id) REFERENCES vulnerability_finding_evidence_supporting_messages(id) ON DELETE CASCADE;
ALTER TABLE ONLY epic_metrics
ADD CONSTRAINT fk_rails_d071904753 FOREIGN KEY (epic_id) REFERENCES epics(id) ON DELETE CASCADE;

View File

@ -26412,6 +26412,9 @@ msgstr ""
msgid "Promotions|Audit Events is a way to keep track of important events that happened in GitLab."
msgstr ""
msgid "Promotions|Better Protected Branches"
msgstr ""
msgid "Promotions|Burndown Charts are visual representations of the progress of completing a milestone. At a glance, you see the current state for the completion a given milestone. Without them, you would have to organize the data from the milestone and plot it yourself to have the same sense of progress."
msgstr ""
@ -26436,6 +26439,9 @@ msgstr ""
msgid "Promotions|Dismiss burndown charts promotion"
msgstr ""
msgid "Promotions|Dismiss repository features promotion"
msgstr ""
msgid "Promotions|Don't show me this again"
msgstr ""
@ -26451,6 +26457,9 @@ msgstr ""
msgid "Promotions|Improve milestones with Burndown Charts."
msgstr ""
msgid "Promotions|Improve repositories with GitLab Enterprise Edition."
msgstr ""
msgid "Promotions|Improve search with Advanced Search and GitLab Enterprise Edition."
msgstr ""
@ -26463,6 +26472,18 @@ msgstr ""
msgid "Promotions|Not now, thanks!"
msgstr ""
msgid "Promotions|Push Rules"
msgstr ""
msgid "Promotions|Push Rules are defined per project so you can have different rules applied to different projects depends on your needs."
msgstr ""
msgid "Promotions|Repository Mirroring"
msgstr ""
msgid "Promotions|Repository Mirroring is a way to mirror repositories from external sources. It can be used to mirror all branches, tags, and commits that you have in your repository."
msgstr ""
msgid "Promotions|See the other features in the %{subscription_link_start}Premium plan%{subscription_link_end}"
msgstr ""
@ -26508,6 +26529,9 @@ msgstr ""
msgid "Promotions|Upgrade your plan to improve milestones with Burndown Charts."
msgstr ""
msgid "Promotions|Upgrade your plan to improve repositories."
msgstr ""
msgid "Promotions|Webhooks allow you to trigger a URL if, for example, new code is pushed or a new issue is created. You can configure webhooks to listen for specific events like pushes, issues or merge requests. Group webhooks will apply to all projects in a group, allowing you to standardize webhook functionality across your entire group."
msgstr ""
@ -26523,6 +26547,9 @@ msgstr ""
msgid "Promotions|With Contribution Analytics you can have an overview for the activity of issues, merge requests, and push events of your organization and its members."
msgstr ""
msgid "Promotions|You can restrict access to protected branches by choosing a role (Maintainers, Developers) as well as certain users."
msgstr ""
msgid "Promotions|description templates"
msgstr ""