Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
0a559c913e
commit
f50cb4f63f
|
@ -1 +1 @@
|
|||
d99f9cbac9164647666f1778eb912568c261813d
|
||||
8e59a9f5d61cceb4ded8b12c02c4b75b48b83f46
|
||||
|
|
2
Gemfile
2
Gemfile
|
@ -196,7 +196,7 @@ gem 'acts-as-taggable-on', '~> 7.0'
|
|||
|
||||
# Background jobs
|
||||
gem 'sidekiq', '~> 6.2.2'
|
||||
gem 'sidekiq-cron', '~> 1.0'
|
||||
gem 'sidekiq-cron', '~> 1.2'
|
||||
gem 'redis-namespace', '~> 1.8.1'
|
||||
gem 'gitlab-sidekiq-fetcher', '0.8.0', require: 'sidekiq-reliable-fetch'
|
||||
|
||||
|
|
|
@ -1172,7 +1172,7 @@ GEM
|
|||
connection_pool (>= 2.2.2)
|
||||
rack (~> 2.0)
|
||||
redis (>= 4.2.0)
|
||||
sidekiq-cron (1.0.4)
|
||||
sidekiq-cron (1.2.0)
|
||||
fugit (~> 1.1)
|
||||
sidekiq (>= 4.2.1)
|
||||
signet (0.14.0)
|
||||
|
@ -1611,7 +1611,7 @@ DEPENDENCIES
|
|||
settingslogic (~> 2.0.9)
|
||||
shoulda-matchers (~> 4.0.1)
|
||||
sidekiq (~> 6.2.2)
|
||||
sidekiq-cron (~> 1.0)
|
||||
sidekiq-cron (~> 1.2)
|
||||
simple_po_parser (~> 1.1.2)
|
||||
simplecov (~> 0.18.5)
|
||||
simplecov-cobertura (~> 1.3.1)
|
||||
|
|
|
@ -84,7 +84,7 @@ export default {
|
|||
),
|
||||
subnetDropdownHelpPath: 'https://console.aws.amazon.com/vpc/home?#subnets',
|
||||
securityGroupDropdownHelpText: s__(
|
||||
'ClusterIntegration|Choose the %{linkStart}security group %{linkEnd} to apply to the EKS-managed Elastic Network Interfaces that are created in your worker node subnets.',
|
||||
'ClusterIntegration|Choose the %{linkStart}security group%{linkEnd} to apply to the EKS-managed Elastic Network Interfaces that are created in your worker node subnets.',
|
||||
),
|
||||
securityGroupDropdownHelpPath: 'https://console.aws.amazon.com/vpc/home?#securityGroups',
|
||||
instanceTypesDropdownHelpText: s__(
|
||||
|
|
|
@ -15,9 +15,9 @@ export const DEFAULT_I18N = Object.freeze({
|
|||
searchPlaceholder: __('Search by Git revision'),
|
||||
noResultsWithQuery: __('No matching results for "%{query}"'),
|
||||
noResults: __('No matching results'),
|
||||
branchesErrorMessage: __('An error occurred while fetching branches. Retry the search.'),
|
||||
branchesErrorMessage: __('An error occurred while fetching branches. Retry the search.'),
|
||||
tagsErrorMessage: __('An error occurred while fetching tags. Retry the search.'),
|
||||
commitsErrorMessage: __('An error occurred while fetching commits. Retry the search.'),
|
||||
commitsErrorMessage: __('An error occurred while fetching commits. Retry the search.'),
|
||||
branches: __('Branches'),
|
||||
tags: __('Tags'),
|
||||
commits: __('Commits'),
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<script>
|
||||
import { GlDeprecatedSkeletonLoading as GlSkeletonLoading } from '@gitlab/ui';
|
||||
import {
|
||||
GlDeprecatedSkeletonLoading as GlSkeletonLoading,
|
||||
GlSafeHtmlDirective as SafeHtml,
|
||||
} from '@gitlab/ui';
|
||||
import $ from 'jquery';
|
||||
import '~/behaviors/markdown/render_gfm';
|
||||
import { forEach, escape } from 'lodash';
|
||||
|
@ -13,6 +16,9 @@ export default {
|
|||
components: {
|
||||
GlSkeletonLoading,
|
||||
},
|
||||
directives: {
|
||||
SafeHtml,
|
||||
},
|
||||
props: {
|
||||
content: {
|
||||
type: String,
|
||||
|
@ -103,6 +109,7 @@ export default {
|
|||
}
|
||||
},
|
||||
},
|
||||
safeHtmlConfig: { ADD_TAGS: ['gl-emoji', 'use'] },
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -111,8 +118,8 @@ export default {
|
|||
<gl-skeleton-loading v-if="isLoading" />
|
||||
<div
|
||||
v-else
|
||||
v-safe-html:[$options.safeHtmlConfig]="previewContent"
|
||||
class="md gl-ml-auto gl-mr-auto"
|
||||
v-html="previewContent /* eslint-disable-line vue/no-v-html */"
|
||||
></div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -179,6 +179,7 @@
|
|||
}
|
||||
|
||||
.block,
|
||||
.sidebar-contained-width,
|
||||
.issuable-sidebar-header {
|
||||
@include clearfix;
|
||||
padding: $gl-padding 0;
|
||||
|
@ -317,6 +318,7 @@
|
|||
padding: 0;
|
||||
|
||||
.block,
|
||||
.sidebar-contained-width,
|
||||
.issuable-sidebar-header {
|
||||
width: $gutter-collapsed-width - 2px;
|
||||
padding: 0;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
class Admin::LabelsController < Admin::ApplicationController
|
||||
before_action :set_label, only: [:show, :edit, :update, :destroy]
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
|
||||
def index
|
||||
@labels = Label.templates.page(params[:page])
|
||||
|
|
|
@ -5,7 +5,7 @@ class AutocompleteController < ApplicationController
|
|||
|
||||
feature_category :users, [:users, :user]
|
||||
feature_category :projects, [:projects]
|
||||
feature_category :issue_tracking, [:award_emojis]
|
||||
feature_category :team_planning, [:award_emojis]
|
||||
feature_category :code_review, [:merge_request_target_branches]
|
||||
feature_category :continuous_delivery, [:deploy_keys_with_owners]
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ module Boards
|
|||
before_action :validate_id_list, only: [:bulk_move]
|
||||
before_action :can_move_issues?, only: [:bulk_move]
|
||||
|
||||
feature_category :boards
|
||||
feature_category :team_planning
|
||||
|
||||
def index
|
||||
list_service = Boards::Issues::ListService.new(board_parent, current_user, filter_params)
|
||||
|
|
|
@ -8,7 +8,7 @@ module Boards
|
|||
before_action :authorize_read_list, only: [:index]
|
||||
skip_before_action :authenticate_user!, only: [:index]
|
||||
|
||||
feature_category :boards
|
||||
feature_category :team_planning
|
||||
|
||||
def index
|
||||
lists = Boards::Lists::ListService.new(board.resource_parent, current_user).execute(board)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Dashboard::LabelsController < Dashboard::ApplicationController
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
|
||||
def index
|
||||
respond_to do |format|
|
||||
|
|
|
@ -4,7 +4,7 @@ class Dashboard::MilestonesController < Dashboard::ApplicationController
|
|||
before_action :projects
|
||||
before_action :groups, only: :index
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
|
||||
def index
|
||||
respond_to do |format|
|
||||
|
|
|
@ -8,7 +8,7 @@ class Dashboard::TodosController < Dashboard::ApplicationController
|
|||
before_action :authorize_read_group!, only: :index
|
||||
before_action :find_todos, only: [:index, :destroy_all]
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
|
||||
def index
|
||||
@sort = params[:sort]
|
||||
|
|
|
@ -15,7 +15,7 @@ class DashboardController < Dashboard::ApplicationController
|
|||
respond_to :html
|
||||
|
||||
feature_category :users, [:activity]
|
||||
feature_category :issue_tracking, [:issues, :issues_calendar]
|
||||
feature_category :team_planning, [:issues, :issues_calendar]
|
||||
feature_category :code_review, [:merge_requests]
|
||||
|
||||
def activity
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class Groups::AutocompleteSourcesController < Groups::ApplicationController
|
||||
feature_category :subgroups, [:members]
|
||||
feature_category :issue_tracking, [:issues, :labels, :milestones, :commands]
|
||||
feature_category :team_planning, [:issues, :labels, :milestones, :commands]
|
||||
feature_category :code_review, [:merge_requests]
|
||||
|
||||
def members
|
||||
|
|
|
@ -14,7 +14,7 @@ class Groups::BoardsController < Groups::ApplicationController
|
|||
push_frontend_feature_flag(:labels_widget, group, default_enabled: :yaml)
|
||||
end
|
||||
|
||||
feature_category :boards
|
||||
feature_category :team_planning
|
||||
|
||||
private
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ class Groups::LabelsController < Groups::ApplicationController
|
|||
|
||||
respond_to :html
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
|
||||
def index
|
||||
respond_to do |format|
|
||||
|
|
|
@ -6,7 +6,7 @@ class Groups::MilestonesController < Groups::ApplicationController
|
|||
before_action :milestone, only: [:edit, :show, :update, :issues, :merge_requests, :participants, :labels, :destroy]
|
||||
before_action :authorize_admin_milestones!, only: [:edit, :new, :create, :update, :destroy]
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
|
||||
def index
|
||||
respond_to do |format|
|
||||
|
|
|
@ -54,7 +54,7 @@ class GroupsController < Groups::ApplicationController
|
|||
:destroy, :details, :transfer, :activity
|
||||
]
|
||||
|
||||
feature_category :issue_tracking, [:issues, :issues_calendar, :preview_markdown]
|
||||
feature_category :team_planning, [:issues, :issues_calendar, :preview_markdown]
|
||||
feature_category :code_review, [:merge_requests, :unfoldered_environment_names]
|
||||
feature_category :projects, [:projects]
|
||||
feature_category :importers, [:export, :download_export]
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
class Projects::AutocompleteSourcesController < Projects::ApplicationController
|
||||
before_action :authorize_read_milestone!, only: :milestones
|
||||
|
||||
feature_category :issue_tracking, [:issues, :labels, :milestones, :commands]
|
||||
feature_category :team_planning, [:issues, :labels, :milestones, :commands]
|
||||
feature_category :code_review, [:merge_requests]
|
||||
feature_category :users, [:members]
|
||||
feature_category :snippets, [:snippets]
|
||||
|
|
|
@ -14,7 +14,7 @@ class Projects::BoardsController < Projects::ApplicationController
|
|||
push_frontend_feature_flag(:labels_widget, project, default_enabled: :yaml)
|
||||
end
|
||||
|
||||
feature_category :boards
|
||||
feature_category :team_planning
|
||||
|
||||
private
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ class Projects::DiscussionsController < Projects::ApplicationController
|
|||
before_action :discussion, only: [:resolve, :unresolve]
|
||||
before_action :authorize_resolve_discussion!, only: [:resolve, :unresolve]
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
|
||||
def resolve
|
||||
Discussions::ResolveService.new(project, current_user, one_or_more_discussions: discussion).execute
|
||||
|
|
|
@ -7,7 +7,7 @@ module Projects
|
|||
before_action :authorize_admin_issue_link!, only: [:create, :destroy]
|
||||
before_action :authorize_issue_link_association!, only: :destroy
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
|
||||
private
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ class Projects::IssuesController < Projects::ApplicationController
|
|||
|
||||
alias_method :designs, :show
|
||||
|
||||
feature_category :issue_tracking, [
|
||||
feature_category :team_planning, [
|
||||
:index, :calendar, :show, :new, :create, :edit, :update,
|
||||
:destroy, :move, :reorder, :designs, :toggle_subscription,
|
||||
:discussions, :bulk_update, :realtime_changes,
|
||||
|
|
|
@ -14,7 +14,7 @@ class Projects::LabelsController < Projects::ApplicationController
|
|||
|
||||
respond_to :js, :html
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
|
||||
def index
|
||||
respond_to do |format|
|
||||
|
|
|
@ -18,7 +18,7 @@ class Projects::MilestonesController < Projects::ApplicationController
|
|||
|
||||
respond_to :html
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
|
||||
def index
|
||||
@sort = params[:sort] || 'due_date_asc'
|
||||
|
|
|
@ -11,7 +11,7 @@ class Projects::NotesController < Projects::ApplicationController
|
|||
before_action :authorize_create_note!, only: [:create]
|
||||
before_action :authorize_resolve_note!, only: [:resolve, :unresolve]
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
|
||||
def delete_attachment
|
||||
note.remove_attachment!
|
||||
|
|
|
@ -6,7 +6,7 @@ class Projects::TodosController < Projects::ApplicationController
|
|||
|
||||
before_action :authenticate_user!, only: [:create]
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
|
||||
private
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ class ProjectsController < Projects::ApplicationController
|
|||
]
|
||||
|
||||
feature_category :source_code_management, [:remove_fork, :housekeeping, :refs]
|
||||
feature_category :issue_tracking, [:preview_markdown, :new_issuable_address]
|
||||
feature_category :team_planning, [:preview_markdown, :new_issuable_address]
|
||||
feature_category :importers, [:export, :remove_export, :generate_new_export, :download_export]
|
||||
feature_category :code_review, [:unfoldered_environment_names]
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ChatName < ApplicationRecord
|
||||
include LooseForeignKey
|
||||
|
||||
LAST_USED_AT_INTERVAL = 1.hour
|
||||
|
||||
belongs_to :integration, foreign_key: :service_id
|
||||
|
@ -14,6 +16,8 @@ class ChatName < ApplicationRecord
|
|||
validates :user_id, uniqueness: { scope: [:service_id] }
|
||||
validates :chat_id, uniqueness: { scope: [:service_id, :team_id] }
|
||||
|
||||
loose_foreign_key :ci_pipeline_chat_data, :chat_name_id, on_delete: :async_delete
|
||||
|
||||
# Updates the "last_used_timestamp" but only if it wasn't already updated
|
||||
# recently.
|
||||
#
|
||||
|
|
|
@ -12,6 +12,7 @@ module Ci
|
|||
include Gitlab::Utils::StrongMemoize
|
||||
include TaggableQueries
|
||||
include Presentable
|
||||
include LooseForeignKey
|
||||
|
||||
add_authentication_token_field :token, encrypted: :optional
|
||||
|
||||
|
@ -167,6 +168,8 @@ module Ci
|
|||
|
||||
validates :config, json_schema: { filename: 'ci_runner_config' }
|
||||
|
||||
loose_foreign_key :clusters_applications_runners, :runner_id, on_delete: :async_nullify
|
||||
|
||||
# Searches for runners matching the given query.
|
||||
#
|
||||
# This method uses ILIKE on PostgreSQL for the description field and performs a full match on tokens.
|
||||
|
|
|
@ -93,9 +93,11 @@ class Namespace < ApplicationRecord
|
|||
validates :max_artifacts_size, numericality: { only_integer: true, greater_than: 0, allow_nil: true }
|
||||
|
||||
validate :validate_parent_type, if: -> { Feature.enabled?(:validate_namespace_parent_type, default_enabled: :yaml) }
|
||||
validate :nesting_level_allowed
|
||||
validate :changing_shared_runners_enabled_is_allowed
|
||||
validate :changing_allow_descendants_override_disabled_shared_runners_is_allowed
|
||||
|
||||
# ProjectNamespaces excluded as they are not meant to appear in the group hierarchy at the moment.
|
||||
validate :nesting_level_allowed, unless: -> { project_namespace? }
|
||||
validate :changing_shared_runners_enabled_is_allowed, unless: -> { project_namespace? }
|
||||
validate :changing_allow_descendants_override_disabled_shared_runners_is_allowed, unless: -> { project_namespace? }
|
||||
|
||||
delegate :name, to: :owner, allow_nil: true, prefix: true
|
||||
delegate :avatar_url, to: :owner, allow_nil: true
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
- if commit
|
||||
= render 'projects/branches/commit', commit: commit, project: @project
|
||||
- else
|
||||
= s_('Branches|Cant find HEAD commit for this branch')
|
||||
= s_('Branches|Can’t find HEAD commit for this branch')
|
||||
|
||||
- if branch.name != @repository.root_ref
|
||||
.js-branch-divergence-graph
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
%li
|
||||
= html_escape(_('The repository must be accessible over %{code_open}http://%{code_close},
|
||||
%{code_open}https://%{code_close}, %{code_open}ssh://%{code_close} or %{code_open}git://%{code_close}.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
|
||||
%li= html_escape(_('When using the %{code_open}http://%{code_close} or %{code_open}https://%{code_close} protocols, provide the exact URL to the repository. HTTP redirects will not be followed.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
|
||||
%li= html_escape(_('When using the %{code_open}http://%{code_close} or %{code_open}https://%{code_close} protocols, please provide the exact URL to the repository. HTTP redirects will not be followed.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
|
||||
%li= html_escape(_('Include the username in the URL if required: %{code_open}https://username@gitlab.company.com/group/project.git%{code_close}.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
|
||||
%li
|
||||
- minutes = Gitlab.config.gitlab_shell.git_timeout / 60
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
.card-header
|
||||
= s_('GitLabPages|Domains')
|
||||
.nothing-here-block
|
||||
= s_("GitLabPages|Support for domains and certificates is disabled. Ask your system's administrator to enable it.")
|
||||
= s_("GitLabPages|Support for domains and certificates is disabled. Ask your system's administrator to enable it.")
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
- link = link_to _('MaxBuilds'), 'https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnersmachine-section', target: '_blank'
|
||||
-# "MaxBuilds" is a runner configuration keyword so it must not be translated.
|
||||
- link = link_to 'MaxBuilds', 'https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnersmachine-section', target: '_blank'
|
||||
|
||||
%h4
|
||||
= _('Shared runners')
|
||||
|
|
|
@ -347,7 +347,7 @@
|
|||
:tags: []
|
||||
- :name: cronjob:issue_due_scheduler
|
||||
:worker_name: IssueDueSchedulerWorker
|
||||
:feature_category: :issue_tracking
|
||||
:feature_category: :team_planning
|
||||
:has_external_dependencies:
|
||||
:urgency: :low
|
||||
:resource_boundary: :unknown
|
||||
|
@ -1260,7 +1260,7 @@
|
|||
:tags: []
|
||||
- :name: mail_scheduler:mail_scheduler_issue_due
|
||||
:worker_name: MailScheduler::IssueDueWorker
|
||||
:feature_category: :issue_tracking
|
||||
:feature_category: :team_planning
|
||||
:has_external_dependencies:
|
||||
:urgency: :low
|
||||
:resource_boundary: :unknown
|
||||
|
@ -1269,7 +1269,7 @@
|
|||
:tags: []
|
||||
- :name: mail_scheduler:mail_scheduler_notification_service
|
||||
:worker_name: MailScheduler::NotificationServiceWorker
|
||||
:feature_category: :issue_tracking
|
||||
:feature_category: :team_planning
|
||||
:has_external_dependencies:
|
||||
:urgency: :low
|
||||
:resource_boundary: :cpu
|
||||
|
@ -1746,7 +1746,7 @@
|
|||
:tags: []
|
||||
- :name: todos_destroyer:todos_destroyer_confidential_issue
|
||||
:worker_name: TodosDestroyer::ConfidentialIssueWorker
|
||||
:feature_category: :issue_tracking
|
||||
:feature_category: :team_planning
|
||||
:has_external_dependencies:
|
||||
:urgency: :low
|
||||
:resource_boundary: :unknown
|
||||
|
@ -1755,7 +1755,7 @@
|
|||
:tags: []
|
||||
- :name: todos_destroyer:todos_destroyer_destroyed_designs
|
||||
:worker_name: TodosDestroyer::DestroyedDesignsWorker
|
||||
:feature_category: :issue_tracking
|
||||
:feature_category: :team_planning
|
||||
:has_external_dependencies:
|
||||
:urgency: :low
|
||||
:resource_boundary: :unknown
|
||||
|
@ -1764,7 +1764,7 @@
|
|||
:tags: []
|
||||
- :name: todos_destroyer:todos_destroyer_destroyed_issuable
|
||||
:worker_name: TodosDestroyer::DestroyedIssuableWorker
|
||||
:feature_category: :issue_tracking
|
||||
:feature_category: :team_planning
|
||||
:has_external_dependencies:
|
||||
:urgency: :low
|
||||
:resource_boundary: :unknown
|
||||
|
@ -1773,7 +1773,7 @@
|
|||
:tags: []
|
||||
- :name: todos_destroyer:todos_destroyer_entity_leave
|
||||
:worker_name: TodosDestroyer::EntityLeaveWorker
|
||||
:feature_category: :issue_tracking
|
||||
:feature_category: :team_planning
|
||||
:has_external_dependencies:
|
||||
:urgency: :low
|
||||
:resource_boundary: :unknown
|
||||
|
@ -1782,7 +1782,7 @@
|
|||
:tags: []
|
||||
- :name: todos_destroyer:todos_destroyer_group_private
|
||||
:worker_name: TodosDestroyer::GroupPrivateWorker
|
||||
:feature_category: :issue_tracking
|
||||
:feature_category: :team_planning
|
||||
:has_external_dependencies:
|
||||
:urgency: :low
|
||||
:resource_boundary: :unknown
|
||||
|
@ -1791,7 +1791,7 @@
|
|||
:tags: []
|
||||
- :name: todos_destroyer:todos_destroyer_private_features
|
||||
:worker_name: TodosDestroyer::PrivateFeaturesWorker
|
||||
:feature_category: :issue_tracking
|
||||
:feature_category: :team_planning
|
||||
:has_external_dependencies:
|
||||
:urgency: :low
|
||||
:resource_boundary: :unknown
|
||||
|
@ -1800,7 +1800,7 @@
|
|||
:tags: []
|
||||
- :name: todos_destroyer:todos_destroyer_project_private
|
||||
:worker_name: TodosDestroyer::ProjectPrivateWorker
|
||||
:feature_category: :issue_tracking
|
||||
:feature_category: :team_planning
|
||||
:has_external_dependencies:
|
||||
:urgency: :low
|
||||
:resource_boundary: :unknown
|
||||
|
@ -2061,7 +2061,7 @@
|
|||
:tags: []
|
||||
- :name: email_receiver
|
||||
:worker_name: EmailReceiverWorker
|
||||
:feature_category: :issue_tracking
|
||||
:feature_category: :team_planning
|
||||
:has_external_dependencies:
|
||||
:urgency: :high
|
||||
:resource_boundary: :unknown
|
||||
|
@ -2125,7 +2125,7 @@
|
|||
:tags: []
|
||||
- :name: export_csv
|
||||
:worker_name: ExportCsvWorker
|
||||
:feature_category: :issue_tracking
|
||||
:feature_category: :team_planning
|
||||
:has_external_dependencies:
|
||||
:urgency: :low
|
||||
:resource_boundary: :cpu
|
||||
|
@ -2215,7 +2215,7 @@
|
|||
:tags: []
|
||||
- :name: import_issues_csv
|
||||
:worker_name: ImportIssuesCsvWorker
|
||||
:feature_category: :issue_tracking
|
||||
:feature_category: :team_planning
|
||||
:has_external_dependencies:
|
||||
:urgency: :low
|
||||
:resource_boundary: :cpu
|
||||
|
@ -2242,7 +2242,7 @@
|
|||
:tags: []
|
||||
- :name: issuable_export_csv
|
||||
:worker_name: IssuableExportCsvWorker
|
||||
:feature_category: :issue_tracking
|
||||
:feature_category: :team_planning
|
||||
:has_external_dependencies:
|
||||
:urgency: :low
|
||||
:resource_boundary: :cpu
|
||||
|
@ -2251,7 +2251,7 @@
|
|||
:tags: []
|
||||
- :name: issuable_label_links_destroy
|
||||
:worker_name: Issuable::LabelLinksDestroyWorker
|
||||
:feature_category: :issue_tracking
|
||||
:feature_category: :team_planning
|
||||
:has_external_dependencies:
|
||||
:urgency: :low
|
||||
:resource_boundary: :unknown
|
||||
|
@ -2260,7 +2260,7 @@
|
|||
:tags: []
|
||||
- :name: issuables_clear_groups_issue_counter
|
||||
:worker_name: Issuables::ClearGroupsIssueCounterWorker
|
||||
:feature_category: :issue_tracking
|
||||
:feature_category: :team_planning
|
||||
:has_external_dependencies:
|
||||
:urgency: :low
|
||||
:resource_boundary: :unknown
|
||||
|
@ -2269,7 +2269,7 @@
|
|||
:tags: []
|
||||
- :name: issue_placement
|
||||
:worker_name: IssuePlacementWorker
|
||||
:feature_category: :issue_tracking
|
||||
:feature_category: :team_planning
|
||||
:has_external_dependencies:
|
||||
:urgency: :high
|
||||
:resource_boundary: :cpu
|
||||
|
@ -2278,7 +2278,7 @@
|
|||
:tags: []
|
||||
- :name: issue_rebalancing
|
||||
:worker_name: IssueRebalancingWorker
|
||||
:feature_category: :issue_tracking
|
||||
:feature_category: :team_planning
|
||||
:has_external_dependencies:
|
||||
:urgency: :low
|
||||
:resource_boundary: :unknown
|
||||
|
@ -2287,7 +2287,7 @@
|
|||
:tags: []
|
||||
- :name: issues_placement
|
||||
:worker_name: Issues::PlacementWorker
|
||||
:feature_category: :issue_tracking
|
||||
:feature_category: :team_planning
|
||||
:has_external_dependencies:
|
||||
:urgency: :high
|
||||
:resource_boundary: :cpu
|
||||
|
@ -2296,7 +2296,7 @@
|
|||
:tags: []
|
||||
- :name: issues_rebalancing
|
||||
:worker_name: Issues::RebalancingWorker
|
||||
:feature_category: :issue_tracking
|
||||
:feature_category: :team_planning
|
||||
:has_external_dependencies:
|
||||
:urgency: :low
|
||||
:resource_boundary: :unknown
|
||||
|
@ -2440,7 +2440,7 @@
|
|||
:tags: []
|
||||
- :name: new_issue
|
||||
:worker_name: NewIssueWorker
|
||||
:feature_category: :issue_tracking
|
||||
:feature_category: :team_planning
|
||||
:has_external_dependencies:
|
||||
:urgency: :high
|
||||
:resource_boundary: :cpu
|
||||
|
@ -2458,7 +2458,7 @@
|
|||
:tags: []
|
||||
- :name: new_note
|
||||
:worker_name: NewNoteWorker
|
||||
:feature_category: :issue_tracking
|
||||
:feature_category: :team_planning
|
||||
:has_external_dependencies:
|
||||
:urgency: :high
|
||||
:resource_boundary: :cpu
|
||||
|
|
|
@ -8,6 +8,6 @@ module TodosDestroyerQueue
|
|||
|
||||
included do
|
||||
queue_namespace :todos_destroyer
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,7 +7,7 @@ class EmailReceiverWorker # rubocop:disable Scalability/IdempotentWorker
|
|||
|
||||
sidekiq_options retry: 3
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
urgency :high
|
||||
weight 2
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ class ExportCsvWorker # rubocop:disable Scalability/IdempotentWorker
|
|||
|
||||
sidekiq_options retry: 3
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
worker_resource_boundary :cpu
|
||||
loggable_arguments 2
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ class ImportIssuesCsvWorker # rubocop:disable Scalability/IdempotentWorker
|
|||
sidekiq_options retry: 3
|
||||
|
||||
idempotent!
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
worker_resource_boundary :cpu
|
||||
weight 2
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ module Issuable
|
|||
data_consistency :always
|
||||
|
||||
idempotent!
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
|
||||
def perform(target_id, target_type)
|
||||
::Issuable::DestroyLabelLinksService.new(target_id, target_type).execute
|
||||
|
|
|
@ -7,7 +7,7 @@ class IssuableExportCsvWorker # rubocop:disable Scalability/IdempotentWorker
|
|||
|
||||
sidekiq_options retry: 3
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
worker_resource_boundary :cpu
|
||||
loggable_arguments 2
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ module Issuables
|
|||
|
||||
idempotent!
|
||||
urgency :low
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
|
||||
def perform(group_ids = [])
|
||||
return if group_ids.empty?
|
||||
|
|
|
@ -7,7 +7,7 @@ class IssueDueSchedulerWorker # rubocop:disable Scalability/IdempotentWorker
|
|||
|
||||
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
|
||||
# rubocop: disable CodeReuse/ActiveRecord
|
||||
def perform
|
||||
|
|
|
@ -12,7 +12,7 @@ class IssuePlacementWorker
|
|||
|
||||
idempotent!
|
||||
deduplicate :until_executed, including_scheduled: true
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
urgency :high
|
||||
worker_resource_boundary :cpu
|
||||
weight 2
|
||||
|
|
|
@ -12,7 +12,7 @@ class IssueRebalancingWorker
|
|||
|
||||
idempotent!
|
||||
urgency :low
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
deduplicate :until_executed, including_scheduled: true
|
||||
|
||||
def perform(ignore = nil, project_id = nil, root_namespace_id = nil)
|
||||
|
|
|
@ -10,7 +10,7 @@ module Issues
|
|||
|
||||
idempotent!
|
||||
deduplicate :until_executed, including_scheduled: true
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
urgency :high
|
||||
worker_resource_boundary :cpu
|
||||
weight 2
|
||||
|
|
|
@ -10,7 +10,7 @@ module Issues
|
|||
|
||||
idempotent!
|
||||
urgency :low
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
deduplicate :until_executed, including_scheduled: true
|
||||
|
||||
def perform(ignore = nil, project_id = nil, root_namespace_id = nil)
|
||||
|
|
|
@ -9,7 +9,7 @@ module MailScheduler
|
|||
sidekiq_options retry: 3
|
||||
include MailSchedulerQueue
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
|
||||
# rubocop: disable CodeReuse/ActiveRecord
|
||||
def perform(project_id)
|
||||
|
|
|
@ -11,7 +11,7 @@ module MailScheduler
|
|||
sidekiq_options retry: 3
|
||||
include MailSchedulerQueue
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
worker_resource_boundary :cpu
|
||||
loggable_arguments 0
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ class NewIssueWorker # rubocop:disable Scalability/IdempotentWorker
|
|||
sidekiq_options retry: 3
|
||||
include NewIssuable
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
urgency :high
|
||||
worker_resource_boundary :cpu
|
||||
weight 2
|
||||
|
|
|
@ -7,7 +7,7 @@ class NewNoteWorker # rubocop:disable Scalability/IdempotentWorker
|
|||
|
||||
sidekiq_options retry: 3
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
urgency :high
|
||||
worker_resource_boundary :cpu
|
||||
weight 2
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
- authentication_and_authorization
|
||||
- auto_devops
|
||||
- backup_restore
|
||||
- boards
|
||||
- build_artifacts
|
||||
- chatops
|
||||
- cloud_native_installation
|
||||
|
@ -44,7 +43,6 @@
|
|||
- dynamic_application_security_testing
|
||||
- editor_extension
|
||||
- environment_management
|
||||
- epics
|
||||
- error_tracking
|
||||
- experimentation_activation
|
||||
- experimentation_adoption
|
||||
|
@ -69,7 +67,6 @@
|
|||
- intel_code_security
|
||||
- interactive_application_security_testing
|
||||
- internationalization
|
||||
- issue_tracking
|
||||
- jenkins_importer
|
||||
- kubernetes_management
|
||||
- license
|
||||
|
@ -91,16 +88,17 @@
|
|||
- pipeline_abuse_prevention
|
||||
- pipeline_authoring
|
||||
- planning_analytics
|
||||
- portfolio_management
|
||||
- privacy_control_center
|
||||
- product_analytics
|
||||
- projects
|
||||
- purchase
|
||||
- quality_management
|
||||
- redis
|
||||
- release_evidence
|
||||
- release_orchestration
|
||||
- requirements_management
|
||||
- review_apps
|
||||
- roadmaps
|
||||
- runbooks
|
||||
- runner
|
||||
- scalability
|
||||
|
@ -118,7 +116,7 @@
|
|||
- static_site_editor
|
||||
- subgroups
|
||||
- synthetic_monitoring
|
||||
- time_tracking
|
||||
- team_planning
|
||||
- tracing
|
||||
- usability_testing
|
||||
- usage_ping
|
||||
|
|
|
@ -10,6 +10,29 @@ if Gitlab.ee?
|
|||
IncidentManagement::PendingEscalations::Alert,
|
||||
IncidentManagement::PendingEscalations::Issue
|
||||
])
|
||||
else
|
||||
Gitlab::Database::Partitioning.register_tables([
|
||||
{
|
||||
table_name: 'incident_management_pending_alert_escalations',
|
||||
partitioned_column: :process_at, strategy: :monthly
|
||||
},
|
||||
{
|
||||
table_name: 'incident_management_pending_issue_escalations',
|
||||
partitioned_column: :process_at, strategy: :monthly
|
||||
}
|
||||
])
|
||||
end
|
||||
|
||||
# The following tables are already defined as models
|
||||
unless Gitlab.jh?
|
||||
Gitlab::Database::Partitioning.register_tables([
|
||||
# This should be synchronized with the following model:
|
||||
# https://gitlab.com/gitlab-jh/gitlab/-/blob/main-jh/jh/app/models/phone/verification_code.rb
|
||||
{
|
||||
table_name: 'verification_codes',
|
||||
partitioned_column: :created_at, strategy: :monthly
|
||||
}
|
||||
])
|
||||
end
|
||||
|
||||
begin
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class RemoveIndexReleasesOnAuthorId < Gitlab::Database::Migration[1.0]
|
||||
INDEX_NAME = 'index_releases_on_author_id'
|
||||
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
remove_concurrent_index_by_name :releases, INDEX_NAME
|
||||
end
|
||||
|
||||
def down
|
||||
add_concurrent_index :releases, [:author_id], name: INDEX_NAME
|
||||
end
|
||||
end
|
|
@ -0,0 +1,22 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ScheduleRemoveDuplicateVulnerabilitiesFindings3 < Gitlab::Database::Migration[1.0]
|
||||
disable_ddl_transaction!
|
||||
|
||||
MIGRATION = 'RemoveDuplicateVulnerabilitiesFindings'
|
||||
DELAY_INTERVAL = 2.minutes.to_i
|
||||
BATCH_SIZE = 5_000
|
||||
|
||||
def up
|
||||
queue_background_migration_jobs_by_range_at_intervals(
|
||||
define_batchable_model('vulnerability_occurrences'),
|
||||
MIGRATION,
|
||||
DELAY_INTERVAL,
|
||||
batch_size: BATCH_SIZE
|
||||
)
|
||||
end
|
||||
|
||||
def down
|
||||
# no-op
|
||||
end
|
||||
end
|
|
@ -0,0 +1,15 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class TrackDeletionsInCiRunners < Gitlab::Database::Migration[1.0]
|
||||
include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers
|
||||
|
||||
enable_lock_retries!
|
||||
|
||||
def up
|
||||
track_record_deletions(:ci_runners)
|
||||
end
|
||||
|
||||
def down
|
||||
untrack_record_deletions(:ci_runners)
|
||||
end
|
||||
end
|
|
@ -0,0 +1,15 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class TrackDeletionsInChatNames < Gitlab::Database::Migration[1.0]
|
||||
include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers
|
||||
|
||||
enable_lock_retries!
|
||||
|
||||
def up
|
||||
track_record_deletions(:chat_names)
|
||||
end
|
||||
|
||||
def down
|
||||
untrack_record_deletions(:chat_names)
|
||||
end
|
||||
end
|
|
@ -0,0 +1 @@
|
|||
fd7b6eb9439c00334f613e3e4977e44054930c1343e5df32bbe82c64acd6ca7b
|
|
@ -0,0 +1 @@
|
|||
6b1377dd7e9b78a35c2f5635d2d11f5fe254aa772576510b41fcf1e03ad56c87
|
|
@ -0,0 +1 @@
|
|||
f1b218eaddb9bcc5e4d854a6b43fc5e122b38dc989225327a1c4a899f41e5ac6
|
|
@ -0,0 +1 @@
|
|||
3d7b72684102836d7a7efcab7590b3d14bc63eb3e1bfbc7a95fb5eb5c6a906af
|
|
@ -135,6 +135,19 @@ CREATE TABLE incident_management_pending_issue_escalations (
|
|||
)
|
||||
PARTITION BY RANGE (process_at);
|
||||
|
||||
CREATE TABLE verification_codes (
|
||||
created_at timestamp with time zone DEFAULT now() NOT NULL,
|
||||
visitor_id_code text NOT NULL,
|
||||
code text NOT NULL,
|
||||
phone text NOT NULL,
|
||||
CONSTRAINT check_9b84e6aaff CHECK ((char_length(code) <= 8)),
|
||||
CONSTRAINT check_ccc542256b CHECK ((char_length(visitor_id_code) <= 64)),
|
||||
CONSTRAINT check_f5684c195b CHECK ((char_length(phone) <= 32))
|
||||
)
|
||||
PARTITION BY RANGE (created_at);
|
||||
|
||||
COMMENT ON TABLE verification_codes IS 'JiHu-specific table';
|
||||
|
||||
CREATE TABLE web_hook_logs (
|
||||
id bigint NOT NULL,
|
||||
web_hook_id integer NOT NULL,
|
||||
|
@ -20185,19 +20198,6 @@ CREATE SEQUENCE users_statistics_id_seq
|
|||
|
||||
ALTER SEQUENCE users_statistics_id_seq OWNED BY users_statistics.id;
|
||||
|
||||
CREATE TABLE verification_codes (
|
||||
created_at timestamp with time zone DEFAULT now() NOT NULL,
|
||||
visitor_id_code text NOT NULL,
|
||||
code text NOT NULL,
|
||||
phone text NOT NULL,
|
||||
CONSTRAINT check_9b84e6aaff CHECK ((char_length(code) <= 8)),
|
||||
CONSTRAINT check_ccc542256b CHECK ((char_length(visitor_id_code) <= 64)),
|
||||
CONSTRAINT check_f5684c195b CHECK ((char_length(phone) <= 32))
|
||||
)
|
||||
PARTITION BY RANGE (created_at);
|
||||
|
||||
COMMENT ON TABLE verification_codes IS 'JiHu-specific table';
|
||||
|
||||
CREATE TABLE vulnerabilities (
|
||||
id bigint NOT NULL,
|
||||
milestone_id bigint,
|
||||
|
@ -26446,8 +26446,6 @@ CREATE UNIQUE INDEX index_release_links_on_release_id_and_name ON release_links
|
|||
|
||||
CREATE UNIQUE INDEX index_release_links_on_release_id_and_url ON release_links USING btree (release_id, url);
|
||||
|
||||
CREATE INDEX index_releases_on_author_id ON releases USING btree (author_id);
|
||||
|
||||
CREATE INDEX index_releases_on_author_id_id_created_at ON releases USING btree (author_id, id, created_at);
|
||||
|
||||
CREATE INDEX index_releases_on_project_id_and_tag ON releases USING btree (project_id, tag);
|
||||
|
@ -27550,6 +27548,10 @@ ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_p
|
|||
|
||||
ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_partitions_static.product_analytics_events_experimental_63_pkey;
|
||||
|
||||
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_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_91dc388a5fe6 BEFORE INSERT OR UPDATE ON dep_ci_build_trace_sections FOR EACH ROW EXECUTE FUNCTION trigger_91dc388a5fe6();
|
||||
|
||||
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();
|
||||
|
|
|
@ -965,6 +965,19 @@ license.save
|
|||
License.current # check to make sure it applied
|
||||
```
|
||||
|
||||
### Remove licenses
|
||||
|
||||
To clean up the [License History table](../../user/admin_area/license.md#license-history):
|
||||
|
||||
```ruby
|
||||
TYPE = :trial?
|
||||
# or :expired?
|
||||
|
||||
License.select(&TYPE).each(&:destroy!)
|
||||
|
||||
# or even License.all.each(&:destroy!)
|
||||
```
|
||||
|
||||
## Registry
|
||||
|
||||
### Registry Disk Space Usage by Project
|
||||
|
|
|
@ -35,7 +35,7 @@ DELETE /admin/sidekiq/queues/:queue_name
|
|||
| `root_namespace` | string | no | The root namespace of the project |
|
||||
| `subscription_plan` | string | no | The subscription plan of the root namespace (GitLab.com only) |
|
||||
| `caller_id` | string | no | The endpoint or background job that schedule the job (for example: `ProjectsController#create`, `/api/:version/projects/:id`, `PostReceive`) |
|
||||
| `feature_category` | string | no | The feature category of the background job (for example: `issue_tracking` or `code_review`) |
|
||||
| `feature_category` | string | no | The feature category of the background job (for example: `team_planning` or `code_review`) |
|
||||
| `worker_class` | string | no | The class of the background job worker (for example: `PostReceive` or `MergeWorker`) |
|
||||
|
||||
At least one attribute, other than `queue_name`, is required.
|
||||
|
|
|
@ -1554,7 +1554,7 @@ Input type: `DastProfileCreateInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationdastprofilecreatebranchname"></a>`branchName` | [`String`](#string) | Associated branch. |
|
||||
| <a id="mutationdastprofilecreateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationdastprofilecreatedastprofileschedule"></a>`dastProfileSchedule` | [`DastProfileScheduleInput`](#dastprofilescheduleinput) | Represents a DAST Profile Schedule. Results in an error if `dast_on_demand_scans_scheduler` feature flag is disabled. |
|
||||
| <a id="mutationdastprofilecreatedastprofileschedule"></a>`dastProfileSchedule` | [`DastProfileScheduleInput`](#dastprofilescheduleinput) | Represents a DAST Profile Schedule. |
|
||||
| <a id="mutationdastprofilecreatedastscannerprofileid"></a>`dastScannerProfileId` | [`DastScannerProfileID!`](#dastscannerprofileid) | ID of the scanner profile to be associated. |
|
||||
| <a id="mutationdastprofilecreatedastsiteprofileid"></a>`dastSiteProfileId` | [`DastSiteProfileID!`](#dastsiteprofileid) | ID of the site profile to be associated. |
|
||||
| <a id="mutationdastprofilecreatedescription"></a>`description` | [`String`](#string) | Description of the profile. Defaults to an empty string. |
|
||||
|
@ -1619,7 +1619,7 @@ Input type: `DastProfileUpdateInput`
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="mutationdastprofileupdatebranchname"></a>`branchName` | [`String`](#string) | Associated branch. |
|
||||
| <a id="mutationdastprofileupdateclientmutationid"></a>`clientMutationId` | [`String`](#string) | A unique identifier for the client performing the mutation. |
|
||||
| <a id="mutationdastprofileupdatedastprofileschedule"></a>`dastProfileSchedule` | [`DastProfileScheduleInput`](#dastprofilescheduleinput) | Represents a DAST profile schedule. Results in an error if `dast_on_demand_scans_scheduler` feature flag is disabled. |
|
||||
| <a id="mutationdastprofileupdatedastprofileschedule"></a>`dastProfileSchedule` | [`DastProfileScheduleInput`](#dastprofilescheduleinput) | Represents a DAST profile schedule. |
|
||||
| <a id="mutationdastprofileupdatedastscannerprofileid"></a>`dastScannerProfileId` | [`DastScannerProfileID`](#dastscannerprofileid) | ID of the scanner profile to be associated. |
|
||||
| <a id="mutationdastprofileupdatedastsiteprofileid"></a>`dastSiteProfileId` | [`DastSiteProfileID`](#dastsiteprofileid) | ID of the site profile to be associated. |
|
||||
| <a id="mutationdastprofileupdatedescription"></a>`description` | [`String`](#string) | Description of the profile. Defaults to an empty string. |
|
||||
|
@ -8951,7 +8951,7 @@ Represents a DAST Profile.
|
|||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="dastprofilebranch"></a>`branch` | [`DastProfileBranch`](#dastprofilebranch) | Associated branch. |
|
||||
| <a id="dastprofiledastprofileschedule"></a>`dastProfileSchedule` | [`DastProfileSchedule`](#dastprofileschedule) | Associated profile schedule. Will always return `null` if `dast_on_demand_scans_scheduler` feature flag is disabled. |
|
||||
| <a id="dastprofiledastprofileschedule"></a>`dastProfileSchedule` | [`DastProfileSchedule`](#dastprofileschedule) | Associated profile schedule. |
|
||||
| <a id="dastprofiledastscannerprofile"></a>`dastScannerProfile` | [`DastScannerProfile`](#dastscannerprofile) | Associated scanner profile. |
|
||||
| <a id="dastprofiledastsiteprofile"></a>`dastSiteProfile` | [`DastSiteProfile`](#dastsiteprofile) | Associated site profile. |
|
||||
| <a id="dastprofiledescription"></a>`description` | [`String`](#string) | Description of the scan. |
|
||||
|
|
|
@ -26,6 +26,8 @@ For authentication, the Releases API accepts either:
|
|||
|
||||
## List Releases
|
||||
|
||||
> [Changed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/72448) to allow for `JOB-TOKEN` in GitLab 14.5.
|
||||
|
||||
Paginated list of Releases, sorted by `released_at`.
|
||||
|
||||
```plaintext
|
||||
|
@ -231,6 +233,8 @@ Example response:
|
|||
|
||||
## Get a Release by a tag name
|
||||
|
||||
> [Changed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/72448) to allow for `JOB-TOKEN` in GitLab 14.5.
|
||||
|
||||
Get a Release for the given tag.
|
||||
|
||||
```plaintext
|
||||
|
@ -508,7 +512,8 @@ adding milestones for ancestor groups raises an error.
|
|||
|
||||
## Collect release evidence **(PREMIUM SELF)**
|
||||
|
||||
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/199065) in GitLab 12.10.
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/199065) in GitLab 12.10.
|
||||
> - [Changed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/72448) to allow for `JOB-TOKEN` in GitLab 14.5.
|
||||
|
||||
Create Evidence for an existing Release.
|
||||
|
||||
|
@ -535,6 +540,8 @@ Example response:
|
|||
|
||||
## Update a release
|
||||
|
||||
> [Changed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/72448) to allow for `JOB-TOKEN` in GitLab 14.5.
|
||||
|
||||
Update a release. Developer level access to the project is required to update a release.
|
||||
|
||||
```plaintext
|
||||
|
@ -642,6 +649,8 @@ Example response:
|
|||
|
||||
## Delete a Release
|
||||
|
||||
> [Changed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/72448) to allow for `JOB-TOKEN` in GitLab 14.5.
|
||||
|
||||
Delete a release. Deleting a release doesn't delete the associated tag. Maintainer level access to the project is required to delete a release.
|
||||
|
||||
```plaintext
|
||||
|
|
|
@ -20,7 +20,7 @@ You can use a GitLab CI/CD job token to authenticate with specific API endpoints
|
|||
- [Get job artifacts](../../api/job_artifacts.md#get-job-artifacts).
|
||||
- [Get job token's job](../../api/jobs.md#get-job-tokens-job).
|
||||
- [Pipeline triggers](../../api/pipeline_triggers.md), using the `token=` parameter.
|
||||
- [Release creation](../../api/releases/index.md#create-a-release).
|
||||
- [Releases](../../api/releases/index.md).
|
||||
- [Terraform plan](../../user/infrastructure/index.md).
|
||||
|
||||
The token has the same permissions to access the API as the user that executes the
|
||||
|
|
|
@ -43,7 +43,7 @@ example:
|
|||
```ruby
|
||||
Gitlab::Metrics::Sli.initialize_sli(:received_email, [
|
||||
{
|
||||
feature_category: :issue_tracking,
|
||||
feature_category: :team_planning,
|
||||
email_type: :create_issue
|
||||
},
|
||||
{
|
||||
|
|
|
@ -153,7 +153,7 @@ information in the logs to determine this:
|
|||
the service the endpoint is handled by. The overall duration should
|
||||
be lower than the target you intend to set.
|
||||
|
||||
1. If the overall duration is below the intended targed. Please also
|
||||
1. Assess if the overall duration is below the intended target. Please also
|
||||
check the peaks over time in [this
|
||||
graph](https://log.gprd.gitlab.net/goto/9319c4a402461d204d13f3a4924a89fc)
|
||||
in Kibana. Here, the percentile in question should not peak above
|
||||
|
@ -161,7 +161,7 @@ information in the logs to determine this:
|
|||
|
||||
Since decreasing a threshold too much could result in alerts for the
|
||||
apdex degradation, please also involve a Scalability team member in
|
||||
the merge reqeust.
|
||||
the merge request.
|
||||
|
||||
## How to adjust the urgency
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ second argument:
|
|||
|
||||
```ruby
|
||||
class DashboardController < ApplicationController
|
||||
feature_category :issue_tracking, [:issues, :issues_calendar]
|
||||
feature_category :team_planning, [:issues, :issues_calendar]
|
||||
feature_category :code_review, [:merge_requests]
|
||||
end
|
||||
```
|
||||
|
@ -137,7 +137,7 @@ Grape API endpoints can use the `feature_category` class method, like
|
|||
```ruby
|
||||
module API
|
||||
class Issues < ::API::Base
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
end
|
||||
end
|
||||
```
|
||||
|
|
|
@ -165,20 +165,20 @@ QA_DEBUG=true WEBDRIVER_HEADLESS=false GITLAB_ADMIN_USERNAME=rootusername GITLAB
|
|||
|
||||
The following includes more information on the command:
|
||||
|
||||
-`QA_DEBUG` - Set to `true` to verbosely log page object actions.
|
||||
-`WEBDRIVER_HEADLESS` - When running locally, set to `false` to allow browser tests to be visible - watch your tests being run.
|
||||
-`GITLAB_ADMIN_USERNAME` - Administrator username to use when adding a license.
|
||||
-`GITLAB_ADMIN_PASSWORD` - Administrator password to use when adding a license.
|
||||
-`GITLAB_QA_ACCESS_TOKEN` and `GITLAB_QA_ADMIN_ACCESS_TOKEN` - A valid personal access token with the `api` scope. This is used for API access during tests, and is used in the version that staging is currently running. The `ADMIN_ACCESS_TOKEN` is from a user with administrator access. Used for API access as an administrator during tests.
|
||||
-`CLUSTER_API_URL` - Use the address `https://kubernetes.docker.internal:6443` . This address is used to enable the cluster to be network accessible while deploying using Auto DevOps.
|
||||
-`https://[YOUR-PORT].qa-tunnel.gitlab.info/` - The address of your local GDK
|
||||
-`qa/specs/features/browser_ui/8_monitor/all_monitor_core_features_spec.rb` - The path to the monitor core specs
|
||||
-`--tag` - the meta-tags used to filter the specs correctly
|
||||
- `QA_DEBUG` - Set to `true` to verbosely log page object actions.
|
||||
- `WEBDRIVER_HEADLESS` - When running locally, set to `false` to allow browser tests to be visible - watch your tests being run.
|
||||
- `GITLAB_ADMIN_USERNAME` - Administrator username to use when adding a license.
|
||||
- `GITLAB_ADMIN_PASSWORD` - Administrator password to use when adding a license.
|
||||
- `GITLAB_QA_ACCESS_TOKEN` and `GITLAB_QA_ADMIN_ACCESS_TOKEN` - A valid personal access token with the `api` scope. This is used for API access during tests, and is used in the version that staging is currently running. The `ADMIN_ACCESS_TOKEN` is from a user with administrator access. Used for API access as an administrator during tests.
|
||||
- `CLUSTER_API_URL` - Use the address `https://kubernetes.docker.internal:6443` . This address is used to enable the cluster to be network accessible while deploying using Auto DevOps.
|
||||
- `https://[YOUR-PORT].qa-tunnel.gitlab.info/` - The address of your local GDK
|
||||
- `qa/specs/features/browser_ui/8_monitor/all_monitor_core_features_spec.rb` - The path to the monitor core specs
|
||||
- `--tag` - the meta-tags used to filter the specs correctly
|
||||
|
||||
At the moment of this writing, there are two specs which run monitor tests:
|
||||
|
||||
-`qa/specs/features/browser_ui/8_monitor/all_monitor_core_features_spec.rb` - has the specs of features in GitLab Free
|
||||
-`qa/specs/features/ee/browser_ui/8_monitor/all_monitor_features_spec.rb` - has the specs of features for paid GitLab (Enterprise Edition)
|
||||
- `qa/specs/features/browser_ui/8_monitor/all_monitor_core_features_spec.rb` - has the specs of features in GitLab Free
|
||||
- `qa/specs/features/ee/browser_ui/8_monitor/all_monitor_features_spec.rb` - has the specs of features for paid GitLab (Enterprise Edition)
|
||||
|
||||
### How to debug
|
||||
|
||||
|
|
|
@ -1017,12 +1017,7 @@ The on-demand DAST scan runs, and the project's dashboard shows the results.
|
|||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/328749) in GitLab 14.3. [Deployed behind the `dast_on_demand_scans_scheduler` flag](../../../administration/feature_flags.md), disabled by default.
|
||||
> - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/328749) in GitLab 14.4.
|
||||
> - [Enabled on self-managed](https://gitlab.com/gitlab-org/gitlab/-/issues/328749) in GitLab 14.4.
|
||||
|
||||
FLAG:
|
||||
On self-managed GitLab, by default this feature is available. To hide the feature, ask an
|
||||
administrator to [disable the feature flag](../../../administration/feature_flags.md) named
|
||||
`dast_on_demand_scans_scheduler`.
|
||||
On GitLab.com, this feature is available.
|
||||
> - [Feature flag dast_on_demand_scans_scheduler removed](https://gitlab.com/gitlab-org/gitlab/-/issues/328749) in GitLab 14.5.
|
||||
|
||||
To schedule a scan:
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
# Insights **(ULTIMATE)**
|
||||
|
||||
> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/725) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 12.0.
|
||||
> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/725) in GitLab 12.0.
|
||||
|
||||
Configure the Insights that matter for your groups. Explore data such as
|
||||
triage hygiene, issues created or closed for a given period, average time for merge
|
||||
|
|
|
@ -7,7 +7,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
# Value Stream Analytics **(PREMIUM)**
|
||||
|
||||
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/196455) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.9 for groups.
|
||||
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/196455) in GitLab 12.9 for groups.
|
||||
|
||||
Value Stream Analytics measures the time spent to go from an
|
||||
[idea to production](https://about.gitlab.com/blog/2016/08/05/continuous-integration-delivery-and-deployment-with-gitlab/#from-idea-to-production-with-gitlab)
|
||||
|
@ -99,8 +99,8 @@ sole discretion of GitLab Inc.
|
|||
|
||||
## How metrics are measured
|
||||
|
||||
> DORA API-based deployment metrics [moved](https://gitlab.com/gitlab-org/gitlab/-/issues/337256)
|
||||
> to Premium in GitLab 14.3 for group-level Value Stream Analytics.
|
||||
> DORA API-based deployment metrics for group-level Value Stream Analytics were
|
||||
> [moved](https://gitlab.com/gitlab-org/gitlab/-/issues/337256) from GitLab Ultimate to GitLab Premium in 14.3.
|
||||
|
||||
The "Time" metrics near the top of the page are measured as follows:
|
||||
|
||||
|
@ -109,10 +109,9 @@ The "Time" metrics near the top of the page are measured as follows:
|
|||
issue by [crosslinking in the commit message](../../project/issues/crosslinking_issues.md#from-commit-messages).)
|
||||
- **Lead Time for Changes**: median time between when a merge request is merged and deployed to a
|
||||
production environment for all merge requests deployed in the given time period.
|
||||
[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/340150) in GitLab 14.5 (**Ultimate**
|
||||
tier only).
|
||||
[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/340150) in GitLab 14.5.
|
||||
|
||||
- **Lead Time for Changes**: median duration between merge request merge and deployment to a production environment for all MRs deployed in the given time period. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/340150) in GitLab 14.5 (**Ultimate** tier only).
|
||||
- **Lead Time for Changes**: median duration between merge request merge and deployment to a production environment for all MRs deployed in the given time period. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/340150) in GitLab 14.5.
|
||||
|
||||
The "Recent Activity" metrics near the top of the page are measured as follows:
|
||||
|
||||
|
@ -417,8 +416,8 @@ To delete a custom value stream:
|
|||
## Days to completion chart
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/21631) in GitLab 12.6.
|
||||
> - [Chart median line removed](https://gitlab.com/gitlab-org/gitlab/-/issues/235455) in GitLab 13.4.
|
||||
> - [Totals replaced with averages](https://gitlab.com/gitlab-org/gitlab/-/issues/262070) in GitLab 13.12.
|
||||
> - Chart median line [removed](https://gitlab.com/gitlab-org/gitlab/-/issues/235455) in GitLab 13.4.
|
||||
> - Totals [replaced](https://gitlab.com/gitlab-org/gitlab/-/issues/262070) with averages in GitLab 13.12.
|
||||
|
||||
This chart visually depicts the average number of days it takes for cycles to be completed.
|
||||
|
||||
|
@ -430,7 +429,7 @@ The chart data is limited to the last 500 items.
|
|||
|
||||
## Type of work - Tasks by type chart
|
||||
|
||||
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/32421) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.10.
|
||||
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/32421) in GitLab 12.10.
|
||||
|
||||
This chart shows a cumulative count of issues and merge requests per day.
|
||||
|
||||
|
|
|
@ -321,9 +321,10 @@ GitLab instance.
|
|||
|
||||
## Search settings
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/292941) in GitLab 13.8 behind a feature flag, disabled by default.
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/292941) in GitLab 13.8 [with a flag](../../administration/feature_flags.md) named `search_settings_in_page`. Disabled by default.
|
||||
> - [Added to Group, Administrator, and User settings](https://gitlab.com/groups/gitlab-org/-/epics/4842) in GitLab 13.9.
|
||||
> - [Enabled by default](https://gitlab.com/gitlab-org/gitlab/-/issues/294025) in GitLab 13.11.
|
||||
> - [Feature flag `search_settings_in_page` removed](https://gitlab.com/gitlab-org/gitlab/-/issues/294025) in GitLab 13.11.
|
||||
> - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/294025) in GitLab 13.11.
|
||||
|
||||
You can search inside a Project, Group, Administrator, or User's settings by entering
|
||||
a search term in the search box located at the top of the page. The search results
|
||||
|
|
|
@ -7,7 +7,7 @@ module API
|
|||
|
||||
prepend_mod_with('API::BoardsResponses') # rubocop: disable Cop/InjectEnterpriseEditionModule
|
||||
|
||||
feature_category :boards
|
||||
feature_category :team_planning
|
||||
|
||||
before { authenticate! }
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ module API
|
|||
|
||||
prepend_mod_with('API::BoardsResponses') # rubocop: disable Cop/InjectEnterpriseEditionModule
|
||||
|
||||
feature_category :boards
|
||||
feature_category :team_planning
|
||||
|
||||
before { authenticate! }
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ module API
|
|||
|
||||
before { authenticate! }
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
|
||||
params do
|
||||
requires :id, type: String, desc: 'The ID of a group'
|
||||
|
|
|
@ -7,7 +7,7 @@ module API
|
|||
|
||||
before { authenticate! }
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
|
||||
params do
|
||||
requires :id, type: String, desc: 'The ID of a group'
|
||||
|
|
|
@ -5,7 +5,7 @@ module API
|
|||
module AwardEmoji
|
||||
def self.awardables
|
||||
[
|
||||
{ type: 'issue', resource: :projects, find_by: :iid, feature_category: :issue_tracking },
|
||||
{ type: 'issue', resource: :projects, find_by: :iid, feature_category: :team_planning },
|
||||
{ type: 'merge_request', resource: :projects, find_by: :iid, feature_category: :code_review },
|
||||
{ type: 'snippet', resource: :projects, find_by: :id, feature_category: :snippets }
|
||||
]
|
||||
|
|
|
@ -7,7 +7,7 @@ module API
|
|||
# This is a method instead of a constant, allowing EE to more easily
|
||||
# extend it.
|
||||
{
|
||||
Issue => :issue_tracking,
|
||||
Issue => :team_planning,
|
||||
Snippet => :snippets,
|
||||
MergeRequest => :code_review,
|
||||
Commit => :code_review
|
||||
|
|
|
@ -7,7 +7,7 @@ module API
|
|||
|
||||
def self.feature_category_per_noteable_type
|
||||
{
|
||||
Issue => :issue_tracking,
|
||||
Issue => :team_planning,
|
||||
MergeRequest => :code_review,
|
||||
Snippet => :snippets
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ module API
|
|||
# This is a method instead of a constant, allowing EE to more easily
|
||||
# extend it.
|
||||
{
|
||||
Issue => :issue_tracking,
|
||||
Issue => :team_planning,
|
||||
MergeRequest => :code_review
|
||||
}
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@ module API
|
|||
|
||||
before { authenticate! }
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
|
||||
params do
|
||||
requires :id, type: String, desc: 'The ID of a project'
|
||||
|
|
|
@ -7,7 +7,7 @@ module API
|
|||
|
||||
before { authenticate_non_get! }
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
|
||||
helpers do
|
||||
params :negatable_issue_filter_params do
|
||||
|
|
|
@ -7,7 +7,7 @@ module API
|
|||
|
||||
before { authenticate! }
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
|
||||
LABEL_ENDPOINT_REQUIREMENTS = API::NAMESPACE_OR_PROJECT_REQUIREMENTS.merge(
|
||||
name: API::NO_SLASH_URL_PART_REGEX,
|
||||
|
|
|
@ -7,7 +7,7 @@ module API
|
|||
|
||||
before { authenticate! }
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
|
||||
params do
|
||||
requires :id, type: String, desc: 'The ID of a project'
|
||||
|
|
|
@ -32,6 +32,7 @@ module API
|
|||
optional :include_html_description, type: Boolean,
|
||||
desc: 'If `true`, a response includes HTML rendered markdown of the release description.'
|
||||
end
|
||||
route_setting :authentication, job_token_allowed: true
|
||||
get ':id/releases' do
|
||||
releases = ::ReleasesFinder.new(user_project, current_user, declared_params.slice(:order_by, :sort)).execute
|
||||
|
||||
|
@ -59,6 +60,7 @@ module API
|
|||
optional :include_html_description, type: Boolean,
|
||||
desc: 'If `true`, a response includes HTML rendered markdown of the release description.'
|
||||
end
|
||||
route_setting :authentication, job_token_allowed: true
|
||||
get ':id/releases/:tag_name', requirements: RELEASE_ENDPOINT_REQUIREMENTS do
|
||||
authorize_download_code!
|
||||
|
||||
|
@ -117,6 +119,7 @@ module API
|
|||
optional :released_at, type: DateTime, desc: 'The date when the release will be/was ready.'
|
||||
optional :milestones, type: Array[String], coerce_with: ::API::Validations::Types::CommaSeparatedToArray.coerce, desc: 'The titles of the related milestones'
|
||||
end
|
||||
route_setting :authentication, job_token_allowed: true
|
||||
put ':id/releases/:tag_name', requirements: RELEASE_ENDPOINT_REQUIREMENTS do
|
||||
authorize_update_release!
|
||||
|
||||
|
@ -142,6 +145,7 @@ module API
|
|||
params do
|
||||
requires :tag_name, type: String, desc: 'The name of the tag', as: :tag
|
||||
end
|
||||
route_setting :authentication, job_token_allowed: true
|
||||
delete ':id/releases/:tag_name', requirements: RELEASE_ENDPOINT_REQUIREMENTS do
|
||||
authorize_destroy_release!
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ module API
|
|||
before { authenticate! }
|
||||
|
||||
{
|
||||
Issue => :issue_tracking,
|
||||
Issue => :team_planning,
|
||||
MergeRequest => :code_review
|
||||
}.each do |eventable_type, feature_category|
|
||||
parent_type = eventable_type.parent_class.to_s.underscore
|
||||
|
|
|
@ -8,7 +8,7 @@ module API
|
|||
before { authenticate! }
|
||||
|
||||
{
|
||||
Issue => :issue_tracking,
|
||||
Issue => :team_planning,
|
||||
MergeRequest => :code_review
|
||||
}.each do |eventable_class, feature_category|
|
||||
eventable_name = eventable_class.to_s.underscore
|
||||
|
|
|
@ -22,21 +22,21 @@ module API
|
|||
entity: Entities::Issue,
|
||||
source: Project,
|
||||
finder: ->(id) { find_project_issue(id) },
|
||||
feature_category: :issue_tracking
|
||||
feature_category: :team_planning
|
||||
},
|
||||
{
|
||||
type: 'labels',
|
||||
entity: Entities::ProjectLabel,
|
||||
source: Project,
|
||||
finder: ->(id) { find_label(user_project, id) },
|
||||
feature_category: :issue_tracking
|
||||
feature_category: :team_planning
|
||||
},
|
||||
{
|
||||
type: 'labels',
|
||||
entity: Entities::GroupLabel,
|
||||
source: Group,
|
||||
finder: ->(id) { find_label(user_group, id) },
|
||||
feature_category: :issue_tracking
|
||||
feature_category: :team_planning
|
||||
}
|
||||
]
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ module API
|
|||
|
||||
before { authenticate! }
|
||||
|
||||
feature_category :issue_tracking
|
||||
feature_category :team_planning
|
||||
|
||||
ISSUABLE_TYPES = {
|
||||
'merge_requests' => ->(iid) { find_merge_request_with_access(iid) },
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# This module gathers information about table to schema mapping
|
||||
# to understand table affinity
|
||||
module Gitlab
|
||||
module Database
|
||||
module GitlabSchema
|
||||
def self.table_schemas(tables)
|
||||
tables.map { |table| table_schema(table) }.to_set
|
||||
end
|
||||
|
||||
def self.table_schema(name)
|
||||
# When undefined it's best to return a unique name so that we don't incorrectly assume that 2 undefined schemas belong on the same database
|
||||
tables_to_schema[name] || :"undefined_#{name}"
|
||||
end
|
||||
|
||||
def self.tables_to_schema
|
||||
@tables_to_schema ||= YAML.load_file(Rails.root.join('lib/gitlab/database/gitlab_schemas.yml'))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -7,7 +7,7 @@ module Gitlab
|
|||
class Configuration
|
||||
attr_accessor :hosts, :max_replication_difference,
|
||||
:max_replication_lag_time, :replica_check_interval,
|
||||
:service_discovery, :model
|
||||
:service_discovery
|
||||
|
||||
# Creates a configuration object for the given ActiveRecord model.
|
||||
def self.for_model(model)
|
||||
|
@ -41,6 +41,8 @@ module Gitlab
|
|||
end
|
||||
end
|
||||
|
||||
config.reuse_primary_connection!
|
||||
|
||||
config
|
||||
end
|
||||
|
||||
|
@ -59,6 +61,24 @@ module Gitlab
|
|||
disconnect_timeout: 120,
|
||||
use_tcp: false
|
||||
}
|
||||
|
||||
# Temporary model for GITLAB_LOAD_BALANCING_REUSE_PRIMARY_
|
||||
# To be removed with FF
|
||||
@primary_model = nil
|
||||
end
|
||||
|
||||
def db_config_name
|
||||
@model.connection_db_config.name.to_sym
|
||||
end
|
||||
|
||||
# With connection re-use the primary connection can be overwritten
|
||||
# to be used from different model
|
||||
def primary_connection_specification_name
|
||||
(@primary_model || @model).connection_specification_name
|
||||
end
|
||||
|
||||
def replica_db_config
|
||||
@model.connection_db_config
|
||||
end
|
||||
|
||||
def pool_size
|
||||
|
@ -86,6 +106,30 @@ module Gitlab
|
|||
def service_discovery_enabled?
|
||||
service_discovery[:record].present?
|
||||
end
|
||||
|
||||
# TODO: This is temporary code to allow re-use of primary connection
|
||||
# if the two connections are pointing to the same host. This is needed
|
||||
# to properly support transaction visibility.
|
||||
#
|
||||
# This behavior is required to support [Phase 3](https://gitlab.com/groups/gitlab-org/-/epics/6160#progress).
|
||||
# This method is meant to be removed as soon as it is finished.
|
||||
#
|
||||
# The remapping is done as-is:
|
||||
# export GITLAB_LOAD_BALANCING_REUSE_PRIMARY_<name-of-connection>=<new-name-of-connection>
|
||||
#
|
||||
# Ex.:
|
||||
# export GITLAB_LOAD_BALANCING_REUSE_PRIMARY_ci=main
|
||||
#
|
||||
def reuse_primary_connection!
|
||||
new_connection = ENV["GITLAB_LOAD_BALANCING_REUSE_PRIMARY_#{db_config_name}"]
|
||||
return unless new_connection.present?
|
||||
|
||||
@primary_model = Gitlab::Database.database_base_models[new_connection.to_sym]
|
||||
|
||||
unless @primary_model
|
||||
raise "Invalid value for 'GITLAB_LOAD_BALANCING_REUSE_PRIMARY_#{db_config_name}=#{new_connection}'"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,7 +12,7 @@ module Gitlab
|
|||
|
||||
REPLICA_SUFFIX = '_replica'
|
||||
|
||||
attr_reader :name, :host_list, :configuration
|
||||
attr_reader :host_list, :configuration
|
||||
|
||||
# configuration - An instance of `LoadBalancing::Configuration` that
|
||||
# contains the configuration details (such as the hosts)
|
||||
|
@ -26,8 +26,10 @@ module Gitlab
|
|||
else
|
||||
HostList.new(configuration.hosts.map { |addr| Host.new(addr, self) })
|
||||
end
|
||||
end
|
||||
|
||||
@name = @configuration.model.connection_db_config.name.to_sym
|
||||
def name
|
||||
@configuration.db_config_name
|
||||
end
|
||||
|
||||
def primary_only?
|
||||
|
@ -227,7 +229,7 @@ module Gitlab
|
|||
# host - An optional host name to use instead of the default one.
|
||||
# port - An optional port to connect to.
|
||||
def create_replica_connection_pool(pool_size, host = nil, port = nil)
|
||||
db_config = pool.db_config
|
||||
db_config = @configuration.replica_db_config
|
||||
|
||||
env_config = db_config.configuration_hash.dup
|
||||
env_config[:pool] = pool_size
|
||||
|
@ -252,7 +254,7 @@ module Gitlab
|
|||
# leverage that.
|
||||
def pool
|
||||
ActiveRecord::Base.connection_handler.retrieve_connection_pool(
|
||||
@configuration.model.connection_specification_name,
|
||||
@configuration.primary_connection_specification_name,
|
||||
role: ActiveRecord::Base.writing_role,
|
||||
shard: ActiveRecord::Base.default_shard
|
||||
) || raise(::ActiveRecord::ConnectionNotEstablished)
|
||||
|
|
|
@ -38,8 +38,8 @@ module Gitlab
|
|||
def unstick_or_continue_sticking(env)
|
||||
namespaces_and_ids = sticking_namespaces(env)
|
||||
|
||||
namespaces_and_ids.each do |(model, namespace, id)|
|
||||
model.sticking.unstick_or_continue_sticking(namespace, id)
|
||||
namespaces_and_ids.each do |(sticking, namespace, id)|
|
||||
sticking.unstick_or_continue_sticking(namespace, id)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -47,8 +47,8 @@ module Gitlab
|
|||
def stick_if_necessary(env)
|
||||
namespaces_and_ids = sticking_namespaces(env)
|
||||
|
||||
namespaces_and_ids.each do |model, namespace, id|
|
||||
model.sticking.stick_if_necessary(namespace, id)
|
||||
namespaces_and_ids.each do |sticking, namespace, id|
|
||||
sticking.stick_if_necessary(namespace, id)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -74,7 +74,7 @@ module Gitlab
|
|||
# models that support load balancing. In the future (if we
|
||||
# determined this to be OK) we may be able to relax this.
|
||||
::Gitlab::Database::LoadBalancing.base_models.map do |model|
|
||||
[model, :user, warden.user.id]
|
||||
[model.sticking, :user, warden.user.id]
|
||||
end
|
||||
elsif env[STICK_OBJECT].present?
|
||||
env[STICK_OBJECT].to_a
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue