Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
de5fc58277
commit
d5fdc905ae
2
Gemfile
2
Gemfile
|
|
@ -187,7 +187,7 @@ gem 'rack', '~> 2.2.4'
|
|||
gem 'rack-timeout', '~> 0.6.0', require: 'rack/timeout/base'
|
||||
|
||||
group :puma do
|
||||
gem 'puma', '~> 5.6.4', require: false
|
||||
gem 'puma', '~> 5.6.5', require: false
|
||||
gem 'puma_worker_killer', '~> 0.3.1', require: false
|
||||
gem 'sd_notify', '~> 0.1.0', require: false
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1019,7 +1019,7 @@ GEM
|
|||
tty-markdown
|
||||
tty-prompt
|
||||
public_suffix (4.0.7)
|
||||
puma (5.6.4)
|
||||
puma (5.6.5)
|
||||
nio4r (~> 2.0)
|
||||
puma_worker_killer (0.3.1)
|
||||
get_process_mem (~> 0.2)
|
||||
|
|
@ -1685,7 +1685,7 @@ DEPENDENCIES
|
|||
pry-byebug
|
||||
pry-rails (~> 0.3.9)
|
||||
pry-shell (~> 0.5.1)
|
||||
puma (~> 5.6.4)
|
||||
puma (~> 5.6.5)
|
||||
puma_worker_killer (~> 0.3.1)
|
||||
rack (~> 2.2.4)
|
||||
rack-attack (~> 6.6.0)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,43 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Groups
|
||||
class AcceptingGroupTransfersFinder < Base
|
||||
def initialize(current_user, group_to_be_transferred, params = {})
|
||||
@current_user = current_user
|
||||
@group_to_be_transferred = group_to_be_transferred
|
||||
@params = params
|
||||
end
|
||||
|
||||
def execute
|
||||
return Group.none unless can_transfer_group?
|
||||
|
||||
items = find_groups
|
||||
items = by_search(items)
|
||||
|
||||
sort(items)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
attr_reader :current_user, :group_to_be_transferred, :params
|
||||
|
||||
def find_groups
|
||||
GroupsFinder.new( # rubocop: disable CodeReuse/Finder
|
||||
current_user,
|
||||
min_access_level: Gitlab::Access::OWNER,
|
||||
exclude_group_ids: exclude_groups
|
||||
).execute.without_order
|
||||
end
|
||||
|
||||
def exclude_groups
|
||||
exclude_groups = group_to_be_transferred.self_and_descendants.pluck_primary_key
|
||||
exclude_groups << group_to_be_transferred.parent_id if group_to_be_transferred.parent_id
|
||||
|
||||
exclude_groups
|
||||
end
|
||||
|
||||
def can_transfer_group?
|
||||
Ability.allowed?(current_user, :admin_group, group_to_be_transferred)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Groups
|
||||
class Base
|
||||
private
|
||||
|
||||
def sort(items)
|
||||
items.order(Group.arel_table[:path].asc, Group.arel_table[:id].asc) # rubocop: disable CodeReuse/ActiveRecord
|
||||
end
|
||||
|
||||
def by_search(items)
|
||||
return items if params[:search].blank?
|
||||
|
||||
items.search(params[:search], include_parents: true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
#
|
||||
# Initially created to filter user groups and descendants where the user can create projects
|
||||
module Groups
|
||||
class UserGroupsFinder
|
||||
class UserGroupsFinder < Base
|
||||
def initialize(current_user, target_user, params = {})
|
||||
@current_user = current_user
|
||||
@target_user = target_user
|
||||
|
|
@ -34,16 +34,6 @@ module Groups
|
|||
|
||||
attr_reader :current_user, :target_user, :params
|
||||
|
||||
def sort(items)
|
||||
items.order(Group.arel_table[:path].asc, Group.arel_table[:id].asc) # rubocop: disable CodeReuse/ActiveRecord
|
||||
end
|
||||
|
||||
def by_search(items)
|
||||
return items if params[:search].blank?
|
||||
|
||||
items.search(params[:search], include_parents: true)
|
||||
end
|
||||
|
||||
def by_permission_scope
|
||||
if permission_scope_create_projects?
|
||||
target_user.manageable_groups(include_groups_with_developer_maintainer_access: true)
|
||||
|
|
|
|||
|
|
@ -76,34 +76,18 @@ module IssueResolverArguments
|
|||
end
|
||||
|
||||
def resolve_with_lookahead(**args)
|
||||
# The project could have been loaded in batch by `BatchLoader`.
|
||||
# At this point we need the `id` of the project to query for issues, so
|
||||
# make sure it's loaded and not `nil` before continuing.
|
||||
parent = object.respond_to?(:sync) ? object.sync : object
|
||||
return Issue.none if parent.nil?
|
||||
return Issue.none if resource_parent.nil?
|
||||
|
||||
# Will need to be made group & namespace aware with
|
||||
# https://gitlab.com/gitlab-org/gitlab-foss/issues/54520
|
||||
args[:not] = args[:not].to_h if args[:not].present?
|
||||
args[:iids] ||= [args.delete(:iid)].compact if args[:iid]
|
||||
args[:attempt_project_search_optimizations] = true if args[:search].present?
|
||||
finder = IssuesFinder.new(current_user, prepare_finder_params(args))
|
||||
|
||||
prepare_assignee_username_params(args)
|
||||
prepare_release_tag_params(args)
|
||||
|
||||
finder = IssuesFinder.new(current_user, args)
|
||||
|
||||
continue_issue_resolve(parent, finder, **args)
|
||||
continue_issue_resolve(resource_parent, finder, **args)
|
||||
end
|
||||
|
||||
def ready?(**args)
|
||||
args[:not] = args[:not].to_h if args[:not].present?
|
||||
|
||||
params_not_mutually_exclusive(args, mutually_exclusive_assignee_username_args)
|
||||
params_not_mutually_exclusive(args, mutually_exclusive_milestone_args)
|
||||
params_not_mutually_exclusive(args.fetch(:not, {}), mutually_exclusive_milestone_args)
|
||||
params_not_mutually_exclusive(args, mutually_exclusive_release_tag_args)
|
||||
validate_anonymous_search_access! if args[:search].present?
|
||||
|
||||
super
|
||||
end
|
||||
|
|
@ -128,6 +112,18 @@ module IssueResolverArguments
|
|||
|
||||
private
|
||||
|
||||
def prepare_finder_params(args)
|
||||
params = super(args)
|
||||
params[:not] = params[:not].to_h if params[:not].present?
|
||||
params[:iids] ||= [params.delete(:iid)].compact if params[:iid]
|
||||
params[:attempt_project_search_optimizations] = true if params[:search].present?
|
||||
|
||||
prepare_assignee_username_params(params)
|
||||
prepare_release_tag_params(params)
|
||||
|
||||
params
|
||||
end
|
||||
|
||||
def prepare_release_tag_params(args)
|
||||
release_tag_wildcard = args.delete(:release_tag_wildcard_id)
|
||||
return if release_tag_wildcard.blank?
|
||||
|
|
@ -135,20 +131,13 @@ module IssueResolverArguments
|
|||
args[:release_tag] ||= release_tag_wildcard
|
||||
end
|
||||
|
||||
def mutually_exclusive_release_tag_args
|
||||
[:release_tag, :release_tag_wildcard_id]
|
||||
end
|
||||
|
||||
def prepare_assignee_username_params(args)
|
||||
args[:assignee_username] = args.delete(:assignee_usernames) if args[:assignee_usernames].present?
|
||||
args[:not][:assignee_username] = args[:not].delete(:assignee_usernames) if args.dig(:not, :assignee_usernames).present?
|
||||
end
|
||||
|
||||
def params_not_mutually_exclusive(args, mutually_exclusive_args)
|
||||
if args.slice(*mutually_exclusive_args).compact.size > 1
|
||||
arg_str = mutually_exclusive_args.map { |x| x.to_s.camelize(:lower) }.join(', ')
|
||||
raise ::Gitlab::Graphql::Errors::ArgumentError, "only one of [#{arg_str}] arguments is allowed at the same time."
|
||||
end
|
||||
def mutually_exclusive_release_tag_args
|
||||
[:release_tag, :release_tag_wildcard_id]
|
||||
end
|
||||
|
||||
def mutually_exclusive_milestone_args
|
||||
|
|
@ -158,4 +147,20 @@ module IssueResolverArguments
|
|||
def mutually_exclusive_assignee_username_args
|
||||
[:assignee_usernames, :assignee_username]
|
||||
end
|
||||
|
||||
def params_not_mutually_exclusive(args, mutually_exclusive_args)
|
||||
if args.slice(*mutually_exclusive_args).compact.size > 1
|
||||
arg_str = mutually_exclusive_args.map { |x| x.to_s.camelize(:lower) }.join(', ')
|
||||
raise ::Gitlab::Graphql::Errors::ArgumentError, "only one of [#{arg_str}] arguments is allowed at the same time."
|
||||
end
|
||||
end
|
||||
|
||||
def resource_parent
|
||||
# The project could have been loaded in batch by `BatchLoader`.
|
||||
# At this point we need the `id` of the project to query for issues, so
|
||||
# make sure it's loaded and not `nil` before continuing.
|
||||
strong_memoize(:resource_parent) do
|
||||
object.respond_to?(:sync) ? object.sync : object
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -7,12 +7,48 @@ module SearchArguments
|
|||
argument :search, GraphQL::Types::String,
|
||||
required: false,
|
||||
description: 'Search query for title or description.'
|
||||
argument :in, [Types::IssuableSearchableFieldEnum],
|
||||
required: false,
|
||||
description: <<~DESC
|
||||
Specify the fields to perform the search in.
|
||||
Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument.'
|
||||
DESC
|
||||
end
|
||||
|
||||
def ready?(**args)
|
||||
validate_search_in_params!(args)
|
||||
validate_anonymous_search_access!
|
||||
|
||||
super
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def validate_anonymous_search_access!
|
||||
return if current_user.present? || Feature.disabled?(:disable_anonymous_search, type: :ops)
|
||||
|
||||
raise ::Gitlab::Graphql::Errors::ArgumentError,
|
||||
"User must be authenticated to include the `search` argument."
|
||||
end
|
||||
|
||||
def validate_search_in_params!(args)
|
||||
return unless args[:in].present? && args[:search].blank?
|
||||
|
||||
raise Gitlab::Graphql::Errors::ArgumentError,
|
||||
'`search` should be present when including the `in` argument'
|
||||
end
|
||||
|
||||
def prepare_finder_params(args)
|
||||
prepare_search_params(args)
|
||||
end
|
||||
|
||||
def prepare_search_params(args)
|
||||
return args unless args[:search].present?
|
||||
|
||||
parent_type = resource_parent.is_a?(Project) ? :project : :group
|
||||
args[:"attempt_#{parent_type}_search_optimizations"] = true
|
||||
args[:in] = args[:in].join(',') if args[:in].present?
|
||||
|
||||
args
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -26,24 +26,11 @@ module Resolvers
|
|||
required: false
|
||||
|
||||
def resolve_with_lookahead(**args)
|
||||
# The project could have been loaded in batch by `BatchLoader`.
|
||||
# At this point we need the `id` of the project to query for issues, so
|
||||
# make sure it's loaded and not `nil` before continuing.
|
||||
parent = object.respond_to?(:sync) ? object.sync : object
|
||||
return WorkItem.none if parent.nil? || !parent.work_items_feature_flag_enabled?
|
||||
return WorkItem.none if resource_parent.nil? || !resource_parent.work_items_feature_flag_enabled?
|
||||
|
||||
args[:iids] ||= [args.delete(:iid)].compact if args[:iid]
|
||||
args[:attempt_project_search_optimizations] = true if args[:search].present?
|
||||
finder = ::WorkItems::WorkItemsFinder.new(current_user, prepare_finder_params(args))
|
||||
|
||||
finder = ::WorkItems::WorkItemsFinder.new(current_user, args)
|
||||
|
||||
Gitlab::Graphql::Loaders::IssuableLoader.new(parent, finder).batching_find_all { |q| apply_lookahead(q) }
|
||||
end
|
||||
|
||||
def ready?(**args)
|
||||
validate_anonymous_search_access! if args[:search].present?
|
||||
|
||||
super
|
||||
Gitlab::Graphql::Loaders::IssuableLoader.new(resource_parent, finder).batching_find_all { |q| apply_lookahead(q) }
|
||||
end
|
||||
|
||||
private
|
||||
|
|
@ -56,6 +43,22 @@ module Resolvers
|
|||
:author
|
||||
]
|
||||
end
|
||||
|
||||
def prepare_finder_params(args)
|
||||
params = super(args)
|
||||
params[:iids] ||= [params.delete(:iid)].compact if params[:iid]
|
||||
|
||||
params
|
||||
end
|
||||
|
||||
def resource_parent
|
||||
# The project could have been loaded in batch by `BatchLoader`.
|
||||
# At this point we need the `id` of the project to query for work items, so
|
||||
# make sure it's loaded and not `nil` before continuing.
|
||||
strong_memoize(:resource_parent) do
|
||||
object.respond_to?(:sync) ? object.sync : object
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -71,18 +71,18 @@ module Users
|
|||
|
||||
last_failure = DateTime.parse(last_failure) if last_failure
|
||||
|
||||
user_dismissed?(WEB_HOOK_DISABLED, last_failure, namespace: project.namespace)
|
||||
user_dismissed?(WEB_HOOK_DISABLED, last_failure, project: project)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def user_dismissed?(feature_name, ignore_dismissal_earlier_than = nil, namespace: nil)
|
||||
def user_dismissed?(feature_name, ignore_dismissal_earlier_than = nil, project: nil)
|
||||
return false unless current_user
|
||||
|
||||
query = { feature_name: feature_name, ignore_dismissal_earlier_than: ignore_dismissal_earlier_than }
|
||||
|
||||
if namespace
|
||||
current_user.dismissed_callout_for_namespace?(namespace: namespace, **query)
|
||||
if project
|
||||
current_user.dismissed_callout_for_project?(project: project, **query)
|
||||
else
|
||||
current_user.dismissed_callout?(**query)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -2072,6 +2072,7 @@ class User < ApplicationRecord
|
|||
callout_dismissed?(callout, ignore_dismissal_earlier_than)
|
||||
end
|
||||
|
||||
# Deprecated: do not use. See: https://gitlab.com/gitlab-org/gitlab/-/issues/371017
|
||||
def dismissed_callout_for_namespace?(feature_name:, namespace:, ignore_dismissal_earlier_than: nil)
|
||||
source_feature_name = "#{feature_name}_#{namespace.id}"
|
||||
callout = namespace_callouts_by_feature_name[source_feature_name]
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@ module Users
|
|||
belongs_to :project
|
||||
|
||||
enum feature_name: {
|
||||
awaiting_members_banner: 1 # EE-only
|
||||
awaiting_members_banner: 1, # EE-only
|
||||
web_hook_disabled: 2
|
||||
}
|
||||
|
||||
validates :project, presence: true
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ module ObjectStorage
|
|||
include ObjectStorageQueue
|
||||
|
||||
feature_category :not_owned # rubocop:todo Gitlab/AvoidFeatureCategoryNotOwned
|
||||
loggable_arguments 0, 1, 2, 3
|
||||
loggable_arguments 0
|
||||
|
||||
SanityCheckError = Class.new(StandardError)
|
||||
|
||||
|
|
@ -67,41 +67,19 @@ module ObjectStorage
|
|||
include Report
|
||||
|
||||
# rubocop: disable CodeReuse/ActiveRecord
|
||||
def self.enqueue!(uploads, model_class, mounted_as, to_store)
|
||||
sanity_check!(uploads, model_class, mounted_as)
|
||||
|
||||
perform_async(uploads.ids, model_class.to_s, mounted_as, to_store)
|
||||
def self.enqueue!(uploads, to_store)
|
||||
perform_async(uploads.ids, to_store)
|
||||
end
|
||||
# rubocop: enable CodeReuse/ActiveRecord
|
||||
|
||||
# We need to be sure all the uploads are for the same uploader and model type
|
||||
# and that the mount point exists if provided.
|
||||
#
|
||||
def self.sanity_check!(uploads, model_class, mounted_as)
|
||||
upload = uploads.first
|
||||
uploader_class = upload.uploader.constantize
|
||||
uploader_types = uploads.map(&:uploader).uniq
|
||||
model_types = uploads.map(&:model_type).uniq
|
||||
model_has_mount = mounted_as.nil? || model_class.uploaders[mounted_as] == uploader_class
|
||||
|
||||
raise(SanityCheckError, _("Multiple uploaders found: %{uploader_types}") % { uploader_types: uploader_types }) unless uploader_types.count == 1
|
||||
raise(SanityCheckError, _("Multiple model types found: %{model_types}") % { model_types: model_types }) unless model_types.count == 1
|
||||
raise(SanityCheckError, _("Mount point %{mounted_as} not found in %{model_class}.") % { mounted_as: mounted_as, model_class: model_class }) unless model_has_mount
|
||||
end
|
||||
|
||||
# rubocop: disable CodeReuse/ActiveRecord
|
||||
def perform(*args)
|
||||
args_check!(args)
|
||||
ids, to_store = retrieve_applicable_args!(args)
|
||||
|
||||
(ids, model_type, mounted_as, to_store) = args
|
||||
|
||||
@model_class = model_type.constantize
|
||||
@mounted_as = mounted_as&.to_sym
|
||||
@to_store = to_store
|
||||
|
||||
uploads = Upload.preload(:model).where(id: ids)
|
||||
|
||||
sanity_check!(uploads)
|
||||
results = migrate(uploads)
|
||||
|
||||
report!(results)
|
||||
|
|
@ -111,31 +89,22 @@ module ObjectStorage
|
|||
end
|
||||
# rubocop: enable CodeReuse/ActiveRecord
|
||||
|
||||
def sanity_check!(uploads)
|
||||
self.class.sanity_check!(uploads, @model_class, @mounted_as)
|
||||
end
|
||||
private
|
||||
|
||||
def args_check!(args)
|
||||
return if args.count == 4
|
||||
def retrieve_applicable_args!(args)
|
||||
return args if args.count == 2
|
||||
return args.values_at(0, 3) if args.count == 4
|
||||
|
||||
case args.count
|
||||
when 3 then raise SanityCheckError, _("Job is missing the `model_type` argument.")
|
||||
else
|
||||
raise SanityCheckError, _("Job has wrong arguments format.")
|
||||
end
|
||||
end
|
||||
|
||||
def build_uploaders(uploads)
|
||||
uploads.map { |upload| upload.retrieve_uploader(@mounted_as) }
|
||||
raise SanityCheckError, _("Job has wrong arguments format.")
|
||||
end
|
||||
|
||||
def migrate(uploads)
|
||||
build_uploaders(uploads).map(&method(:process_uploader))
|
||||
uploads.map(&method(:process_upload))
|
||||
end
|
||||
|
||||
def process_uploader(uploader)
|
||||
MigrationResult.new(uploader.upload).tap do |result|
|
||||
uploader.migrate!(@to_store)
|
||||
def process_upload(upload)
|
||||
MigrationResult.new(upload).tap do |result|
|
||||
upload.retrieve_uploader.migrate!(@to_store)
|
||||
rescue StandardError => e
|
||||
result.error = e
|
||||
end
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ This shows you which user has this email address. One of two steps must be taken
|
|||
remove this email as a secondary email and make it a primary one so GitLab
|
||||
associates this profile to the LDAP identity.
|
||||
|
||||
The user can do either of these steps
|
||||
The user can do either of these steps
|
||||
[in their profile](../../../user/profile/index.md#access-your-user-profile) or an administrator can do it.
|
||||
|
||||
#### Projects limit errors
|
||||
|
|
@ -430,7 +430,7 @@ Next, [learn how to read the output](#example-console-output-after-a-group-sync)
|
|||
|
||||
##### Example console output after a group sync
|
||||
|
||||
Like the output from the user sync, the output from the
|
||||
Like the output from the user sync, the output from the
|
||||
[manual group sync](#sync-all-groups) is also very verbose. However, it contains lots
|
||||
of helpful information.
|
||||
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ but `LocalAccounts` works for authenticating against local, Active Directory acc
|
|||
<OutputClaim ClaimTypeReferenceId="signInNames.emailAddress" PartnerClaimType="email" />
|
||||
```
|
||||
|
||||
1. For OIDC discovery to work with B2C, the policy must be configured with an issuer compatible with the
|
||||
1. For OIDC discovery to work with B2C, the policy must be configured with an issuer compatible with the
|
||||
[OIDC specification](https://openid.net/specs/openid-connect-discovery-1_0.html#rfc.section.4.3).
|
||||
See the [token compatibility settings](https://docs.microsoft.com/en-us/azure/active-directory-b2c/configure-tokens?pivots=b2c-custom-policy#token-compatibility-settings).
|
||||
In `TrustFrameworkBase.xml` under `JwtIssuer`, set `IssuanceClaimPattern` to `AuthorityWithTfp`:
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ To bring the former **primary** site up to date:
|
|||
|
||||
NOTE:
|
||||
If you [changed the DNS records](index.md#step-4-optional-updating-the-primary-domain-dns-record)
|
||||
for this site during disaster recovery procedure you may need to
|
||||
for this site during disaster recovery procedure you may need to
|
||||
[block all the writes to this site](planned_failover.md#prevent-updates-to-the-primary-site)
|
||||
during this procedure.
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ You can set up a Container Registry on your **secondary** Geo site that mirrors
|
|||
## Supported container registries
|
||||
|
||||
Geo supports the following types of container registries:
|
||||
|
||||
|
||||
- [Docker](https://docs.docker.com/registry/)
|
||||
- [OCI](https://github.com/opencontainers/distribution-spec/blob/main/spec.md)
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ The following container image formats are support by Geo:
|
|||
|
||||
In addition, Geo also supports [BuildKit cache images](https://github.com/moby/buildkit).
|
||||
|
||||
## Supported storage
|
||||
## Supported storage
|
||||
|
||||
### Docker
|
||||
|
||||
|
|
@ -34,7 +34,7 @@ For more information on supported registry storage drivers see
|
|||
[Docker registry storage drivers](https://docs.docker.com/registry/storage-drivers/)
|
||||
|
||||
Read the [Load balancing considerations](https://docs.docker.com/registry/deploying/#load-balancing-considerations)
|
||||
when deploying the Registry, and how to set up the storage driver for the GitLab integrated
|
||||
when deploying the Registry, and how to set up the storage driver for the GitLab integrated
|
||||
[Container Registry](../../packages/container_registry.md#use-object-storage).
|
||||
|
||||
### Registries that support OCI artifacts
|
||||
|
|
|
|||
|
|
@ -868,7 +868,7 @@ or `gitlab-ctl promote-to-primary-node`, either:
|
|||
```
|
||||
|
||||
- Upgrade to GitLab 12.6.3 or later if it is safe to do so. For example,
|
||||
if the failover was just a test. A
|
||||
if the failover was just a test. A
|
||||
[caching-related bug](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/22021) was fixed.
|
||||
|
||||
### Message: `ActiveRecord::RecordInvalid: Validation failed: Enabled Geo primary node cannot be disabled`
|
||||
|
|
|
|||
|
|
@ -183,8 +183,8 @@ GitLab 13.9 through GitLab 14.3 are affected by a bug in which enabling [GitLab
|
|||
each upgraded reference. Delay any upgrade attempts until this is in the
|
||||
[13.7.5 patch release.](https://gitlab.com/gitlab-org/gitaly/-/merge_requests/3002).
|
||||
More details are available [in this issue](https://gitlab.com/gitlab-org/git/-/issues/79).
|
||||
- A new secret is generated in `/etc/gitlab/gitlab-secrets.json`.
|
||||
In an HA GitLab or GitLab Geo environment, secrets need to be the same on all nodes.
|
||||
- A new secret is generated in `/etc/gitlab/gitlab-secrets.json`.
|
||||
In an HA GitLab or GitLab Geo environment, secrets need to be the same on all nodes.
|
||||
Ensure this new secret is also accounted for if you are manually syncing the file across
|
||||
nodes, or manually specifying secrets in `/etc/gitlab/gitlab.rb`.
|
||||
|
||||
|
|
@ -247,7 +247,7 @@ the recommended procedure, see the
|
|||
## Upgrading to GitLab 12.9
|
||||
|
||||
WARNING:
|
||||
GitLab 12.9.0 through GitLab 12.9.3 are affected by
|
||||
GitLab 12.9.0 through GitLab 12.9.3 are affected by
|
||||
[a bug that stops repository verification](https://gitlab.com/gitlab-org/gitlab/-/issues/213523).
|
||||
The issue is fixed in GitLab 12.9.4. Upgrade to GitLab 12.9.4 or later.
|
||||
|
||||
|
|
@ -401,6 +401,6 @@ For the recommended procedure, see the
|
|||
## Upgrading to GitLab 12.0
|
||||
|
||||
WARNING:
|
||||
This version is affected by a
|
||||
This version is affected by a
|
||||
[bug that results in new LFS objects not being replicated to Geo secondary sites](https://gitlab.com/gitlab-org/gitlab/-/issues/32696).
|
||||
The issue is fixed in GitLab 12.1. Be sure to upgrade to GitLab 12.1 or later.
|
||||
|
|
|
|||
|
|
@ -112,8 +112,8 @@ gitlab:
|
|||
|
||||
Since GitLab 15.1, Geo secondary proxying is enabled by default for separate URLs also.
|
||||
|
||||
There are minor known issues linked in the
|
||||
["Geo secondary proxying with separate URLs" epic](https://gitlab.com/groups/gitlab-org/-/epics/6865).
|
||||
There are minor known issues linked in the
|
||||
["Geo secondary proxying with separate URLs" epic](https://gitlab.com/groups/gitlab-org/-/epics/6865).
|
||||
You can also add feedback in the epic about any use-cases that
|
||||
are not possible anymore with proxying enabled.
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ If you [installed](https://about.gitlab.com/install/) GitLab using the Omnibus G
|
|||
|
||||
### Preparation
|
||||
|
||||
Before beginning, you should already have a working GitLab instance.
|
||||
Before beginning, you should already have a working GitLab instance.
|
||||
[Learn how to install GitLab](https://about.gitlab.com/install/).
|
||||
|
||||
Provision a PostgreSQL server. We recommend using the PostgreSQL that is shipped
|
||||
|
|
@ -332,7 +332,7 @@ To configure the additional connection, you must either:
|
|||
#### Configure a new PgBouncer database with `pool_mode = session`
|
||||
|
||||
We recommend using PgBouncer with `session` pool mode. You can use the
|
||||
[bundled PgBouncer](../postgresql/pgbouncer.md) or use an external PgBouncer and
|
||||
[bundled PgBouncer](../postgresql/pgbouncer.md) or use an external PgBouncer and
|
||||
[configure it manually](https://www.pgbouncer.org/config.html).
|
||||
|
||||
The following example uses the bundled PgBouncer and sets up two separate connection pools on PostgreSQL host,
|
||||
|
|
@ -621,7 +621,7 @@ Updates to example must be made at:
|
|||
gitlab-ctl reconfigure
|
||||
```
|
||||
|
||||
1. To ensure that Praefect
|
||||
1. To ensure that Praefect
|
||||
[has updated its Prometheus listen address](https://gitlab.com/gitlab-org/gitaly/-/issues/2734),
|
||||
[restart Praefect](../restart_gitlab.md#omnibus-gitlab-restart):
|
||||
|
||||
|
|
@ -929,7 +929,7 @@ For more information on Gitaly server configuration, see our
|
|||
gitlab-ctl reconfigure
|
||||
```
|
||||
|
||||
1. To ensure that Gitaly
|
||||
1. To ensure that Gitaly
|
||||
[has updated its Prometheus listen address](https://gitlab.com/gitlab-org/gitaly/-/issues/2734),
|
||||
[restart Gitaly](../restart_gitlab.md#omnibus-gitlab-restart):
|
||||
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ Some basic Ruby runtime metrics are available:
|
|||
## Redis metrics
|
||||
|
||||
These client metrics are meant to complement Redis server metrics.
|
||||
These metrics are broken down per
|
||||
These metrics are broken down per
|
||||
[Redis instance](https://docs.gitlab.com/omnibus/settings/redis.html#running-with-multiple-redis-instances).
|
||||
These metrics all have a `storage` label which indicates the Redis
|
||||
instance (`cache`, `shared_state`, and so on).
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ GitLab has been tested by vendors and customers on a number of object storage pr
|
|||
|
||||
### Known compatibility issues
|
||||
|
||||
- Dell EMC ECS: Prior to GitLab 13.3, there is a
|
||||
- Dell EMC ECS: Prior to GitLab 13.3, there is a
|
||||
[known bug in GitLab Workhorse that prevents HTTP Range Requests from working with CI job artifacts](https://gitlab.com/gitlab-org/gitlab/-/issues/223806).
|
||||
Be sure to upgrade to GitLab 13.3.0 or above if you use S3 storage with this hardware.
|
||||
|
||||
|
|
@ -578,7 +578,7 @@ real bucket into multiple virtual buckets. If your object storage
|
|||
bucket is called `my-gitlab-objects` you can configure uploads to go
|
||||
into `my-gitlab-objects/uploads`, artifacts into
|
||||
`my-gitlab-objects/artifacts`, etc. The application will act as if
|
||||
these are separate buckets. Note that use of bucket prefixes
|
||||
these are separate buckets. Note that use of bucket prefixes
|
||||
[may not work correctly with Helm backups](https://gitlab.com/gitlab-org/charts/gitlab/-/issues/3376).
|
||||
|
||||
Helm-based installs require separate buckets to
|
||||
|
|
@ -693,7 +693,7 @@ configuration.
|
|||
When configured either with an instance profile or with the consolidated
|
||||
object configuration, GitLab Workhorse properly uploads files to S3
|
||||
buckets that have [SSE-S3 or SSE-KMS encryption enabled by default](https://docs.aws.amazon.com/kms/latest/developerguide/services-s3.html).
|
||||
Customer master keys (CMKs) and SSE-C encryption are
|
||||
Customer master keys (CMKs) and SSE-C encryption are
|
||||
[not supported since this requires sending the encryption keys in every request](https://gitlab.com/gitlab-org/gitlab/-/issues/226006).
|
||||
|
||||
##### Server-side encryption headers
|
||||
|
|
@ -701,7 +701,7 @@ Customer master keys (CMKs) and SSE-C encryption are
|
|||
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/38240) in GitLab 13.3.
|
||||
|
||||
Setting a default encryption on an S3 bucket is the easiest way to
|
||||
enable encryption, but you may want to
|
||||
enable encryption, but you may want to
|
||||
[set a bucket policy to ensure only encrypted objects are uploaded](https://aws.amazon.com/premiumsupport/knowledge-center/s3-bucket-store-kms-encrypted-objects/).
|
||||
To do this, you must configure GitLab to send the proper encryption headers
|
||||
in the `storage_options` configuration section:
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Keep your GitLab instance up and running smoothly.
|
|||
- [Multiple Sidekiq processes](extra_sidekiq_processes.md): Configure multiple Sidekiq processes to ensure certain queues always have dedicated workers, no matter the number of jobs that must be processed. **(FREE SELF)**
|
||||
- [Sidekiq routing rules](extra_sidekiq_routing.md): Configure the routing rules to route a job from a worker to a desirable queue. **(FREE SELF)**
|
||||
- [Puma](puma.md): Understand Puma and puma-worker-killer.
|
||||
- Speed up SSH operations by
|
||||
- Speed up SSH operations by
|
||||
[Authorizing SSH users via a fast, indexed lookup to the GitLab database](fast_ssh_key_lookup.md), and/or
|
||||
by [doing away with user SSH keys stored on GitLab entirely in favor of SSH certificates](ssh_certificates.md).
|
||||
- [File System Performance Benchmarking](filesystem_benchmarking.md): File system
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
# Rails console **(FREE SELF)**
|
||||
|
||||
At the heart of GitLab is a web application
|
||||
At the heart of GitLab is a web application
|
||||
[built using the Ruby on Rails framework](https://about.gitlab.com/blog/2018/10/29/why-we-use-rails-to-build-gitlab/).
|
||||
The [Rails console](https://guides.rubyonrails.org/command_line.html#rails-console).
|
||||
provides a way to interact with your GitLab instance from the command line, and also grants access to the amazing tools built right into Rails.
|
||||
|
|
@ -19,7 +19,7 @@ with no consequences, you are strongly advised to do so in a test environment.
|
|||
|
||||
The Rails console is for GitLab system administrators who are troubleshooting
|
||||
a problem or need to retrieve some data that can only be done through direct
|
||||
access of the GitLab application. Basic knowledge of Ruby is needed (try
|
||||
access of the GitLab application. Basic knowledge of Ruby is needed (try
|
||||
[this 30-minute tutorial](https://try.ruby-lang.org/) for a quick introduction).
|
||||
Rails experience is useful but not required.
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ root
|
|||
1
|
||||
```
|
||||
|
||||
Some basic knowledge of Ruby will be very useful. Try
|
||||
Some basic knowledge of Ruby will be very useful. Try
|
||||
[this 30-minute tutorial](https://try.ruby-lang.org/) for a quick introduction.
|
||||
Rails experience is helpful but not essential.
|
||||
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ users (especially if they're renewed) than you have deploy keys.
|
|||
Users can still bypass SSH certificate authentication by manually
|
||||
uploading an SSH public key to their profile, relying on the
|
||||
`~/.ssh/authorized_keys` fallback to authenticate it. There's
|
||||
currently no feature to prevent this,
|
||||
currently no feature to prevent this,
|
||||
[but there's an open request for adding it](https://gitlab.com/gitlab-org/gitlab/-/issues/23260).
|
||||
|
||||
Such a restriction can currently be hacked in by, for example, providing a
|
||||
|
|
|
|||
|
|
@ -1202,7 +1202,7 @@ Before diving in to the following sections, here's some basic troubleshooting:
|
|||
been synchronized (for example, via NTP).
|
||||
|
||||
1. If you are using an S3-backed Registry, double check that the IAM
|
||||
permissions and the S3 credentials (including region) are correct. See
|
||||
permissions and the S3 credentials (including region) are correct. See
|
||||
[the sample IAM policy](https://docs.docker.com/registry/storage-drivers/s3/)
|
||||
for more details.
|
||||
|
||||
|
|
@ -1631,7 +1631,7 @@ wrong. However, since all communications between Docker clients and servers
|
|||
are done over HTTPS, it's a bit difficult to decrypt the traffic quickly even
|
||||
if you know the private key. What can we do instead?
|
||||
|
||||
One way would be to disable HTTPS by setting up an
|
||||
One way would be to disable HTTPS by setting up an
|
||||
[insecure Registry](https://docs.docker.com/registry/insecure/). This could introduce a
|
||||
security hole and is only recommended for local testing. If you have a
|
||||
production system and can't or don't want to do this, there is another way:
|
||||
|
|
|
|||
|
|
@ -933,7 +933,7 @@ The following settings are:
|
|||
| `connection` | Various connection options described below. | |
|
||||
|
||||
NOTE:
|
||||
If you want to stop using and disconnect the NFS server, you need to
|
||||
If you want to stop using and disconnect the NFS server, you need to
|
||||
[explicitly disable local storage](#disable-pages-local-storage), and it's only possible after upgrading to GitLab 13.11.
|
||||
|
||||
#### S3-compatible connection settings
|
||||
|
|
|
|||
|
|
@ -79,7 +79,8 @@ The Rake task uses three parameters to find uploads to migrate:
|
|||
|
||||
NOTE:
|
||||
These parameters are mainly internal to the structure of GitLab, you may want to refer to the task list
|
||||
instead below.
|
||||
instead below. After running these individual tasks, we recommend that you run the [all-in-one Rake task](#all-in-one-rake-task)
|
||||
to migrate any uploads not included in the listed types.
|
||||
|
||||
This task also accepts an environment variable which you can use to override
|
||||
the default batch size:
|
||||
|
|
|
|||
|
|
@ -343,7 +343,7 @@ NOTE:
|
|||
If you are using an external Redis Sentinel instance, be sure
|
||||
to exclude the `requirepass` parameter from the Sentinel
|
||||
configuration. This parameter causes clients to report `NOAUTH
|
||||
Authentication required.`.
|
||||
Authentication required.`.
|
||||
[Redis Sentinel 3.2.x does not support password authentication](https://github.com/antirez/redis/issues/3279).
|
||||
|
||||
Now that the Redis servers are all set up, let's configure the Sentinel
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ depend on those files.
|
|||
|
||||
## Installations from source
|
||||
|
||||
If you have followed the official installation guide to
|
||||
If you have followed the official installation guide to
|
||||
[install GitLab from source](../install/installation.md), run the following command to restart GitLab:
|
||||
|
||||
```shell
|
||||
|
|
|
|||
|
|
@ -78,8 +78,8 @@ Terraform state files are stored locally, follow the steps below.
|
|||
|
||||
## Using object storage **(FREE SELF)**
|
||||
|
||||
Instead of storing Terraform state files on disk, we recommend the use of
|
||||
[one of the supported object storage options](object_storage.md#options).
|
||||
Instead of storing Terraform state files on disk, we recommend the use of
|
||||
[one of the supported object storage options](object_storage.md#options).
|
||||
This configuration relies on valid credentials to be configured already.
|
||||
|
||||
[Read more about using object storage with GitLab](object_storage.md).
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ or you can build it from source if you have the Rust compiler.
|
|||
|
||||
#### How to use the tool
|
||||
|
||||
First run the tool with `summary` flag to get a summary of the top processes sorted by time spent actively performing tasks.
|
||||
First run the tool with `summary` flag to get a summary of the top processes sorted by time spent actively performing tasks.
|
||||
You can also sort based on total time, # of system calls made, PID #, and # of child processes
|
||||
using the `-s` or `--sort` flag. The number of results defaults to 25 processes, but
|
||||
can be changed using the `-c`/`--count` option. See `--help` for full details.
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@ remove_date: '2022-11-12'
|
|||
This document was moved to [another location](../logs/tracing_correlation_id.md).
|
||||
|
||||
<!-- This redirect file can be deleted after 2022-11-12. -->
|
||||
<!-- Redirects that point to other docs in the same project expire in three months. -->
|
||||
<!-- Redirects that point to other docs in the same project expire in three months. -->
|
||||
<!-- Redirects that point to docs in a different project or site (for example, link is not relative and starts with `https:`) expire in one year. -->
|
||||
<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/redirects.html -->
|
||||
|
|
@ -9843,7 +9843,7 @@ four standard [pagination arguments](#connection-pagination-arguments):
|
|||
| <a id="boardepicancestorsiid"></a>`iid` | [`ID`](#id) | IID of the epic, e.g., "1". |
|
||||
| <a id="boardepicancestorsiidstartswith"></a>`iidStartsWith` | [`String`](#string) | Filter epics by IID for autocomplete. |
|
||||
| <a id="boardepicancestorsiids"></a>`iids` | [`[ID!]`](#id) | List of IIDs of epics, e.g., `[1, 2]`. |
|
||||
| <a id="boardepicancestorsin"></a>`in` | [`[IssuableSearchableField!]`](#issuablesearchablefield) | Specify the fields to perform the search in. Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument. |
|
||||
| <a id="boardepicancestorsin"></a>`in` | [`[IssuableSearchableField!]`](#issuablesearchablefield) | Specify the fields to perform the search in. Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument.'. |
|
||||
| <a id="boardepicancestorsincludeancestorgroups"></a>`includeAncestorGroups` | [`Boolean`](#boolean) | Include epics from ancestor groups. |
|
||||
| <a id="boardepicancestorsincludedescendantgroups"></a>`includeDescendantGroups` | [`Boolean`](#boolean) | Include epics from descendant groups. |
|
||||
| <a id="boardepicancestorslabelname"></a>`labelName` | [`[String!]`](#string) | Filter epics by labels. |
|
||||
|
|
@ -9881,7 +9881,7 @@ four standard [pagination arguments](#connection-pagination-arguments):
|
|||
| <a id="boardepicchildreniid"></a>`iid` | [`ID`](#id) | IID of the epic, e.g., "1". |
|
||||
| <a id="boardepicchildreniidstartswith"></a>`iidStartsWith` | [`String`](#string) | Filter epics by IID for autocomplete. |
|
||||
| <a id="boardepicchildreniids"></a>`iids` | [`[ID!]`](#id) | List of IIDs of epics, e.g., `[1, 2]`. |
|
||||
| <a id="boardepicchildrenin"></a>`in` | [`[IssuableSearchableField!]`](#issuablesearchablefield) | Specify the fields to perform the search in. Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument. |
|
||||
| <a id="boardepicchildrenin"></a>`in` | [`[IssuableSearchableField!]`](#issuablesearchablefield) | Specify the fields to perform the search in. Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument.'. |
|
||||
| <a id="boardepicchildrenincludeancestorgroups"></a>`includeAncestorGroups` | [`Boolean`](#boolean) | Include epics from ancestor groups. |
|
||||
| <a id="boardepicchildrenincludedescendantgroups"></a>`includeDescendantGroups` | [`Boolean`](#boolean) | Include epics from descendant groups. |
|
||||
| <a id="boardepicchildrenlabelname"></a>`labelName` | [`[String!]`](#string) | Filter epics by labels. |
|
||||
|
|
@ -11581,7 +11581,7 @@ four standard [pagination arguments](#connection-pagination-arguments):
|
|||
| <a id="epicancestorsiid"></a>`iid` | [`ID`](#id) | IID of the epic, e.g., "1". |
|
||||
| <a id="epicancestorsiidstartswith"></a>`iidStartsWith` | [`String`](#string) | Filter epics by IID for autocomplete. |
|
||||
| <a id="epicancestorsiids"></a>`iids` | [`[ID!]`](#id) | List of IIDs of epics, e.g., `[1, 2]`. |
|
||||
| <a id="epicancestorsin"></a>`in` | [`[IssuableSearchableField!]`](#issuablesearchablefield) | Specify the fields to perform the search in. Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument. |
|
||||
| <a id="epicancestorsin"></a>`in` | [`[IssuableSearchableField!]`](#issuablesearchablefield) | Specify the fields to perform the search in. Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument.'. |
|
||||
| <a id="epicancestorsincludeancestorgroups"></a>`includeAncestorGroups` | [`Boolean`](#boolean) | Include epics from ancestor groups. |
|
||||
| <a id="epicancestorsincludedescendantgroups"></a>`includeDescendantGroups` | [`Boolean`](#boolean) | Include epics from descendant groups. |
|
||||
| <a id="epicancestorslabelname"></a>`labelName` | [`[String!]`](#string) | Filter epics by labels. |
|
||||
|
|
@ -11619,7 +11619,7 @@ four standard [pagination arguments](#connection-pagination-arguments):
|
|||
| <a id="epicchildreniid"></a>`iid` | [`ID`](#id) | IID of the epic, e.g., "1". |
|
||||
| <a id="epicchildreniidstartswith"></a>`iidStartsWith` | [`String`](#string) | Filter epics by IID for autocomplete. |
|
||||
| <a id="epicchildreniids"></a>`iids` | [`[ID!]`](#id) | List of IIDs of epics, e.g., `[1, 2]`. |
|
||||
| <a id="epicchildrenin"></a>`in` | [`[IssuableSearchableField!]`](#issuablesearchablefield) | Specify the fields to perform the search in. Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument. |
|
||||
| <a id="epicchildrenin"></a>`in` | [`[IssuableSearchableField!]`](#issuablesearchablefield) | Specify the fields to perform the search in. Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument.'. |
|
||||
| <a id="epicchildrenincludeancestorgroups"></a>`includeAncestorGroups` | [`Boolean`](#boolean) | Include epics from ancestor groups. |
|
||||
| <a id="epicchildrenincludedescendantgroups"></a>`includeDescendantGroups` | [`Boolean`](#boolean) | Include epics from descendant groups. |
|
||||
| <a id="epicchildrenlabelname"></a>`labelName` | [`[String!]`](#string) | Filter epics by labels. |
|
||||
|
|
@ -12469,7 +12469,7 @@ Returns [`Epic`](#epic).
|
|||
| <a id="groupepiciid"></a>`iid` | [`ID`](#id) | IID of the epic, e.g., "1". |
|
||||
| <a id="groupepiciidstartswith"></a>`iidStartsWith` | [`String`](#string) | Filter epics by IID for autocomplete. |
|
||||
| <a id="groupepiciids"></a>`iids` | [`[ID!]`](#id) | List of IIDs of epics, e.g., `[1, 2]`. |
|
||||
| <a id="groupepicin"></a>`in` | [`[IssuableSearchableField!]`](#issuablesearchablefield) | Specify the fields to perform the search in. Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument. |
|
||||
| <a id="groupepicin"></a>`in` | [`[IssuableSearchableField!]`](#issuablesearchablefield) | Specify the fields to perform the search in. Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument.'. |
|
||||
| <a id="groupepicincludeancestorgroups"></a>`includeAncestorGroups` | [`Boolean`](#boolean) | Include epics from ancestor groups. |
|
||||
| <a id="groupepicincludedescendantgroups"></a>`includeDescendantGroups` | [`Boolean`](#boolean) | Include epics from descendant groups. |
|
||||
| <a id="groupepiclabelname"></a>`labelName` | [`[String!]`](#string) | Filter epics by labels. |
|
||||
|
|
@ -12519,7 +12519,7 @@ four standard [pagination arguments](#connection-pagination-arguments):
|
|||
| <a id="groupepicsiid"></a>`iid` | [`ID`](#id) | IID of the epic, e.g., "1". |
|
||||
| <a id="groupepicsiidstartswith"></a>`iidStartsWith` | [`String`](#string) | Filter epics by IID for autocomplete. |
|
||||
| <a id="groupepicsiids"></a>`iids` | [`[ID!]`](#id) | List of IIDs of epics, e.g., `[1, 2]`. |
|
||||
| <a id="groupepicsin"></a>`in` | [`[IssuableSearchableField!]`](#issuablesearchablefield) | Specify the fields to perform the search in. Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument. |
|
||||
| <a id="groupepicsin"></a>`in` | [`[IssuableSearchableField!]`](#issuablesearchablefield) | Specify the fields to perform the search in. Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument.'. |
|
||||
| <a id="groupepicsincludeancestorgroups"></a>`includeAncestorGroups` | [`Boolean`](#boolean) | Include epics from ancestor groups. |
|
||||
| <a id="groupepicsincludedescendantgroups"></a>`includeDescendantGroups` | [`Boolean`](#boolean) | Include epics from descendant groups. |
|
||||
| <a id="groupepicslabelname"></a>`labelName` | [`[String!]`](#string) | Filter epics by labels. |
|
||||
|
|
@ -12581,6 +12581,7 @@ four standard [pagination arguments](#connection-pagination-arguments):
|
|||
| <a id="groupissuesepicid"></a>`epicId` | [`String`](#string) | ID of an epic associated with the issues, "none" and "any" values are supported. |
|
||||
| <a id="groupissuesiid"></a>`iid` | [`String`](#string) | IID of the issue. For example, "1". |
|
||||
| <a id="groupissuesiids"></a>`iids` | [`[String!]`](#string) | List of IIDs of issues. For example, `["1", "2"]`. |
|
||||
| <a id="groupissuesin"></a>`in` | [`[IssuableSearchableField!]`](#issuablesearchablefield) | Specify the fields to perform the search in. Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument.'. |
|
||||
| <a id="groupissuesincludearchived"></a>`includeArchived` | [`Boolean`](#boolean) | Return issues from archived projects. |
|
||||
| <a id="groupissuesincludesubepics"></a>`includeSubepics` | [`Boolean`](#boolean) | Whether to include subepics when filtering issues by epicId. |
|
||||
| <a id="groupissuesincludesubgroups"></a>`includeSubgroups` | [`Boolean`](#boolean) | Include issues belonging to subgroups. |
|
||||
|
|
@ -16073,6 +16074,7 @@ Returns [`Issue`](#issue).
|
|||
| <a id="projectissueepicid"></a>`epicId` | [`String`](#string) | ID of an epic associated with the issues, "none" and "any" values are supported. |
|
||||
| <a id="projectissueiid"></a>`iid` | [`String`](#string) | IID of the issue. For example, "1". |
|
||||
| <a id="projectissueiids"></a>`iids` | [`[String!]`](#string) | List of IIDs of issues. For example, `["1", "2"]`. |
|
||||
| <a id="projectissuein"></a>`in` | [`[IssuableSearchableField!]`](#issuablesearchablefield) | Specify the fields to perform the search in. Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument.'. |
|
||||
| <a id="projectissueincludesubepics"></a>`includeSubepics` | [`Boolean`](#boolean) | Whether to include subepics when filtering issues by epicId. |
|
||||
| <a id="projectissueiterationid"></a>`iterationId` | [`[ID]`](#id) | List of iteration Global IDs applied to the issue. |
|
||||
| <a id="projectissueiterationwildcardid"></a>`iterationWildcardId` | [`IterationWildcardId`](#iterationwildcardid) | Filter by iteration ID wildcard. |
|
||||
|
|
@ -16114,6 +16116,7 @@ Returns [`IssueStatusCountsType`](#issuestatuscountstype).
|
|||
| <a id="projectissuestatuscountscrmorganizationid"></a>`crmOrganizationId` | [`String`](#string) | ID of an organization assigned to the issues. |
|
||||
| <a id="projectissuestatuscountsiid"></a>`iid` | [`String`](#string) | IID of the issue. For example, "1". |
|
||||
| <a id="projectissuestatuscountsiids"></a>`iids` | [`[String!]`](#string) | List of IIDs of issues. For example, `["1", "2"]`. |
|
||||
| <a id="projectissuestatuscountsin"></a>`in` | [`[IssuableSearchableField!]`](#issuablesearchablefield) | Specify the fields to perform the search in. Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument.'. |
|
||||
| <a id="projectissuestatuscountslabelname"></a>`labelName` | [`[String]`](#string) | Labels applied to this issue. |
|
||||
| <a id="projectissuestatuscountsmilestonetitle"></a>`milestoneTitle` | [`[String]`](#string) | Milestone applied to this issue. |
|
||||
| <a id="projectissuestatuscountsmilestonewildcardid"></a>`milestoneWildcardId` | [`MilestoneWildcardId`](#milestonewildcardid) | Filter issues by milestone ID wildcard. |
|
||||
|
|
@ -16154,6 +16157,7 @@ four standard [pagination arguments](#connection-pagination-arguments):
|
|||
| <a id="projectissuesepicid"></a>`epicId` | [`String`](#string) | ID of an epic associated with the issues, "none" and "any" values are supported. |
|
||||
| <a id="projectissuesiid"></a>`iid` | [`String`](#string) | IID of the issue. For example, "1". |
|
||||
| <a id="projectissuesiids"></a>`iids` | [`[String!]`](#string) | List of IIDs of issues. For example, `["1", "2"]`. |
|
||||
| <a id="projectissuesin"></a>`in` | [`[IssuableSearchableField!]`](#issuablesearchablefield) | Specify the fields to perform the search in. Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument.'. |
|
||||
| <a id="projectissuesincludesubepics"></a>`includeSubepics` | [`Boolean`](#boolean) | Whether to include subepics when filtering issues by epicId. |
|
||||
| <a id="projectissuesiterationid"></a>`iterationId` | [`[ID]`](#id) | List of iteration Global IDs applied to the issue. |
|
||||
| <a id="projectissuesiterationwildcardid"></a>`iterationWildcardId` | [`IterationWildcardId`](#iterationwildcardid) | Filter by iteration ID wildcard. |
|
||||
|
|
@ -16731,6 +16735,7 @@ four standard [pagination arguments](#connection-pagination-arguments):
|
|||
| ---- | ---- | ----------- |
|
||||
| <a id="projectworkitemsiid"></a>`iid` | [`String`](#string) | IID of the issue. For example, "1". |
|
||||
| <a id="projectworkitemsiids"></a>`iids` | [`[String!]`](#string) | List of IIDs of work items. For example, `["1", "2"]`. |
|
||||
| <a id="projectworkitemsin"></a>`in` | [`[IssuableSearchableField!]`](#issuablesearchablefield) | Specify the fields to perform the search in. Defaults to `[TITLE, DESCRIPTION]`. Requires the `search` argument.'. |
|
||||
| <a id="projectworkitemssearch"></a>`search` | [`String`](#string) | Search query for title or description. |
|
||||
| <a id="projectworkitemssort"></a>`sort` | [`WorkItemSort`](#workitemsort) | Sort work items by this criteria. |
|
||||
| <a id="projectworkitemsstate"></a>`state` | [`IssuableState`](#issuablestate) | Current state of this work item. |
|
||||
|
|
|
|||
|
|
@ -874,6 +874,50 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \
|
|||
"https://gitlab.example.com/api/v4/groups/4/projects/56"
|
||||
```
|
||||
|
||||
## Get groups to which a user can transfer a group
|
||||
|
||||
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/371117) in GitLab 15.4
|
||||
|
||||
Retrieve a list of groups to which the user can transfer a group.
|
||||
|
||||
```plaintext
|
||||
GET /groups/:id/transfer_locations
|
||||
```
|
||||
|
||||
| Attribute | Type | Required | Description |
|
||||
|-------------|----------------|------------------------|-------------|
|
||||
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the group to be transferred](index.md#namespaced-path-encoding). |
|
||||
| `search` | string | **{dotted-circle}** No | The group names to search for. |
|
||||
|
||||
Example request:
|
||||
|
||||
```shell
|
||||
curl --request GET "https://gitlab.example.com/api/v4/groups/1/transfer_locations"
|
||||
```
|
||||
|
||||
Example response:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": 27,
|
||||
"web_url": "https://gitlab.example.com/groups/gitlab",
|
||||
"name": "GitLab",
|
||||
"avatar_url": null,
|
||||
"full_name": "GitLab",
|
||||
"full_path": "GitLab"
|
||||
},
|
||||
{
|
||||
"id": 31,
|
||||
"web_url": "https://gitlab.example.com/groups/foobar",
|
||||
"name": "FooBar",
|
||||
"avatar_url": null,
|
||||
"full_name": "FooBar",
|
||||
"full_path": "FooBar"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## Transfer a group to a new parent group / Turn a subgroup to a top-level group
|
||||
|
||||
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/23831) in GitLab 14.6.
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ GET /projects/:id/members
|
|||
| `id` | integer/string | yes | The ID or [URL-encoded path of the project or group](index.md#namespaced-path-encoding) owned by the authenticated user |
|
||||
| `query` | string | no | A query string to search for members |
|
||||
| `user_ids` | array of integers | no | Filter the results on the given user IDs |
|
||||
| `skip_users` | array of integers | no | Filter skipped users out of the results |
|
||||
| `skip_users` | array of integers | no | Filter skipped users out of the results |
|
||||
|
||||
```shell
|
||||
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/:id/members"
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ Check the [RFC spec](https://tools.ietf.org/html/rfc6749#section-4.3) for a
|
|||
detailed flow description.
|
||||
|
||||
NOTE:
|
||||
The Resource Owner Password Credentials is disabled for users with
|
||||
The Resource Owner Password Credentials is disabled for users with
|
||||
[two-factor authentication](../user/profile/account/two_factor_authentication.md) turned on.
|
||||
These users can access the API using [personal access tokens](../user/profile/personal_access_tokens.md)
|
||||
instead.
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ The examples in this document all use the instance-level prefix.
|
|||
/packages/conan/v1
|
||||
```
|
||||
|
||||
When using the instance-level routes, be aware that there is a
|
||||
When using the instance-level routes, be aware that there is a
|
||||
[naming restriction](../../user/packages/conan_repository/index.md#package-recipe-naming-convention-for-instance-remotes)
|
||||
for Conan recipes.
|
||||
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ tags using these formats:
|
|||
- `vX.Y.Z`
|
||||
- `X.Y.Z`
|
||||
|
||||
Where `X.Y.Z` is a version that follows [semantic versioning](https://semver.org/).
|
||||
Where `X.Y.Z` is a version that follows [semantic versioning](https://semver.org/).
|
||||
For example, consider a project with the following tags:
|
||||
|
||||
- v1.0.0-pre1
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ PostgreSQL database running on GitLab.com.
|
|||
This volume contributes to significant performance problems, development
|
||||
challenges and is often related to production incidents.
|
||||
|
||||
We also expect a [significant growth in the number of builds executed on GitLab.com](../ci_scale/index.md)
|
||||
We also expect a [significant growth in the number of builds executed on GitLab.com](../ci_scale/index.md)
|
||||
in the upcoming years.
|
||||
|
||||
## Opportunity
|
||||
|
|
@ -61,7 +61,7 @@ pipelines that are older than a few months might help us to move this data out
|
|||
of the primary database, to a different storage, that is more performant and
|
||||
cost effective.
|
||||
|
||||
It is already possible to prevent processing builds
|
||||
It is already possible to prevent processing builds
|
||||
[that have been archived](../../../user/admin_area/settings/continuous_integration.md#archive-jobs).
|
||||
When a build gets archived it will not be possible to retry it, but we still do
|
||||
keep all the processing metadata in the database, and it consumes resources
|
||||
|
|
|
|||
|
|
@ -115,13 +115,13 @@ of the CI/CD Apdex score, and sometimes even causes a significant performance
|
|||
degradation in the production environment.
|
||||
|
||||
There are multiple other strategies that can improve performance and
|
||||
reliability. We can use [Redis queuing](https://gitlab.com/gitlab-org/gitlab/-/issues/322972), or
|
||||
reliability. We can use [Redis queuing](https://gitlab.com/gitlab-org/gitlab/-/issues/322972), or
|
||||
[a separate table that will accelerate SQL queries used to build queues](https://gitlab.com/gitlab-org/gitlab/-/issues/322766)
|
||||
and we want to explore them.
|
||||
|
||||
**Status**: As of October 2021 the new architecture
|
||||
**Status**: As of October 2021 the new architecture
|
||||
[has been implemented on GitLab.com](https://gitlab.com/groups/gitlab-org/-/epics/5909#note_680407908).
|
||||
The following epic tracks making it generally available:
|
||||
The following epic tracks making it generally available:
|
||||
[Make the new pending builds architecture generally available](https://gitlab.com/groups/gitlab-org/-/epics/6954).
|
||||
|
||||
### Moving big amounts of data is challenging
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Cloud native and the adoption of Kubernetes has been recognised by GitLab to be
|
|||
one of the top two biggest tailwinds that are helping us grow faster as a
|
||||
company behind the project.
|
||||
|
||||
This effort is described in a more details
|
||||
This effort is described in a more details
|
||||
[in the infrastructure team handbook](https://about.gitlab.com/handbook/engineering/infrastructure/production/kubernetes/gitlab-com/).
|
||||
|
||||
## Traditional build logs
|
||||
|
|
@ -88,7 +88,7 @@ even tried to replace NFS with
|
|||
|
||||
Since that time it has become apparent that the cost of operations and
|
||||
maintenance of a NFS cluster is significant and that if we ever decide to
|
||||
migrate to Kubernetes
|
||||
migrate to Kubernetes
|
||||
[we need to decouple GitLab from a shared local storage and NFS](https://gitlab.com/gitlab-org/gitlab-pages/-/issues/426#note_375646396).
|
||||
|
||||
1. NFS might be a single point of failure
|
||||
|
|
@ -113,7 +113,7 @@ of complexity, maintenance cost and enormous, negative impact on availability.
|
|||
The work needed to make the new architecture production ready and enabled on
|
||||
GitLab.com had been tracked in [Cloud Native Build Logs on GitLab.com](https://gitlab.com/groups/gitlab-org/-/epics/4275) epic.
|
||||
|
||||
Enabling this feature on GitLab.com is a subtask of
|
||||
Enabling this feature on GitLab.com is a subtask of
|
||||
[making the new architecture generally available](https://gitlab.com/groups/gitlab-org/-/epics/3791) for everyone.
|
||||
|
||||
## Status
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ Cloud Native and the adoption of Kubernetes has been recognised by GitLab to be
|
|||
one of the top two biggest tailwinds that are helping us grow faster as a
|
||||
company behind the project.
|
||||
|
||||
This effort is described in more detail
|
||||
This effort is described in more detail
|
||||
[in the infrastructure team handbook page](https://about.gitlab.com/handbook/engineering/infrastructure/production/kubernetes/gitlab-com/).
|
||||
|
||||
GitLab Pages is tightly coupled with NFS and in order to unblock Kubernetes
|
||||
|
|
@ -55,7 +55,7 @@ even tried to replace NFS with
|
|||
|
||||
Since that time it has become apparent that the cost of operations and
|
||||
maintenance of a NFS cluster is significant and that if we ever decide to
|
||||
migrate to Kubernetes
|
||||
migrate to Kubernetes
|
||||
[we need to decouple GitLab from a shared local storage and NFS](https://gitlab.com/gitlab-org/gitlab-pages/-/issues/426#note_375646396).
|
||||
|
||||
1. NFS might be a single point of failure
|
||||
|
|
@ -83,7 +83,7 @@ graph TD
|
|||
C -- Serves static content --> E(Visitors)
|
||||
```
|
||||
|
||||
This new architecture has been briefly described in
|
||||
This new architecture has been briefly described in
|
||||
[the blog post](https://about.gitlab.com/blog/2020/08/03/how-gitlab-pages-uses-the-gitlab-api-to-serve-content/)
|
||||
too.
|
||||
|
||||
|
|
|
|||
|
|
@ -115,8 +115,8 @@ These are reason why these changes are needed:
|
|||
|
||||
## Iterations
|
||||
|
||||
This work is being done as part of dedicated epic:
|
||||
[Improve internal usage of Feature Flags](https://gitlab.com/groups/gitlab-org/-/epics/3551).
|
||||
This work is being done as part of dedicated epic:
|
||||
[Improve internal usage of Feature Flags](https://gitlab.com/groups/gitlab-org/-/epics/3551).
|
||||
This epic describes a meta reasons for making these changes.
|
||||
|
||||
## Who
|
||||
|
|
|
|||
|
|
@ -44,11 +44,11 @@ It is an opportunity to learn from our experience in evolving the REST API, for
|
|||
the scale, and to apply this knowledge onto the GraphQL development efforts. We
|
||||
can do that by building query-to-feature correlation mechanisms, adding
|
||||
scalable state synchronization support and aligning GraphQL with other
|
||||
architectural initiatives being executed in parallel, like
|
||||
architectural initiatives being executed in parallel, like
|
||||
[the support for direct uploads](https://gitlab.com/gitlab-org/gitlab/-/issues/280819).
|
||||
|
||||
GraphQL should be secure by default. We can avoid common security mistakes by
|
||||
building mechanisms that will help us to enforce
|
||||
building mechanisms that will help us to enforce
|
||||
[OWASP GraphQL recommendations](https://cheatsheetseries.owasp.org/cheatsheets/GraphQL_Cheat_Sheet.html)
|
||||
that are relevant to us.
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ underlying implementation for shared, distributed, highly-available
|
|||
(HA) file storage.
|
||||
|
||||
Over time, we have built support for object storage across the
|
||||
application, solving specific problems in a
|
||||
[multitude of iterations](https://about.gitlab.com/company/team/structure/working-groups/object-storage/#company-efforts-on-uploads).
|
||||
application, solving specific problems in a
|
||||
[multitude of iterations](https://about.gitlab.com/company/team/structure/working-groups/object-storage/#company-efforts-on-uploads).
|
||||
This has led to increased complexity across the board, from development
|
||||
(new features and bug fixes) to installation:
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ This has led to increased complexity across the board, from development
|
|||
The following is a brief description of the main directions we can take to
|
||||
remove the pain points affecting our object storage implementation.
|
||||
|
||||
This is also available as [a YouTube video](https://youtu.be/X9V_w8hsM8E) recorded for the
|
||||
This is also available as [a YouTube video](https://youtu.be/X9V_w8hsM8E) recorded for the
|
||||
[Object Storage Working Group](https://about.gitlab.com/company/team/structure/working-groups/object-storage/).
|
||||
|
||||
### Simplify GitLab architecture by shipping MinIO
|
||||
|
|
@ -78,7 +78,7 @@ local storage and object storage.
|
|||
|
||||
With local storage, there is the assumption of a shared storage
|
||||
between components. This can be achieved by having a single box
|
||||
installation, without HA, or with a NFS, which
|
||||
installation, without HA, or with a NFS, which
|
||||
[we no longer recommend](../../../administration/nfs.md).
|
||||
|
||||
We have a testing gap on object storage. It also requires Workhorse
|
||||
|
|
@ -134,7 +134,7 @@ access to new features without infrastructure chores.
|
|||
|
||||
Our implementation is built on top of a 3rd-party framework where
|
||||
every object storage client is a 3rd-party library. Unfortunately some
|
||||
of them are unmaintained.
|
||||
of them are unmaintained.
|
||||
[We have customers who cannot push 5GB Git LFS objects](https://gitlab.com/gitlab-org/gitlab/-/issues/216442),
|
||||
but with such a vital feature implemented in 3rd-party libraries we
|
||||
are slowed down in fixing it, and we also rely on external maintainers
|
||||
|
|
@ -214,7 +214,7 @@ Proposal:
|
|||
|
||||
DRIs:
|
||||
|
||||
The DRI for this blueprint is the
|
||||
The DRI for this blueprint is the
|
||||
[Object Storage Working Group](https://about.gitlab.com/company/team/structure/working-groups/object-storage/).
|
||||
|
||||
<!-- vale gitlab.Spelling = YES -->
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ This design choice was crucial for the GitLab Runner success. Since that time
|
|||
the auto-scaling feature has been used by many users and customers and enabled
|
||||
rapid growth of CI/CD adoption on GitLab.com.
|
||||
|
||||
We can not, however, continue using Docker Machine. Work on that project
|
||||
We can not, however, continue using Docker Machine. Work on that project
|
||||
[was paused in July 2018](https://github.com/docker/machine/issues/4537) and there
|
||||
was no development made since that time (except for some highly important
|
||||
security fixes). In 2018, after Docker Machine entered the "maintenance mode",
|
||||
|
|
@ -76,7 +76,7 @@ mechanism with a reliable and flexible mechanism. We might be unable to build a
|
|||
drop-in replacement for Docker Machine, as there are presumably many reasons
|
||||
why it has been deprecated. It is very difficult to maintain compatibility with
|
||||
so many cloud providers, and it seems that Docker Machine has been deprecated
|
||||
in favor of Docker Desktop, which is not a viable replacement for us.
|
||||
in favor of Docker Desktop, which is not a viable replacement for us.
|
||||
[This issue](https://github.com/docker/roadmap/issues/245) contains a discussion
|
||||
about how people are using Docker Machine right now, and it seems that GitLab
|
||||
CI is one of the most frequent reasons for people to keep using Docker Machine.
|
||||
|
|
|
|||
|
|
@ -345,7 +345,7 @@ not without its own challenges:
|
|||
root file system, you can use the job's working directory as a mount point for
|
||||
child containers. For example, if you have files you want to share with a
|
||||
child container, you might create a subdirectory under `/builds/$CI_PROJECT_PATH`
|
||||
and use it as your mount point. For a more detailed explanation, view
|
||||
and use it as your mount point. For a more detailed explanation, view
|
||||
[issue #41227](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/41227).
|
||||
|
||||
```yaml
|
||||
|
|
@ -406,7 +406,7 @@ sudo gitlab-runner register -n \
|
|||
##### Enable registry mirror for `docker:dind` service
|
||||
|
||||
When the Docker daemon starts inside of the service container, it uses
|
||||
the default configuration. You may want to configure a
|
||||
the default configuration. You may want to configure a
|
||||
[registry mirror](https://docs.docker.com/registry/recipes/mirror/) for
|
||||
performance improvements and to ensure you don't reach Docker Hub rate limits.
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ taken to protect the users.
|
|||
|
||||
NOTE:
|
||||
[Shared runners on GitLab.com](../runners/index.md) do not
|
||||
provide an interactive web terminal. Follow
|
||||
provide an interactive web terminal. Follow
|
||||
[this issue](https://gitlab.com/gitlab-org/gitlab/-/issues/24674) for progress on
|
||||
adding support. For groups and projects hosted on GitLab.com, interactive web
|
||||
terminals are available when using your own group or project runner.
|
||||
|
|
@ -27,7 +27,7 @@ terminals are available when using your own group or project runner.
|
|||
|
||||
Two things need to be configured for the interactive web terminal to work:
|
||||
|
||||
- The runner needs to have
|
||||
- The runner needs to have
|
||||
[`[session_server]` configured properly](https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-session_server-section)
|
||||
- If you are using a reverse proxy with your GitLab instance, web terminals need to be
|
||||
[enabled](../../administration/integration/terminal.md#enabling-and-disabling-terminal-support)
|
||||
|
|
@ -54,7 +54,7 @@ Not all executors are
|
|||
NOTE:
|
||||
The `docker` executor does not keep running
|
||||
after the build script is finished. At that point, the terminal automatically
|
||||
disconnects and does not wait for the user to finish. Please follow
|
||||
disconnects and does not wait for the user to finish. Please follow
|
||||
[this issue](https://gitlab.com/gitlab-org/gitlab-runner/-/issues/3605) for updates on
|
||||
improving this behavior.
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ changes that are included in the target branch, and the `C` changes that are fro
|
|||
the merge request already in the train.
|
||||
|
||||
<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
|
||||
Watch this video for a demonstration on
|
||||
Watch this video for a demonstration on
|
||||
[how parallel execution of merge trains can prevent commits from breaking the default branch](https://www.youtube.com/watch?v=D4qCqXgZkHQ).
|
||||
|
||||
## Prerequisites
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ If you are using a self-managed instance of GitLab:
|
|||
going to your project's **Settings > CI/CD**, expanding **Runners**,
|
||||
and selecting **Show runner installation instructions**.
|
||||
These instructions are also available [in the documentation](https://docs.gitlab.com/runner/install/index.html).
|
||||
- The administrator can also configure a maximum number of shared runner
|
||||
- The administrator can also configure a maximum number of shared runner
|
||||
[CI/CD minutes for each group](../pipelines/cicd_minutes.md#set-the-quota-of-cicd-minutes-for-a-specific-namespace).
|
||||
|
||||
If you are using GitLab.com:
|
||||
|
|
|
|||
|
|
@ -110,14 +110,14 @@ Model.create(foo: params[:foo])
|
|||
|
||||
With Grape v1.3+, Array types must be defined with a `coerce_with`
|
||||
block, or parameters, fails to validate when passed a string from an
|
||||
API request. See the
|
||||
API request. See the
|
||||
[Grape upgrading documentation](https://github.com/ruby-grape/grape/blob/master/UPGRADING.md#ensure-that-array-types-have-explicit-coercions)
|
||||
for more details.
|
||||
|
||||
### Automatic coercion of nil inputs
|
||||
|
||||
Prior to Grape v1.3.3, Array parameters with `nil` values would
|
||||
automatically be coerced to an empty Array. However, due to
|
||||
automatically be coerced to an empty Array. However, due to
|
||||
[this pull request in v1.3.3](https://github.com/ruby-grape/grape/pull/2040), this
|
||||
is no longer the case. For example, suppose you define a PUT `/test`
|
||||
request that has an optional parameter:
|
||||
|
|
@ -259,7 +259,7 @@ In situations where the same model has multiple entities in the API
|
|||
discretion with applying this scope. It may be that you optimize for the
|
||||
most basic entity, with successive entities building upon that scope.
|
||||
|
||||
The `with_api_entity_associations` scope also
|
||||
The `with_api_entity_associations` scope also
|
||||
[automatically preloads data](https://gitlab.com/gitlab-org/gitlab/-/blob/19f74903240e209736c7668132e6a5a735954e7c/app%2Fmodels%2Ftodo.rb#L34)
|
||||
for `Todo` _targets_ when returned in the [to-dos API](../api/todos.md).
|
||||
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ for clarity, they define different metric names:
|
|||
As shown in this example, they can share a base name (`foo` in this example). We
|
||||
recommend this when they refer to the same operation.
|
||||
|
||||
Before the first scrape, it is important to have
|
||||
[initialized the SLI with all possible label-combinations](https://prometheus.io/docs/practices/instrumentation/#avoid-missing-metrics).
|
||||
Before the first scrape, it is important to have
|
||||
[initialized the SLI with all possible label-combinations](https://prometheus.io/docs/practices/instrumentation/#avoid-missing-metrics).
|
||||
This avoid confusing results when using these counters in calculations.
|
||||
|
||||
To initialize an SLI, use the `.initialize_sli` class method, for
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ based on your project contents. When Auto DevOps is enabled for a
|
|||
project, the user does not need to explicitly include any pipeline configuration
|
||||
through a [`.gitlab-ci.yml` file](../ci/yaml/index.md).
|
||||
|
||||
In the absence of a `.gitlab-ci.yml` file, the
|
||||
In the absence of a `.gitlab-ci.yml` file, the
|
||||
[Auto DevOps CI/CD template](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml)
|
||||
is used implicitly to configure the pipeline for the project. This
|
||||
template is a top-level template that includes other sub-templates,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ pipeline that can be used to trigger a pipeline in the Omnibus GitLab repository
|
|||
that will create:
|
||||
|
||||
- A deb package for Ubuntu 16.04, available as a build artifact, and
|
||||
- A Docker image, which is pushed to the
|
||||
- A Docker image, which is pushed to the
|
||||
[Omnibus GitLab container registry](https://gitlab.com/gitlab-org/omnibus-gitlab/container_registry)
|
||||
(images titled `gitlab-ce` and `gitlab-ee` respectively and image tag is the
|
||||
commit which triggered the pipeline).
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ editor. Once closed, Git presents you with a new text editor instance to edit
|
|||
the commit message of commit B. Add the trailer, then save and quit the editor.
|
||||
If all went well, commit B is now updated.
|
||||
|
||||
For more information about interactive rebases, take a look at
|
||||
For more information about interactive rebases, take a look at
|
||||
[the Git documentation](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History).
|
||||
|
||||
---
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ sequenceDiagram
|
|||
Workhorse-->>-Runner: request results
|
||||
```
|
||||
|
||||
1. The CI/CD job generates a document in an LSIF format (usually `dump.lsif`) using
|
||||
1. The CI/CD job generates a document in an LSIF format (usually `dump.lsif`) using
|
||||
[an indexer](https://lsif.dev) for the language of a project. The format
|
||||
[describes](https://github.com/sourcegraph/sourcegraph/blob/main/doc/code_intelligence/explanations/writing_an_indexer.md)
|
||||
interactions between a method or function and its definitions or references. The
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
As part of the database [decomposition work](https://gitlab.com/groups/gitlab-org/-/epics/6168),
|
||||
which had the goal of splitting the single database GitLab is using, into two databases: `main` and
|
||||
`ci`, came the big challenge of
|
||||
`ci`, came the big challenge of
|
||||
[removing all joins between the `main` and the `ci` tables](multiple_databases.md#removing-joins-between-ci-and-non-ci-tables).
|
||||
That is because PostgreSQL doesn't support joins between tables that belong to different databases.
|
||||
That is because PostgreSQL doesn't support joins between tables that belong to different databases.
|
||||
However, some core application models in the main database are queried very often by the CI side.
|
||||
For example:
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Ruby processes accessing the database through
|
|||
ActiveRecord, automatically calculate the connection-pool size for the
|
||||
process based on the concurrency.
|
||||
|
||||
Because of the way [Ruby on Rails manages database connections](#connection-lifecycle),
|
||||
Because of the way [Ruby on Rails manages database connections](#connection-lifecycle),
|
||||
it is important that we have at
|
||||
least as many connections as we have threads. While there is a 'pool'
|
||||
setting in [`database.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/database.yml.postgresql), it is not very practical because you need to
|
||||
|
|
@ -28,7 +28,7 @@ because connections are instantiated lazily.
|
|||
|
||||
## Troubleshooting connection-pool issues
|
||||
|
||||
The connection-pool usage can be seen per environment in the
|
||||
The connection-pool usage can be seen per environment in the
|
||||
[connection-pool saturation dashboard](https://dashboards.gitlab.net/d/alerts-sat_rails_db_connection_pool/alerts-rails_db_connection_pool-saturation-detail?orgId=1).
|
||||
|
||||
If the connection-pool is too small, this would manifest in
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ ON DELETE CASCADE;
|
|||
```
|
||||
|
||||
The migration must run after the `DELETE` trigger is installed and the loose
|
||||
foreign key definition is deployed. As such, it must be a
|
||||
foreign key definition is deployed. As such, it must be a
|
||||
[post-deployment migration](post_deployment_migrations.md) dated after the migration for the
|
||||
trigger. If the foreign key is deleted earlier, there is a good chance of
|
||||
introducing data inconsistency which needs manual cleanup:
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
# Multiple Databases
|
||||
|
||||
To allow GitLab to scale further we
|
||||
[decomposed the GitLab application database into multiple databases](https://gitlab.com/groups/gitlab-org/-/epics/6168).
|
||||
[decomposed the GitLab application database into multiple databases](https://gitlab.com/groups/gitlab-org/-/epics/6168).
|
||||
The two databases are `main` and `ci`. GitLab supports being run with either one database or two databases.
|
||||
On GitLab.com we are using two separate databases.
|
||||
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ to update the `title_html` with a title that has more than 1024 characters, the
|
|||
a database error.
|
||||
|
||||
Adding or removing a constraint to an existing attribute requires that any application changes are
|
||||
deployed _first_,
|
||||
deployed _first_,
|
||||
otherwise servers still in the old version of the application
|
||||
[may try to update the attribute with invalid values](../multi_version_compatibility.md#ci-artifact-uploads-were-failing).
|
||||
For these reasons, `add_text_limit` should run in a post-deployment migration.
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ A scan on an index that required retrieving some data from the table.
|
|||
|
||||
Bitmap scans fall between sequential scans and index scans. These are typically
|
||||
used when we would read too much data from an index scan, but too little to
|
||||
perform a sequential scan. A bitmap scan uses what is known as a
|
||||
perform a sequential scan. A bitmap scan uses what is known as a
|
||||
[bitmap index](https://en.wikipedia.org/wiki/Bitmap_index) to perform its work.
|
||||
|
||||
The [source code of PostgreSQL](https://gitlab.com/postgres/postgres/blob/REL_11_STABLE/src/include/nodes/plannodes.h#L441)
|
||||
|
|
|
|||
|
|
@ -73,13 +73,13 @@ In this example, we have the following hypothetical values:
|
|||
|
||||
- `driver`: the driver such a Jaeger.
|
||||
- `param_name`, `param_value`: these are driver specific configuration values. Configuration
|
||||
parameters for Jaeger are documented [further on in this document](#2-configure-the-gitlab_tracing-environment-variable)
|
||||
parameters for Jaeger are documented [further on in this document](#2-configure-the-gitlab_tracing-environment-variable)
|
||||
they should be URL encoded.
|
||||
Multiple values should be separated by `&` characters like a URL.
|
||||
|
||||
## Using Jaeger in the GitLab Development Kit
|
||||
|
||||
The first tracing implementation that GitLab supports is Jaeger, and the
|
||||
The first tracing implementation that GitLab supports is Jaeger, and the
|
||||
[GitLab Development Kit](https://gitlab.com/gitlab-org/gitlab-development-kit/) supports distributed tracing with
|
||||
Jaeger out-of-the-box.
|
||||
|
||||
|
|
@ -116,7 +116,7 @@ Jaeger has many configuration options, but is very easy to start in an "all-in-o
|
|||
memory for trace storage (and is therefore non-persistent). The main advantage of "all-in-one" mode
|
||||
being ease of use.
|
||||
|
||||
For more detailed configuration options, refer to the
|
||||
For more detailed configuration options, refer to the
|
||||
[Jaeger documentation](https://www.jaegertracing.io/docs/1.9/getting-started/).
|
||||
|
||||
#### Using Docker
|
||||
|
|
@ -201,7 +201,7 @@ If `GITLAB_TRACING` is not configured correctly, this issue is logged:
|
|||
```
|
||||
|
||||
By default, GitLab ships with the Jaeger tracer, but other tracers can be included at compile time.
|
||||
Details of how this can be done are included in the
|
||||
Details of how this can be done are included in the
|
||||
[LabKit tracing documentation](https://pkg.go.dev/gitlab.com/gitlab-org/labkit/tracing).
|
||||
|
||||
If no log messages about tracing are emitted, the `GITLAB_TRACING` environment variable is likely
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@ There are a few gotchas with it:
|
|||
overriding the method, because we can't know when the overridden method
|
||||
(that is, calling `super` in the overriding method) would want to stop early.
|
||||
In this case, we shouldn't just override it, but update the original method
|
||||
to make it call the other method we want to extend, like a
|
||||
to make it call the other method we want to extend, like a
|
||||
[template method pattern](https://en.wikipedia.org/wiki/Template_method_pattern).
|
||||
For example, given this base:
|
||||
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ These Advanced Search migrations, like any other GitLab changes, need to support
|
|||
|
||||
Depending on the order of deployment, it's possible that the migration
|
||||
has started or finished and there's still a server running the application code from before the
|
||||
migration. We need to take this into consideration until we can
|
||||
migration. We need to take this into consideration until we can
|
||||
[ensure all Advanced Search migrations start after the deployment has finished](https://gitlab.com/gitlab-org/gitlab/-/issues/321619).
|
||||
|
||||
### Reverting a migration
|
||||
|
|
@ -317,7 +317,7 @@ safely can.
|
|||
|
||||
We choose to use GitLab major version upgrades as a safe time to remove
|
||||
backwards compatibility for indices that have not been fully migrated. We
|
||||
[document this in our upgrade documentation](../update/index.md#upgrading-to-a-new-major-version).
|
||||
[document this in our upgrade documentation](../update/index.md#upgrading-to-a-new-major-version).
|
||||
We also choose to replace the migration code with the halted migration
|
||||
and remove tests so that:
|
||||
|
||||
|
|
@ -399,7 +399,7 @@ that may contain information to help diagnose performance issues.
|
|||
|
||||
### Performance Bar
|
||||
|
||||
Elasticsearch requests will be displayed in the
|
||||
Elasticsearch requests will be displayed in the
|
||||
[`Performance Bar`](../administration/monitoring/performance/performance_bar.md), which can
|
||||
be used both locally in development and on any deployed GitLab instance to
|
||||
diagnose poor search performance. This will show the exact queries being made,
|
||||
|
|
@ -495,7 +495,7 @@ theoretically be used to figure out what needs to be replayed are:
|
|||
These updates can be replayed by triggering another
|
||||
`ElasticDeleteProjectWorker`.
|
||||
|
||||
With the above methods and taking regular
|
||||
With the above methods and taking regular
|
||||
[Elasticsearch snapshots](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshot-restore.html)
|
||||
we should be able to recover from different kinds of data loss issues in a
|
||||
relatively short period of time compared to indexing everything from
|
||||
|
|
|
|||
|
|
@ -160,9 +160,9 @@ and Helm Chart configuration (see [example merge request](https://gitlab.com/git
|
|||
#### Rationale
|
||||
|
||||
This was done because to avoid [thread deadlocks](https://github.com/ruby/net-imap/issues/14), `MailRoom` needs
|
||||
an updated version of the `net-imap` gem. However, this
|
||||
[version of the net-imap cannot be installed by an unprivileged user](https://github.com/ruby/net-imap/issues/14) due to
|
||||
[an error installing the digest gem](https://github.com/ruby/digest/issues/14).
|
||||
an updated version of the `net-imap` gem. However, this
|
||||
[version of the net-imap cannot be installed by an unprivileged user](https://github.com/ruby/net-imap/issues/14) due to
|
||||
[an error installing the digest gem](https://github.com/ruby/digest/issues/14).
|
||||
[This bug in the Ruby interpreter](https://bugs.ruby-lang.org/issues/17761) was fixed in Ruby
|
||||
3.0.2.
|
||||
|
||||
|
|
|
|||
|
|
@ -729,8 +729,8 @@ In this case, we can either:
|
|||
- Skip passing a cursor.
|
||||
- Pass `null` explicitly to `after`.
|
||||
|
||||
After data is fetched, we can use the `update`-hook as an opportunity
|
||||
[to customize the data that is set in the Vue component property](https://apollo.vuejs.org/api/smart-query.html#options).
|
||||
After data is fetched, we can use the `update`-hook as an opportunity
|
||||
[to customize the data that is set in the Vue component property](https://apollo.vuejs.org/api/smart-query.html#options).
|
||||
This allows us to get a hold of the `pageInfo` object among other data.
|
||||
|
||||
In the `result`-hook, we can inspect the `pageInfo` object to see if we need to fetch
|
||||
|
|
|
|||
|
|
@ -364,7 +364,7 @@ export default initialState => ({
|
|||
|
||||
We made the conscious decision to avoid this pattern to improve the ability to
|
||||
discover and search our frontend codebase. The same applies
|
||||
when [providing data to a Vue app](vue.md#providing-data-from-haml-to-javascript). The reasoning for this is described in
|
||||
when [providing data to a Vue app](vue.md#providing-data-from-haml-to-javascript). The reasoning for this is described in
|
||||
[this discussion](https://gitlab.com/gitlab-org/frontend/rfcs/-/issues/56#note_302514865):
|
||||
|
||||
> Consider a `someStateKey` is being used in the store state. You _may_ not be
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ to a gem, go through these steps:
|
|||
apply if someone who currently works at GitLab wants to maintain
|
||||
the gem beyond their time working at GitLab.
|
||||
|
||||
When publishing a gem to RubyGems.org, also note the section on
|
||||
When publishing a gem to RubyGems.org, also note the section on
|
||||
[gem owners](https://about.gitlab.com/handbook/developer-onboarding/#ruby-gems)
|
||||
in the handbook.
|
||||
|
||||
|
|
@ -132,7 +132,7 @@ that also relied on `thor` but had its version pinned to a vulnerable
|
|||
one. These changes are easy to miss in the `Gemfile.lock`. Pinning the
|
||||
version would result in a conflict that would need to be solved.
|
||||
|
||||
To avoid upgrading indirect dependencies, we can use
|
||||
To avoid upgrading indirect dependencies, we can use
|
||||
[`bundle update --conservative`](https://bundler.io/man/bundle-update.1.html#OPTIONS).
|
||||
|
||||
When submitting a merge request including a dependency update,
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ Secondary-->>Client: admin/geo/replication/projects logged in response (session
|
|||
|
||||
## Git pull
|
||||
|
||||
For historical reasons, the `push_from_secondary` path is used to forward a Git pull. There is
|
||||
For historical reasons, the `push_from_secondary` path is used to forward a Git pull. There is
|
||||
[an issue proposing to rename this route](https://gitlab.com/gitlab-org/gitlab/-/issues/292690) to avoid confusion.
|
||||
|
||||
### Git pull over HTTP(s)
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ GitLab implements Git object deduplication.
|
|||
|
||||
### Understanding Git alternates
|
||||
|
||||
At the Git level, we achieve deduplication by using
|
||||
At the Git level, we achieve deduplication by using
|
||||
[Git alternates](https://git-scm.com/docs/gitrepository-layout#gitrepository-layout-objects).
|
||||
Git alternates is a mechanism that lets a repository borrow objects from
|
||||
another repository on the same machine.
|
||||
|
|
@ -99,7 +99,7 @@ are as follows:
|
|||
|
||||
### Assumptions
|
||||
|
||||
- All repositories in a pool must use [hashed storage](../administration/repository_storage_types.md).
|
||||
- All repositories in a pool must use [hashed storage](../administration/repository_storage_types.md).
|
||||
This is so that we don't have to ever worry about updating paths in
|
||||
`object/info/alternates` files.
|
||||
- All repositories in a pool must be on the same Gitaly storage shard.
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ This worker imports all pull requests. For every pull request a job for the
|
|||
|
||||
### 5. Stage::ImportPullRequestsMergedByWorker
|
||||
|
||||
This worker imports the pull requests' _merged-by_ user information. The
|
||||
This worker imports the pull requests' _merged-by_ user information. The
|
||||
[_List pull requests_](https://docs.github.com/en/rest/pulls#list-pull-requests)
|
||||
API doesn't provide this information. Therefore, this stage must fetch each merged pull request
|
||||
individually to import this information. A
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ end with a timestamp and the first 12 characters of the commit identifier:
|
|||
|
||||
If a VCS tag matches one of these patterns, it is ignored.
|
||||
|
||||
For a complete understanding of Go modules and versioning, see
|
||||
[this series of blog posts](https://go.dev/blog/using-go-modules)
|
||||
For a complete understanding of Go modules and versioning, see
|
||||
[this series of blog posts](https://go.dev/blog/using-go-modules)
|
||||
on the official Go website.
|
||||
|
||||
## 'Module' vs 'Package'
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ Go GitLab linter plugins are maintained in the [`gitlab-org/language-tools/go/li
|
|||
## Dependencies
|
||||
|
||||
Dependencies should be kept to the minimum. The introduction of a new
|
||||
dependency should be argued in the merge request, as per our [Approval Guidelines](../code_review.md#approval-guidelines).
|
||||
dependency should be argued in the merge request, as per our [Approval Guidelines](../code_review.md#approval-guidelines).
|
||||
Both [License Scanning](../../user/compliance/license_compliance/index.md)
|
||||
and [Dependency Scanning](../../user/application_security/dependency_scanning/index.md)
|
||||
should be activated on all projects to ensure new dependencies
|
||||
|
|
@ -153,7 +153,7 @@ security status and license compatibility.
|
|||
|
||||
### Modules
|
||||
|
||||
In Go 1.11 and later, a standard dependency system is available behind the name
|
||||
In Go 1.11 and later, a standard dependency system is available behind the name
|
||||
[Go Modules](https://github.com/golang/go/wiki/Modules). It provides a way to
|
||||
define and lock dependencies for reproducible builds. It should be used
|
||||
whenever possible.
|
||||
|
|
@ -166,7 +166,7 @@ projects, and makes merge requests easier to review.
|
|||
In some cases, such as building a Go project for it to act as a dependency of a
|
||||
CI run for another project, removing the `vendor/` directory means the code must
|
||||
be downloaded repeatedly, which can lead to intermittent problems due to rate
|
||||
limiting or network failures. In these circumstances, you should
|
||||
limiting or network failures. In these circumstances, you should
|
||||
[cache the downloaded code between](../../ci/caching/index.md#cache-go-dependencies).
|
||||
|
||||
There was a
|
||||
|
|
|
|||
|
|
@ -509,7 +509,7 @@ which is shared by some of the analyzers that GitLab maintains. You can [contrib
|
|||
new generic identifiers to if needed. Analyzers may also produce vendor-specific or product-specific
|
||||
identifiers, which don't belong in the [common library](https://gitlab.com/gitlab-org/security-products/analyzers/common).
|
||||
|
||||
The first item of the `identifiers` array is called the
|
||||
The first item of the `identifiers` array is called the
|
||||
[primary identifier](../../user/application_security/terminology/index.md#primary-identifier).
|
||||
The primary identifier is particularly important, because it is used to
|
||||
[track vulnerabilities](#tracking-and-merging-vulnerabilities) as new commits are pushed to the repository.
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ curl --request POST --header "Gitlab-Shared-Secret: <Base64 encoded token>" \
|
|||
## Authorized Keys Check
|
||||
|
||||
This endpoint is called by the GitLab Shell authorized keys
|
||||
check. Which is called by OpenSSH for
|
||||
check. Which is called by OpenSSH for
|
||||
[fast SSH key lookup](../../administration/operations/fast_ssh_key_lookup.md).
|
||||
|
||||
| Attribute | Type | Required | Description |
|
||||
|
|
|
|||
|
|
@ -76,13 +76,13 @@ process, which writes the contents to the standard output.
|
|||
1. The archive data is sent back to the client.
|
||||
|
||||
In step 7, the `gitaly-lfs-smudge` filter must talk to Workhorse, not to
|
||||
Rails, or an invalid LFS blob is saved. To support this, GitLab 13.5
|
||||
Rails, or an invalid LFS blob is saved. To support this, GitLab 13.5
|
||||
[changed the default Omnibus configuration to have Gitaly talk to the Workhorse](https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/4592)
|
||||
instead of Rails.
|
||||
|
||||
One side effect of this change: the correlation ID of the original
|
||||
request is not preserved for the internal API requests made by Gitaly
|
||||
(or `gitaly-lfs-smudge`), such as the one made in step 8. The
|
||||
correlation IDs for those API requests are random values until
|
||||
correlation IDs for those API requests are random values until
|
||||
[this Workhorse issue](https://gitlab.com/gitlab-org/gitlab-workhorse/-/issues/309) is
|
||||
resolved.
|
||||
|
|
|
|||
|
|
@ -385,7 +385,7 @@ end
|
|||
## Additional steps with new log files
|
||||
|
||||
1. Consider log retention settings. By default, Omnibus rotates any
|
||||
logs in `/var/log/gitlab/gitlab-rails/*.log` every hour and
|
||||
logs in `/var/log/gitlab/gitlab-rails/*.log` every hour and
|
||||
[keep at most 30 compressed files](https://docs.gitlab.com/omnibus/settings/logs.html#logrotate).
|
||||
On GitLab.com, that setting is only 6 compressed files. These settings should suffice
|
||||
for most users, but you may need to tweak them in [Omnibus GitLab](https://gitlab.com/gitlab-org/omnibus-gitlab).
|
||||
|
|
@ -395,7 +395,7 @@ end
|
|||
a merge request to the [`gitlab_fluentd`](https://gitlab.com/gitlab-cookbooks/gitlab_fluentd)
|
||||
project. See [this example](https://gitlab.com/gitlab-cookbooks/gitlab_fluentd/-/merge_requests/51/diffs).
|
||||
|
||||
1. Be sure to update the [GitLab CE/EE documentation](../administration/logs/index.md) and the
|
||||
1. Be sure to update the [GitLab CE/EE documentation](../administration/logs/index.md) and the
|
||||
[GitLab.com runbooks](https://gitlab.com/gitlab-com/runbooks/blob/master/docs/logging/README.md).
|
||||
|
||||
## Control logging visibility
|
||||
|
|
|
|||
|
|
@ -394,7 +394,7 @@ query for every mention of `@alice`.
|
|||
Caching data per transaction can be done using
|
||||
[RequestStore](https://github.com/steveklabnik/request_store) (use
|
||||
`Gitlab::SafeRequestStore` to avoid having to remember to check
|
||||
`RequestStore.active?`). Caching data in Redis can be done using
|
||||
`RequestStore.active?`). Caching data in Redis can be done using
|
||||
[Rails' caching system](https://guides.rubyonrails.org/caching_with_rails.html).
|
||||
|
||||
## Pagination
|
||||
|
|
|
|||
|
|
@ -1228,7 +1228,7 @@ If using a model in the migrations, you should first
|
|||
[clear the column cache](https://api.rubyonrails.org/classes/ActiveRecord/ModelSchema/ClassMethods.html#method-i-reset_column_information)
|
||||
using `reset_column_information`.
|
||||
|
||||
If using a model that leverages single table inheritance (STI), there are
|
||||
If using a model that leverages single table inheritance (STI), there are
|
||||
[special considerations](database/single_table_inheritance.md#in-migrations).
|
||||
|
||||
This avoids problems where a column that you are using was altered and cached
|
||||
|
|
|
|||
|
|
@ -221,8 +221,8 @@ that includes `rspec-profile` in their name.
|
|||
|
||||
### Logging
|
||||
|
||||
- Rails logging to `log/test.log` is disabled by default in CI
|
||||
[for performance reasons](https://jtway.co/speed-up-your-rails-test-suite-by-6-in-1-line-13fedb869ec4).
|
||||
- Rails logging to `log/test.log` is disabled by default in CI
|
||||
[for performance reasons](https://jtway.co/speed-up-your-rails-test-suite-by-6-in-1-line-13fedb869ec4).
|
||||
To override this setting, provide the
|
||||
`RAILS_ENABLE_TEST_LOG` environment variable.
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ We strive to run GitLab using the latest Rails releases to benefit from performa
|
|||
1. Run `yarn patch-package @rails/ujs` after updating this to ensure our local patch file version matches.
|
||||
1. Create an MR with the `pipeline:run-all-rspec` label and see if pipeline breaks.
|
||||
1. To resolve and debug spec failures use `git bisect` against the rails repository. See the [debugging section](#git-bisect-against-rails) below.
|
||||
1. Include links to the Gem diffs between the two versions in the merge request description. For example, this is the gem diff for
|
||||
1. Include links to the Gem diffs between the two versions in the merge request description. For example, this is the gem diff for
|
||||
[`activesupport` 6.1.3.2 to 6.1.4.1](https://my.diffend.io/gems/activerecord/6.1.3.2/6.1.4.1).
|
||||
|
||||
### Prepare an MR for Gitaly
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ downstream services.
|
|||
|
||||
To mitigate this, ensure that the code establishing the new WebSocket connection
|
||||
is feature flagged and defaulted to `off`. A careful, percentage-based roll-out
|
||||
of the feature flag ensures that effects can be observed on the
|
||||
of the feature flag ensures that effects can be observed on the
|
||||
[WebSocket dashboard](https://dashboards.gitlab.net/d/websockets-main/websockets-overview?orgId=1)
|
||||
|
||||
1. Create a
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ instances to cope without this functional partition.
|
|||
If we decide to keep the migration code:
|
||||
|
||||
- We should document the migration steps.
|
||||
- If we used a feature flag, we should ensure it's an
|
||||
- If we used a feature flag, we should ensure it's an
|
||||
[ops type feature flag](../feature_flags/index.md#ops-type), as these are long-lived flags.
|
||||
|
||||
Otherwise, we can remove the flags and conclude the project.
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
|
||||
# Routing
|
||||
|
||||
The GitLab backend is written primarily with Rails so it uses
|
||||
The GitLab backend is written primarily with Rails so it uses
|
||||
[Rails routing](https://guides.rubyonrails.org/routing.html). Beside Rails best
|
||||
practices, there are few rules unique to the GitLab application. To
|
||||
support subgroups, GitLab project and group routes use the wildcard
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ The application has a tight coupling to the database schema. When the
|
|||
application starts, Rails queries the database schema, caching the tables and
|
||||
column types for the data requested. Because of this schema cache, dropping a
|
||||
column or table while the application is running can produce 500 errors to the
|
||||
user. This is why we have a
|
||||
user. This is why we have a
|
||||
[process for dropping columns and other no-downtime changes](database/avoiding_downtime_in_migrations.md).
|
||||
|
||||
#### Multi-tenancy
|
||||
|
|
@ -61,10 +61,10 @@ There are two ways to deal with this:
|
|||
- Sharding. Distribute data across multiple databases.
|
||||
|
||||
Partitioning is a built-in PostgreSQL feature and requires minimal changes
|
||||
in the application. However, it
|
||||
in the application. However, it
|
||||
[requires PostgreSQL 11](https://www.2ndquadrant.com/en/blog/partitioning-evolution-postgresql-11/).
|
||||
|
||||
For example, a natural way to partition is to
|
||||
For example, a natural way to partition is to
|
||||
[partition tables by dates](https://gitlab.com/groups/gitlab-org/-/epics/2023). For example,
|
||||
the `events` and `audit_events` table are natural candidates for this
|
||||
kind of partitioning.
|
||||
|
|
@ -77,9 +77,9 @@ to abstract data access into API calls that abstract the database from
|
|||
the application, but this is a significant amount of work.
|
||||
|
||||
There are solutions that may help abstract the sharding to some extent
|
||||
from the application. For example, we want to look at
|
||||
from the application. For example, we want to look at
|
||||
[Citus Data](https://www.citusdata.com/product/community) closely. Citus Data
|
||||
provides a Rails plugin that adds a
|
||||
provides a Rails plugin that adds a
|
||||
[tenant ID to ActiveRecord models](https://www.citusdata.com/blog/2017/01/05/easily-scale-out-multi-tenant-apps/).
|
||||
|
||||
Sharding can also be done based on feature verticals. This is the
|
||||
|
|
@ -97,11 +97,11 @@ systems.
|
|||
|
||||
#### Database size
|
||||
|
||||
A recent
|
||||
A recent
|
||||
[database checkup shows a breakdown of the table sizes on GitLab.com](https://gitlab.com/gitlab-com/gl-infra/reliability/-/issues/8022#master-1022016101-8).
|
||||
Since `merge_request_diff_files` contains over 1 TB of data, we want to
|
||||
reduce/eliminate this table first. GitLab has support for
|
||||
[storing diffs in object storage](../administration/merge_request_diffs.md), which we
|
||||
reduce/eliminate this table first. GitLab has support for
|
||||
[storing diffs in object storage](../administration/merge_request_diffs.md), which we
|
||||
[want to do on GitLab.com](https://gitlab.com/gitlab-com/gl-infra/reliability/-/issues/7356).
|
||||
|
||||
#### High availability
|
||||
|
|
@ -149,7 +149,7 @@ limitation:
|
|||
- Use a multi-threaded connection pooler (for example,
|
||||
[Odyssey](https://gitlab.com/gitlab-com/gl-infra/reliability/-/issues/7776).
|
||||
|
||||
On some Linux systems, it's possible to run
|
||||
On some Linux systems, it's possible to run
|
||||
[multiple PgBouncer instances on the same port](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/4796).
|
||||
|
||||
On GitLab.com, we run multiple PgBouncer instances on different ports to
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ options:
|
|||
```
|
||||
|
||||
## Redis HyperLogLog metrics
|
||||
|
||||
|
||||
You can use Redis HyperLogLog metrics to track events not kept in the database and incremented for unique values such as unique users,
|
||||
for example, a count of how many different users used the search bar.
|
||||
|
||||
|
|
|
|||
|
|
@ -18,13 +18,13 @@ several possible situations:
|
|||
|
||||
## Adding new workers
|
||||
|
||||
On GitLab.com, we
|
||||
[do not currently have a Sidekiq deployment in the canary stage](https://gitlab.com/gitlab-org/gitlab/-/issues/19239).
|
||||
On GitLab.com, we
|
||||
[do not currently have a Sidekiq deployment in the canary stage](https://gitlab.com/gitlab-org/gitlab/-/issues/19239).
|
||||
This means that a new worker than can be scheduled from an HTTP endpoint may
|
||||
be scheduled from canary but not run on Sidekiq until the full
|
||||
production deployment is complete. This can be several hours later than
|
||||
scheduling the job. For some workers, this will not be a problem. For
|
||||
others - particularly [latency-sensitive jobs](worker_attributes.md#latency-sensitive-jobs) -
|
||||
others - particularly [latency-sensitive jobs](worker_attributes.md#latency-sensitive-jobs) -
|
||||
this will result in a poor user experience.
|
||||
|
||||
This only applies to new worker classes when they are first introduced.
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ GitLab supports two deduplication strategies:
|
|||
- `until_executing`, which is the default strategy
|
||||
- `until_executed`
|
||||
|
||||
More [deduplication strategies have been suggested](https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/195).
|
||||
More [deduplication strategies have been suggested](https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/195).
|
||||
If you are implementing a worker that could benefit from a different
|
||||
strategy, please comment in the issue.
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ USING GIN(column_name gin_trgm_ops);
|
|||
```
|
||||
|
||||
The key here is the `GIN(column_name gin_trgm_ops)` part. This creates a
|
||||
[GIN index](https://www.postgresql.org/docs/current/gin.html)
|
||||
[GIN index](https://www.postgresql.org/docs/current/gin.html)
|
||||
with the operator class set to `gin_trgm_ops`. These indexes
|
||||
_can_ be used by `ILIKE` / `LIKE` and can lead to greatly improved performance.
|
||||
One downside of these indexes is that they can easily get quite large (depending
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ If enabling the feature flag results in E2E test failures, you can browse the ar
|
|||
|
||||
If an end-to-end test enables a feature flag, the end-to-end test suite can be used to test changes in a merge request
|
||||
by running the `package-and-qa` job in the merge request pipeline. If the feature flag and relevant changes have already been merged, you can confirm that the tests
|
||||
pass on the default branch. The end-to-end tests run on the default branch every two hours, and the results are posted to a
|
||||
pass on the default branch. The end-to-end tests run on the default branch every two hours, and the results are posted to a
|
||||
[Test Session Report, which is available in the testcase-sessions project](https://gitlab.com/gitlab-org/quality/testcase-sessions/-/issues?label_name%5B%5D=found%3Amain).
|
||||
|
||||
If the relevant tests do not enable the feature flag themselves, you can check if the tests will need to be updated by opening
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ a flaky test we first want to make sure that it's no longer flaky.
|
|||
We can do that using the `ce:custom-parallel` and `ee:custom-parallel` jobs.
|
||||
Both are manual jobs that you can configure using custom variables.
|
||||
When clicking the name (not the play icon) of one of the parallel jobs,
|
||||
you are prompted to enter variables. You can use any of
|
||||
you are prompted to enter variables. You can use any of
|
||||
[the variables that can be used with `gitlab-qa`](https://gitlab.com/gitlab-org/gitlab-qa/blob/master/docs/what_tests_can_be_run.md#supported-gitlab-environment-variables)
|
||||
as well as these:
|
||||
|
||||
|
|
@ -150,8 +150,8 @@ as well as these:
|
|||
| `QA_TESTS` | The tests to run (no default, which means run all the tests in the scenario). Use file paths as you would when running tests via RSpec, for example, `qa/specs/features/ee/browser_ui` would include all the `EE` UI tests. |
|
||||
| `QA_RSPEC_TAGS` | The RSpec tags to add (no default) |
|
||||
|
||||
For now,
|
||||
[manual jobs with custom variables don't use the same variable when retried](https://gitlab.com/gitlab-org/gitlab/-/issues/31367),
|
||||
For now,
|
||||
[manual jobs with custom variables don't use the same variable when retried](https://gitlab.com/gitlab-org/gitlab/-/issues/31367),
|
||||
so if you want to run the same tests multiple times,
|
||||
specify the same variables in each `custom-parallel` job (up to as
|
||||
many of the 10 available jobs that you want to run).
|
||||
|
|
@ -165,7 +165,7 @@ automatically started: it runs the QA smoke suite against the
|
|||
You can also manually start the `review-qa-all`: it runs the full QA suite
|
||||
against the [Review App](../review_apps.md).
|
||||
|
||||
**This runs end-to-end tests against a Review App based on
|
||||
**This runs end-to-end tests against a Review App based on
|
||||
[the official GitLab Helm chart](https://gitlab.com/gitlab-org/charts/gitlab/), itself deployed with custom
|
||||
[Cloud Native components](https://gitlab.com/gitlab-org/build/CNG) built from your merge request's changes.**
|
||||
|
||||
|
|
@ -244,7 +244,7 @@ Each type of scheduled pipeline generates a static link for the latest test repo
|
|||
If you are not [testing code in a merge request](#testing-code-in-merge-requests),
|
||||
there are two main options for running the tests. If you want to run
|
||||
the existing tests against a live GitLab instance or against a pre-built Docker image,
|
||||
use the [GitLab QA orchestrator](https://gitlab.com/gitlab-org/gitlab-qa/tree/master/README.md). See also
|
||||
use the [GitLab QA orchestrator](https://gitlab.com/gitlab-org/gitlab-qa/tree/master/README.md). See also
|
||||
[examples of the test scenarios you can run via the orchestrator](https://gitlab.com/gitlab-org/gitlab-qa/blob/master/docs/what_tests_can_be_run.md#examples).
|
||||
|
||||
On the other hand, if you would like to run against a local development GitLab
|
||||
|
|
@ -263,7 +263,7 @@ architecture. See the [documentation about it](https://gitlab.com/gitlab-org/git
|
|||
|
||||
Once you decided where to put [test environment orchestration scenarios](https://gitlab.com/gitlab-org/gitlab-qa/tree/master/lib/gitlab/qa/scenario) and
|
||||
[instance-level scenarios](https://gitlab.com/gitlab-org/gitlab-foss/tree/master/qa/qa/specs/features), take a look at the [GitLab QA README](https://gitlab.com/gitlab-org/gitlab/-/tree/master/qa/README.md),
|
||||
the [GitLab QA orchestrator README](https://gitlab.com/gitlab-org/gitlab-qa/tree/master/README.md),
|
||||
the [GitLab QA orchestrator README](https://gitlab.com/gitlab-org/gitlab-qa/tree/master/README.md),
|
||||
and [the already existing instance-level scenarios](https://gitlab.com/gitlab-org/gitlab-foss/tree/master/qa/qa/specs/features).
|
||||
|
||||
### Consider **not** writing an end-to-end test
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
|||
This document describes various guidelines and best practices for automated
|
||||
testing of the GitLab project.
|
||||
|
||||
It is meant to be an _extension_ of the
|
||||
It is meant to be an _extension_ of the
|
||||
[Thoughtbot testing style guide](https://github.com/thoughtbot/guides/tree/master/testing-rspec). If
|
||||
this guide defines a rule that contradicts the Thoughtbot guide, this guide
|
||||
takes precedence. Some guidelines may be repeated verbatim to stress their
|
||||
|
|
|
|||
|
|
@ -317,7 +317,7 @@ To test these you usually have to:
|
|||
- Verify that the expected jobs were scheduled, with the correct set
|
||||
of records, the correct batch size, interval, etc.
|
||||
|
||||
The behavior of the background migration itself needs to be verified in a
|
||||
The behavior of the background migration itself needs to be verified in a
|
||||
[separate test for the background migration class](#example-background-migration-test).
|
||||
|
||||
This spec tests the
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ GitLab Workhorse is a smart reverse proxy for GitLab. It handles
|
|||
"large" HTTP requests such as file downloads, file uploads, Git
|
||||
push/pull and Git archive downloads.
|
||||
|
||||
Workhorse itself is not a feature, but there are
|
||||
Workhorse itself is not a feature, but there are
|
||||
[several features in GitLab](gitlab_features.md) that would not work efficiently without Workhorse.
|
||||
|
||||
The canonical source for Workhorse is
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ The first thing that appears is the sign-in page. GitLab creates an administrato
|
|||
The credentials are:
|
||||
|
||||
- Username: `root`
|
||||
- Password: the password is automatically created, and there are
|
||||
- Password: the password is automatically created, and there are
|
||||
[two ways to find it](https://docs.bitnami.com/azure/faq/get-started/find-credentials/).
|
||||
|
||||
After signing in, be sure to immediately [change the password](../../user/profile/index.md#change-your-password).
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ sudo apt-get install libkrb5-dev
|
|||
|
||||
### Git
|
||||
|
||||
From GitLab 13.6, we recommend you use the
|
||||
From GitLab 13.6, we recommend you use the
|
||||
[Git version provided by Gitaly](https://gitlab.com/gitlab-org/gitaly/-/issues/2729)
|
||||
that:
|
||||
|
||||
|
|
@ -239,7 +239,7 @@ sudo make install
|
|||
|
||||
GitLab has several daemons written in Go. To install
|
||||
GitLab we need a Go compiler. The instructions below assume you use 64-bit
|
||||
Linux. You can find downloads for other platforms at the
|
||||
Linux. You can find downloads for other platforms at the
|
||||
[Go download page](https://go.dev/dl).
|
||||
|
||||
```shell
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ embed Grafana panels using either:
|
|||
|
||||
## Use Grafana-rendered images
|
||||
|
||||
You can embed live [Grafana](https://docs.gitlab.com/omnibus/settings/grafana.html) panels as
|
||||
You can embed live [Grafana](https://docs.gitlab.com/omnibus/settings/grafana.html) panels as
|
||||
[a direct link](https://grafana.com/docs/grafana/v7.5/sharing/share-panel/#use-direct-link).
|
||||
Your Grafana instance must:
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ Our current policy is:
|
|||
- Backporting security fixes **to the previous two monthly releases in addition to the current stable release**. (See [security releases](#security-releases).)
|
||||
|
||||
In rare cases, release managers may make an exception and backport to more than
|
||||
the last two monthly releases. See
|
||||
the last two monthly releases. See
|
||||
[Backporting to older releases](#backporting-to-older-releases) for more information.
|
||||
|
||||
## Versioning
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue