Skip to content
Snippets Groups Projects
Commit 411cc779 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 3e36f70b
No related branches found
No related tags found
No related merge requests found
Showing
with 53 additions and 8 deletions
Loading
Loading
@@ -2,18 +2,16 @@
.js-file-title.file-title-flex-parent
= render 'projects/blob/header_content', blob: blob
 
.file-actions
.file-actions<
= render 'projects/blob/viewer_switcher', blob: blob unless blame
.btn-group{ role: "group" }<
= edit_blob_button
= ide_edit_button
.btn-group{ role: "group" }<
= edit_blob_button
= ide_edit_button
.btn-group.ml-2{ role: "group" }>
= render_if_exists 'projects/blob/header_file_locks_link'
- if current_user
= replace_blob_link
= delete_blob_link
.btn-group{ role: "group" }<
.btn-group.ml-2{ role: "group" }
= copy_blob_source_button(blob) unless blame
= open_raw_blob_button(blob)
= download_blob_button(blob)
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
- simple_viewer = blob.simple_viewer
- rich_viewer = blob.rich_viewer
 
.btn-group.js-blob-viewer-switcher{ role: "group" }
.btn-group.js-blob-viewer-switcher.ml-2{ role: "group" }>
- simple_label = "Display #{simple_viewer.switcher_title}"
%button.btn.btn-default.btn-sm.js-blob-viewer-switch-btn.has-tooltip{ 'aria-label' => simple_label, title: simple_label, data: { viewer: 'simple', container: 'body' } }>
= icon(simple_viewer.switcher_icon)
Loading
Loading
Loading
Loading
@@ -22,6 +22,8 @@
- if user == current_user
%span.badge.badge-success.prepend-left-5= _("It's you")
 
= render_if_exists 'shared/members/ee/license_badge', user: user, group: @group
- if user.blocked?
%label.badge.badge-danger
%strong= _("Blocked")
Loading
Loading
Loading
Loading
@@ -6,6 +6,7 @@ class AuthorizedProjectsWorker
 
feature_category :authentication_and_authorization
latency_sensitive_worker!
weight 2
 
# This is a workaround for a Ruby 2.3.7 bug. rspec-mocks cannot restore the
# visibility of prepended modules. See https://github.com/rspec/rspec-mocks/issues/1231
Loading
Loading
Loading
Loading
@@ -8,6 +8,8 @@ class ChatNotificationWorker
sidekiq_options retry: false
feature_category :chatops
latency_sensitive_worker!
weight 2
# TODO: break this into multiple jobs
# as the `responder` uses external dependencies
# See https://gitlab.com/gitlab-com/gl-infra/scalability/issues/34
Loading
Loading
Loading
Loading
@@ -9,6 +9,7 @@ module SelfMonitoringProjectWorker
# Other Functionality. Metrics seems to be the closest feature_category for
# this worker.
feature_category :metrics
weight 2
end
 
LEASE_TIMEOUT = 15.minutes.to_i
Loading
Loading
Loading
Loading
@@ -7,6 +7,24 @@ module WorkerAttributes
# `worker_resource_boundary` attribute
VALID_RESOURCE_BOUNDARIES = [:memory, :cpu, :unknown].freeze
 
NAMESPACE_WEIGHTS = {
auto_devops: 2,
auto_merge: 3,
chaos: 2,
deployment: 3,
mail_scheduler: 2,
notifications: 2,
pipeline_cache: 3,
pipeline_creation: 4,
pipeline_default: 3,
pipeline_hooks: 2,
pipeline_processing: 5,
# EE-specific
epics: 2,
incident_management: 2
}.stringify_keys.freeze
class_methods do
def feature_category(value)
raise "Invalid category. Use `feature_category_not_owned!` to mark a worker as not owned" if value == :not_owned
Loading
Loading
@@ -70,6 +88,16 @@ module WorkerAttributes
worker_attributes[:resource_boundary] || :unknown
end
 
def weight(value)
worker_attributes[:weight] = value
end
def get_weight
worker_attributes[:weight] ||
NAMESPACE_WEIGHTS[queue_namespace] ||
1
end
protected
 
# Returns a worker attribute declared on this class or its parent class.
Loading
Loading
Loading
Loading
@@ -4,6 +4,7 @@ class CreateEvidenceWorker
include ApplicationWorker
 
feature_category :release_governance
weight 2
 
def perform(release_id)
release = Release.find_by_id(release_id)
Loading
Loading
Loading
Loading
@@ -4,6 +4,7 @@ class CreateGpgSignatureWorker
include ApplicationWorker
 
feature_category :source_code_management
weight 2
 
# rubocop: disable CodeReuse/ActiveRecord
def perform(commit_shas, project_id)
Loading
Loading
Loading
Loading
@@ -5,6 +5,7 @@ class EmailReceiverWorker
 
feature_category :issue_tracking
latency_sensitive_worker!
weight 2
 
def perform(raw)
return unless Gitlab::IncomingEmail.enabled?
Loading
Loading
Loading
Loading
@@ -8,6 +8,7 @@ class EmailsOnPushWorker
feature_category :source_code_management
latency_sensitive_worker!
worker_resource_boundary :cpu
weight 2
 
def perform(project_id, recipients, push_data, options = {})
options.symbolize_keys!
Loading
Loading
Loading
Loading
@@ -6,6 +6,7 @@ class GitlabShellWorker
 
feature_category :source_code_management
latency_sensitive_worker!
weight 2
 
def perform(action, *arg)
Gitlab::GitalyClient::NamespaceService.allow do
Loading
Loading
Loading
Loading
@@ -5,6 +5,7 @@ class ImportIssuesCsvWorker
 
feature_category :issue_tracking
worker_resource_boundary :cpu
weight 2
 
sidekiq_retries_exhausted do |job|
Upload.find(job['args'][2]).destroy
Loading
Loading
Loading
Loading
@@ -4,6 +4,7 @@ class InvalidGpgSignatureUpdateWorker
include ApplicationWorker
 
feature_category :source_code_management
weight 2
 
# rubocop: disable CodeReuse/ActiveRecord
def perform(gpg_key_id)
Loading
Loading
Loading
Loading
@@ -5,6 +5,7 @@ class MergeWorker
 
feature_category :source_code_management
latency_sensitive_worker!
weight 5
 
def perform(merge_request_id, current_user_id, params)
params = params.with_indifferent_access
Loading
Loading
Loading
Loading
@@ -7,6 +7,7 @@ class NewIssueWorker
feature_category :issue_tracking
latency_sensitive_worker!
worker_resource_boundary :cpu
weight 2
 
def perform(issue_id, user_id)
return unless objects_found?(issue_id, user_id)
Loading
Loading
Loading
Loading
@@ -7,6 +7,7 @@ class NewMergeRequestWorker
feature_category :source_code_management
latency_sensitive_worker!
worker_resource_boundary :cpu
weight 2
 
def perform(merge_request_id, user_id)
return unless objects_found?(merge_request_id, user_id)
Loading
Loading
Loading
Loading
@@ -6,6 +6,7 @@ class NewNoteWorker
feature_category :issue_tracking
latency_sensitive_worker!
worker_resource_boundary :cpu
weight 2
 
# Keep extra parameter to preserve backwards compatibility with
# old `NewNoteWorker` jobs (can remove later)
Loading
Loading
Loading
Loading
@@ -5,6 +5,7 @@ class NewReleaseWorker
 
queue_namespace :notifications
feature_category :release_orchestration
weight 2
 
def perform(release_id)
release = Release.preloaded.find_by_id(release_id)
Loading
Loading
Loading
Loading
@@ -6,6 +6,7 @@ class PostReceive
feature_category :source_code_management
latency_sensitive_worker!
worker_resource_boundary :cpu
weight 5
 
def perform(gl_repository, identifier, changes, push_options = {})
project, repo_type = Gitlab::GlRepository.parse(gl_repository)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment