Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-04 03:09:12 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-04 03:09:12 +0300
commit8d94fb4ae136386963c5353f72b227b9c27af4d7 (patch)
tree96ac46df8328893611554fca5533e520c78fe27a
parent037bda35bf0edc43a591348d4fda01f436389c60 (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--CHANGELOG.md24
-rw-r--r--app/assets/javascripts/design_management/graphql/queries/get_design.query.graphql7
-rw-r--r--app/graphql/resolvers/design_management/design_at_version_resolver.rb7
-rw-r--r--app/graphql/resolvers/design_management/design_resolver.rb8
-rw-r--r--app/graphql/resolvers/design_management/designs_resolver.rb27
-rw-r--r--app/graphql/resolvers/design_management/version/design_at_version_resolver.rb22
-rw-r--r--app/graphql/resolvers/design_management/version/designs_at_version_resolver.rb18
-rw-r--r--app/graphql/resolvers/design_management/version_in_collection_resolver.rb15
-rw-r--r--app/graphql/resolvers/design_management/version_resolver.rb8
-rw-r--r--app/graphql/resolvers/design_management/versions_resolver.rb20
-rw-r--r--changelogs/unreleased/235758-track-ci-secrets-management-vault-usage.yml5
-rw-r--r--changelogs/unreleased/271391-downgrade-vue-router.yml5
-rw-r--r--changelogs/unreleased/auto-deploy-1-0-7.yml5
-rw-r--r--changelogs/unreleased/diff-file-header-clipboard-btn-overflow.yml5
-rw-r--r--changelogs/unreleased/sh-pgbouncer-bpass-config.yml5
-rw-r--r--config/feature_flags/development/usage_data_i_ci_secrets_management_vault_build_created.yml8
-rw-r--r--doc/administration/auth/ldap/index.md2
-rw-r--r--doc/administration/job_logs.md39
-rw-r--r--doc/api/graphql/reference/gitlab_schema.graphql34
-rw-r--r--doc/api/graphql/reference/gitlab_schema.json44
-rw-r--r--doc/development/adding_service_component.md2
-rw-r--r--doc/development/api_graphql_styleguide.md3
-rw-r--r--doc/development/application_limits.md6
-rw-r--r--doc/development/approval_rules.md2
-rw-r--r--doc/development/architecture.md17
-rw-r--r--doc/development/changelog.md1
-rw-r--r--doc/development/chaos_endpoints.md7
-rw-r--r--doc/development/code_review.md3
-rw-r--r--doc/development/contributing/issue_workflow.md7
-rw-r--r--doc/development/diffs.md3
-rw-r--r--doc/development/distributed_tracing.md2
-rw-r--r--doc/development/documentation/feature_flags.md1
-rw-r--r--doc/development/documentation/site_architecture/global_nav.md2
-rw-r--r--doc/development/documentation/site_architecture/index.md5
-rw-r--r--doc/development/documentation/site_architecture/release_process.md3
-rw-r--r--doc/development/documentation/structure.md1
-rw-r--r--doc/development/documentation/workflow.md2
-rw-r--r--doc/development/fe_guide/editor_lite.md2
-rw-r--r--doc/development/fe_guide/frontend_faq.md7
-rw-r--r--doc/development/fe_guide/graphql.md4
-rw-r--r--doc/development/fe_guide/performance.md27
-rw-r--r--doc/development/fe_guide/style/javascript.md2
-rw-r--r--doc/development/fe_guide/style/vue.md10
-rw-r--r--doc/development/fe_guide/tooling.md13
-rw-r--r--doc/development/fe_guide/vue.md6
-rw-r--r--doc/development/fe_guide/vue3_migration.md1
-rw-r--r--doc/development/fe_guide/vuex.md8
-rw-r--r--doc/development/feature_flags/controls.md1
-rw-r--r--doc/development/feature_flags/development.md2
-rw-r--r--doc/development/feature_flags/index.md1
-rw-r--r--doc/development/file_storage.md10
-rw-r--r--doc/development/gotchas.md8
-rw-r--r--doc/development/i18n/externalization.md9
-rw-r--r--doc/development/i18n/proofreader.md10
-rw-r--r--doc/development/import_project.md1
-rw-r--r--doc/development/licensing.md3
-rw-r--r--doc/development/migration_style_guide.md6
-rw-r--r--doc/development/new_fe_guide/development/accessibility.md2
-rw-r--r--doc/development/ordering_table_columns.md1
-rw-r--r--doc/development/profiling.md1
-rw-r--r--doc/development/query_recorder.md1
-rw-r--r--doc/development/rake_tasks.md2
-rw-r--r--doc/development/reference_processing.md2
-rw-r--r--doc/development/secure_coding_guidelines.md7
-rw-r--r--doc/development/service_measurement.md6
-rw-r--r--doc/development/sidekiq_style_guide.md6
-rw-r--r--doc/development/testing_guide/best_practices.md8
-rw-r--r--doc/development/testing_guide/end_to_end/beginners_guide.md3
-rw-r--r--doc/development/testing_guide/end_to_end/best_practices.md4
-rw-r--r--doc/development/testing_guide/end_to_end/environment_selection.md1
-rw-r--r--doc/development/testing_guide/frontend_testing.md2
-rw-r--r--doc/development/testing_guide/testing_migrations_guide.md1
-rw-r--r--doc/development/uploads.md1
-rw-r--r--doc/development/value_stream_analytics.md4
-rw-r--r--doc/development/what_requires_downtime.md14
-rw-r--r--doc/operations/incident_management/alert_integrations.md6
-rw-r--r--doc/subscriptions/self_managed/index.md32
-rw-r--r--doc/user/admin_area/activating_deactivating_users.md6
-rw-r--r--doc/user/admin_area/approving_users.md4
-rw-r--r--doc/user/admin_area/blocking_unblocking_users.md14
-rw-r--r--doc/user/admin_area/index.md14
-rw-r--r--doc/user/clusters/agent/index.md1
-rw-r--r--doc/user/packages/index.md1
-rw-r--r--doc/user/project/settings/project_access_tokens.md2
-rw-r--r--lib/gitlab/database/partitioning_migration_helpers.rb1
-rw-r--r--lib/gitlab/database/partitioning_migration_helpers/index_helpers.rb90
-rw-r--r--lib/gitlab/database/postgres_partitioned_table.rb4
-rw-r--r--lib/gitlab/usage_data_counters/known_events.yml5
-rw-r--r--lib/gitlab/webpack/dev_server_middleware.rb12
-rw-r--r--spec/graphql/resolvers/design_management/design_resolver_spec.rb11
-rw-r--r--spec/graphql/resolvers/design_management/designs_resolver_spec.rb20
-rw-r--r--spec/graphql/resolvers/design_management/version_in_collection_resolver_spec.rb7
-rw-r--r--spec/lib/gitlab/database/partitioning_migration_helpers/index_helpers_spec.rb186
-rw-r--r--spec/lib/gitlab/database/postgres_partitioned_table_spec.rb17
-rw-r--r--spec/lib/gitlab/usage_data_counters/hll_redis_counter_spec.rb5
-rw-r--r--spec/lib/gitlab/usage_data_spec.rb2
-rw-r--r--spec/support/helpers/table_schema_helpers.rb23
97 files changed, 746 insertions, 289 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fc7b8b76344..04af514c827 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,19 @@
documentation](doc/development/changelog.md) for instructions on adding your own
entry.
+## 13.5.3 (2020-11-03)
+
+### Fixed (3 changes)
+
+- Fix IDE issues with special characters. !46398
+- Ensure that copy to clipboard button is visible. !46466
+- Auto Deploy: fixes issues for fetching other charts from stable repo. !46531
+
+### Added (1 change)
+
+- Add environment variables to override backup/restore DB settings. !45855
+
+
## 13.5.2 (2020-11-02)
### Security (9 changes)
@@ -598,6 +611,17 @@ entry.
- Bump cluster applications CI template. !45472
+## 13.4.6 (2020-11-03)
+
+### Fixed (1 change)
+
+- Auto Deploy: fixes issues for fetching other charts from stable repo. !46531
+
+### Other (1 change)
+
+- GitLab-managed apps: Use GitLab's repo as replacement for the Helm stable repo. !44875
+
+
## 13.4.5 (2020-11-02)
### Security (9 changes)
diff --git a/app/assets/javascripts/design_management/graphql/queries/get_design.query.graphql b/app/assets/javascripts/design_management/graphql/queries/get_design.query.graphql
index 96869a404b1..99a61191c6e 100644
--- a/app/assets/javascripts/design_management/graphql/queries/get_design.query.graphql
+++ b/app/assets/javascripts/design_management/graphql/queries/get_design.query.graphql
@@ -1,7 +1,12 @@
#import "../fragments/design.fragment.graphql"
#import "~/graphql_shared/fragments/author.fragment.graphql"
-query getDesign($fullPath: ID!, $iid: String!, $atVersion: ID, $filenames: [String!]) {
+query getDesign(
+ $fullPath: ID!
+ $iid: String!
+ $atVersion: DesignManagementVersionID
+ $filenames: [String!]
+) {
project(fullPath: $fullPath) {
id
issue(iid: $iid) {
diff --git a/app/graphql/resolvers/design_management/design_at_version_resolver.rb b/app/graphql/resolvers/design_management/design_at_version_resolver.rb
index fd9b349f974..b0da43abd54 100644
--- a/app/graphql/resolvers/design_management/design_at_version_resolver.rb
+++ b/app/graphql/resolvers/design_management/design_at_version_resolver.rb
@@ -9,7 +9,7 @@ module Resolvers
authorize :read_design
- argument :id, GraphQL::ID_TYPE,
+ argument :id, ::Types::GlobalIDType[::DesignManagement::DesignAtVersion],
required: true,
description: 'The Global ID of the design at this version'
@@ -18,7 +18,10 @@ module Resolvers
end
def find_object(id:)
- dav = GitlabSchema.object_from_id(id, expected_type: ::DesignManagement::DesignAtVersion)
+ # TODO: remove this line when the compatibility layer is removed
+ # See: https://gitlab.com/gitlab-org/gitlab/-/issues/257883
+ id = ::Types::GlobalIDType[::DesignManagement::DesignAtVersion].coerce_isolated_input(id)
+ dav = GitlabSchema.find_by_gid(id)
return unless consistent?(dav)
dav
diff --git a/app/graphql/resolvers/design_management/design_resolver.rb b/app/graphql/resolvers/design_management/design_resolver.rb
index 05bdbbbe407..43b5242c2b0 100644
--- a/app/graphql/resolvers/design_management/design_resolver.rb
+++ b/app/graphql/resolvers/design_management/design_resolver.rb
@@ -3,7 +3,7 @@
module Resolvers
module DesignManagement
class DesignResolver < BaseResolver
- argument :id, GraphQL::ID_TYPE,
+ argument :id, ::Types::GlobalIDType[::DesignManagement::Design],
required: false,
description: 'Find a design by its ID'
@@ -50,7 +50,11 @@ module Resolvers
end
def parse_gid(gid)
- GitlabSchema.parse_gid(gid, expected_type: ::DesignManagement::Design).model_id
+ # TODO: remove this line when the compatibility layer is removed
+ # See: https://gitlab.com/gitlab-org/gitlab/-/issues/257883
+ gid = ::Types::GlobalIDType[::DesignManagement::Design].coerce_isolated_input(gid)
+
+ gid.model_id
end
end
end
diff --git a/app/graphql/resolvers/design_management/designs_resolver.rb b/app/graphql/resolvers/design_management/designs_resolver.rb
index 955ea6304e0..5327feba7f0 100644
--- a/app/graphql/resolvers/design_management/designs_resolver.rb
+++ b/app/graphql/resolvers/design_management/designs_resolver.rb
@@ -3,16 +3,16 @@
module Resolvers
module DesignManagement
class DesignsResolver < BaseResolver
- argument :ids,
- [GraphQL::ID_TYPE],
+ DesignID = ::Types::GlobalIDType[::DesignManagement::Design]
+ VersionID = ::Types::GlobalIDType[::DesignManagement::Version]
+
+ argument :ids, [DesignID],
required: false,
description: 'Filters designs by their ID'
- argument :filenames,
- [GraphQL::STRING_TYPE],
+ argument :filenames, [GraphQL::STRING_TYPE],
required: false,
description: 'Filters designs by their filename'
- argument :at_version,
- GraphQL::ID_TYPE,
+ argument :at_version, VersionID,
required: false,
description: 'Filters designs to only those that existed at the version. ' \
'If argument is omitted or nil then all designs will reflect the latest version'
@@ -36,11 +36,20 @@ module Resolvers
def version(at_version)
return unless at_version
- GitlabSchema.object_from_id(at_version, expected_type: ::DesignManagement::Version)&.sync
+ # TODO: remove this line when the compatibility layer is removed
+ # See: https://gitlab.com/gitlab-org/gitlab/-/issues/257883
+ at_version = VersionID.coerce_isolated_input(at_version)
+ # TODO: when we get promises use this to make resolve lazy
+ Gitlab::Graphql::Lazy.force(GitlabSchema.find_by_gid(at_version))
end
- def design_ids(ids)
- ids&.map { |id| GlobalID.parse(id, expected_type: ::DesignManagement::Design).model_id }
+ def design_ids(gids)
+ return if gids.nil?
+
+ # TODO: remove this line when the compatibility layer is removed
+ # See: https://gitlab.com/gitlab-org/gitlab/-/issues/257883
+ gids = gids.map { |id| DesignID.coerce_isolated_input(id) }
+ gids.map(&:model_id)
end
def issue
diff --git a/app/graphql/resolvers/design_management/version/design_at_version_resolver.rb b/app/graphql/resolvers/design_management/version/design_at_version_resolver.rb
index 03f7908780c..70021057f71 100644
--- a/app/graphql/resolvers/design_management/version/design_at_version_resolver.rb
+++ b/app/graphql/resolvers/design_management/version/design_at_version_resolver.rb
@@ -5,17 +5,20 @@ module Resolvers
module Version
# Resolver for a DesignAtVersion object given an implicit version context
class DesignAtVersionResolver < BaseResolver
+ DesignAtVersionID = ::Types::GlobalIDType[::DesignManagement::DesignAtVersion]
+ DesignID = ::Types::GlobalIDType[::DesignManagement::Design]
+
include Gitlab::Graphql::Authorize::AuthorizeResource
type Types::DesignManagement::DesignAtVersionType, null: true
authorize :read_design
- argument :id, GraphQL::ID_TYPE,
+ argument :id, DesignAtVersionID,
required: false,
as: :design_at_version_id,
description: 'The ID of the DesignAtVersion'
- argument :design_id, GraphQL::ID_TYPE,
+ argument :design_id, DesignID,
required: false,
description: 'The ID of a specific design'
argument :filename, GraphQL::STRING_TYPE,
@@ -29,6 +32,11 @@ module Resolvers
def resolve(design_id: nil, filename: nil, design_at_version_id: nil)
validate_arguments(design_id, filename, design_at_version_id)
+ # TODO: remove this when the compatibility layer is removed
+ # See: https://gitlab.com/gitlab-org/gitlab/-/issues/257883
+ design_id &&= DesignID.coerce_isolated_input(design_id)
+ design_at_version_id &&= DesignAtVersionID.coerce_isolated_input(design_at_version_id)
+
return unless Ability.allowed?(current_user, :read_design, issue)
return specific_design_at_version(design_at_version_id) if design_at_version_id
@@ -49,7 +57,7 @@ module Resolvers
end
def specific_design_at_version(id)
- dav = GitlabSchema.object_from_id(id, expected_type: ::DesignManagement::DesignAtVersion)
+ dav = GitlabSchema.find_by_gid(id)
return unless consistent?(dav)
dav
@@ -65,8 +73,8 @@ module Resolvers
dav.design.visible_in?(version)
end
- def find(id, filename)
- ids = [parse_design_id(id).model_id] if id
+ def find(gid, filename)
+ ids = [gid.model_id] if gid
filenames = [filename] if filename
::DesignManagement::DesignsFinder
@@ -74,10 +82,6 @@ module Resolvers
.execute
end
- def parse_design_id(id)
- GitlabSchema.parse_gid(id, expected_type: ::DesignManagement::Design)
- end
-
def issue
version.issue
end
diff --git a/app/graphql/resolvers/design_management/version/designs_at_version_resolver.rb b/app/graphql/resolvers/design_management/version/designs_at_version_resolver.rb
index 5ccb2f3e311..a129d8620d4 100644
--- a/app/graphql/resolvers/design_management/version/designs_at_version_resolver.rb
+++ b/app/graphql/resolvers/design_management/version/designs_at_version_resolver.rb
@@ -11,8 +11,9 @@ module Resolvers
authorize :read_design
- argument :ids,
- [GraphQL::ID_TYPE],
+ DesignID = ::Types::GlobalIDType[::DesignManagement::Design]
+
+ argument :ids, [DesignID],
required: false,
description: 'Filters designs by their ID'
argument :filenames,
@@ -31,16 +32,19 @@ module Resolvers
private
def find(ids, filenames)
- ids = ids&.map { |id| parse_design_id(id).model_id }
-
::DesignManagement::DesignsFinder.new(issue, current_user,
- ids: ids,
+ ids: design_ids(ids),
filenames: filenames,
visible_at_version: version)
end
- def parse_design_id(id)
- GitlabSchema.parse_gid(id, expected_type: ::DesignManagement::Design)
+ def design_ids(gids)
+ return if gids.nil?
+
+ # TODO: remove this line when the compatibility layer is removed
+ # See: https://gitlab.com/gitlab-org/gitlab/-/issues/257883
+ gids = gids.map { |id| DesignID.coerce_isolated_input(id) }
+ gids.map(&:model_id)
end
def issue
diff --git a/app/graphql/resolvers/design_management/version_in_collection_resolver.rb b/app/graphql/resolvers/design_management/version_in_collection_resolver.rb
index 9e729172881..ecd7ab3ee45 100644
--- a/app/graphql/resolvers/design_management/version_in_collection_resolver.rb
+++ b/app/graphql/resolvers/design_management/version_in_collection_resolver.rb
@@ -11,20 +11,25 @@ module Resolvers
alias_method :collection, :object
+ VersionID = ::Types::GlobalIDType[::DesignManagement::Version]
+
argument :sha, GraphQL::STRING_TYPE,
required: false,
description: "The SHA256 of a specific version"
- argument :id, GraphQL::ID_TYPE,
+ argument :id, VersionID,
+ as: :version_id,
required: false,
description: 'The Global ID of the version'
- def resolve(id: nil, sha: nil)
- check_args(id, sha)
+ def resolve(version_id: nil, sha: nil)
+ # TODO: remove this line when the compatibility layer is removed
+ # See: https://gitlab.com/gitlab-org/gitlab/-/issues/257883
+ version_id &&= VersionID.coerce_isolated_input(version_id)
- gid = GitlabSchema.parse_gid(id, expected_type: ::DesignManagement::Version) if id
+ check_args(version_id, sha)
::DesignManagement::VersionsFinder
- .new(collection, current_user, sha: sha, version_id: gid&.model_id)
+ .new(collection, current_user, sha: sha, version_id: version_id&.model_id)
.execute
.first
end
diff --git a/app/graphql/resolvers/design_management/version_resolver.rb b/app/graphql/resolvers/design_management/version_resolver.rb
index b0e0843e6c8..1bc9c1a7cd6 100644
--- a/app/graphql/resolvers/design_management/version_resolver.rb
+++ b/app/graphql/resolvers/design_management/version_resolver.rb
@@ -9,7 +9,7 @@ module Resolvers
authorize :read_design
- argument :id, GraphQL::ID_TYPE,
+ argument :id, ::Types::GlobalIDType[::DesignManagement::Version],
required: true,
description: 'The Global ID of the version'
@@ -18,7 +18,11 @@ module Resolvers
end
def find_object(id:)
- GitlabSchema.object_from_id(id, expected_type: ::DesignManagement::Version)
+ # TODO: remove this line when the compatibility layer is removed
+ # See: https://gitlab.com/gitlab-org/gitlab/-/issues/257883
+ id = ::Types::GlobalIDType[::DesignManagement::Version].coerce_isolated_input(id)
+
+ GitlabSchema.find_by_gid(id)
end
end
end
diff --git a/app/graphql/resolvers/design_management/versions_resolver.rb b/app/graphql/resolvers/design_management/versions_resolver.rb
index a62258dad5c..23858c8e991 100644
--- a/app/graphql/resolvers/design_management/versions_resolver.rb
+++ b/app/graphql/resolvers/design_management/versions_resolver.rb
@@ -7,12 +7,14 @@ module Resolvers
alias_method :design_or_collection, :object
+ VersionID = ::Types::GlobalIDType[::DesignManagement::Version]
+
argument :earlier_or_equal_to_sha, GraphQL::STRING_TYPE,
as: :sha,
required: false,
description: 'The SHA256 of the most recent acceptable version'
- argument :earlier_or_equal_to_id, GraphQL::ID_TYPE,
+ argument :earlier_or_equal_to_id, VersionID,
as: :id,
required: false,
description: 'The Global ID of the most recent acceptable version'
@@ -23,6 +25,9 @@ module Resolvers
end
def resolve(parent: nil, id: nil, sha: nil)
+ # TODO: remove this line when the compatibility layer is removed
+ # See: https://gitlab.com/gitlab-org/gitlab/-/issues/257883
+ id &&= VersionID.coerce_isolated_input(id)
version = cutoff(parent, id, sha)
raise ::Gitlab::Graphql::Errors::ResourceNotAvailable, 'cutoff not found' unless version.present?
@@ -47,8 +52,7 @@ module Resolvers
end
end
- def specific_version(id, sha)
- gid = GitlabSchema.parse_gid(id, expected_type: ::DesignManagement::Version) if id
+ def specific_version(gid, sha)
find(sha: sha, version_id: gid&.model_id).first
end
@@ -58,8 +62,8 @@ module Resolvers
.execute
end
- def by_id(id)
- GitlabSchema.object_from_id(id, expected_type: ::DesignManagement::Version).sync
+ def by_id(gid)
+ ::Gitlab::Graphql::Lazy.force(GitlabSchema.find_by_gid(gid))
end
# Find an `at_version` argument passed to a parent node.
@@ -69,7 +73,11 @@ module Resolvers
# for consistency we should only present versions up to the given
# version here.
def at_version_arg(parent)
- ::Gitlab::Graphql::FindArgumentInParent.find(parent, :at_version, limit_depth: 4)
+ # TODO: remove coercion when the compatibility layer is removed
+ # See: https://gitlab.com/gitlab-org/gitlab/-/issues/257883
+ version_id = ::Gitlab::Graphql::FindArgumentInParent.find(parent, :at_version, limit_depth: 4)
+ version_id &&= VersionID.coerce_isolated_input(version_id)
+ version_id
end
end
end
diff --git a/changelogs/unreleased/235758-track-ci-secrets-management-vault-usage.yml b/changelogs/unreleased/235758-track-ci-secrets-management-vault-usage.yml
new file mode 100644
index 00000000000..1fe85b3ef81
--- /dev/null
+++ b/changelogs/unreleased/235758-track-ci-secrets-management-vault-usage.yml
@@ -0,0 +1,5 @@
+---
+title: Track usage of CI Secrets Management (Vault secrets)
+merge_request: 46515
+author:
+type: added
diff --git a/changelogs/unreleased/271391-downgrade-vue-router.yml b/changelogs/unreleased/271391-downgrade-vue-router.yml
deleted file mode 100644
index 37e371980cd..00000000000
--- a/changelogs/unreleased/271391-downgrade-vue-router.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Fix IDE issues with special characters
-merge_request: 46398
-author:
-type: fixed
diff --git a/changelogs/unreleased/auto-deploy-1-0-7.yml b/changelogs/unreleased/auto-deploy-1-0-7.yml
deleted file mode 100644
index 6bac06115ae..00000000000
--- a/changelogs/unreleased/auto-deploy-1-0-7.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: 'Auto Deploy: fixes issues for fetching other charts from stable repo'
-merge_request: 46531
-author:
-type: fixed
diff --git a/changelogs/unreleased/diff-file-header-clipboard-btn-overflow.yml b/changelogs/unreleased/diff-file-header-clipboard-btn-overflow.yml
deleted file mode 100644
index 9dfcd6201c8..00000000000
--- a/changelogs/unreleased/diff-file-header-clipboard-btn-overflow.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Ensure that copy to clipboard button is visible
-merge_request: 46466
-author:
-type: fixed
diff --git a/changelogs/unreleased/sh-pgbouncer-bpass-config.yml b/changelogs/unreleased/sh-pgbouncer-bpass-config.yml
deleted file mode 100644
index 5ca15b33163..00000000000
--- a/changelogs/unreleased/sh-pgbouncer-bpass-config.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Add environment variables to override backup/restore DB settings
-merge_request: 45855
-author:
-type: added
diff --git a/config/feature_flags/development/usage_data_i_ci_secrets_management_vault_build_created.yml b/config/feature_flags/development/usage_data_i_ci_secrets_management_vault_build_created.yml
new file mode 100644
index 00000000000..dbebdde8532
--- /dev/null
+++ b/config/feature_flags/development/usage_data_i_ci_secrets_management_vault_build_created.yml
@@ -0,0 +1,8 @@
+---
+name: usage_data_i_ci_secrets_management_vault_build_created
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46515
+rollout_issue_url:
+milestone: '13.6'
+type: development
+group: group::release management
+default_enabled: true
diff --git a/doc/administration/auth/ldap/index.md b/doc/administration/auth/ldap/index.md
index b6c9e248858..75cd411c586 100644
--- a/doc/administration/auth/ldap/index.md
+++ b/doc/administration/auth/ldap/index.md
@@ -17,7 +17,7 @@ This integration works with most LDAP-compliant directory servers, including:
- Open LDAP
- 389 Server
-Users added through LDAP take a [licensed seat](../../../subscriptions/self_managed/index.md#choose-the-number-of-users).
+Users added through LDAP take a [licensed seat](../../../subscriptions/self_managed/index.md#billable-users).
GitLab Enterprise Editions (EE) include enhanced integration,
including group membership syncing as well as multiple LDAP servers support.
diff --git a/doc/administration/job_logs.md b/doc/administration/job_logs.md
index f28a3ca3664..7852cd731ed 100644
--- a/doc/administration/job_logs.md
+++ b/doc/administration/job_logs.md
@@ -43,6 +43,45 @@ To change the location where the job logs will be stored, follow the steps below
1. Save the file and [reconfigure GitLab](restart_gitlab.md#omnibus-gitlab-reconfigure) for the
changes to take effect.
+Alternatively, if you have existing job logs you can follow
+these steps to move the logs to a new location without losing any data.
+
+1. Pause continuous integration data processing by updating this setting in `/etc/gitlab/gitlab.rb`.
+ Jobs in progress are not affected, based on how [data flow](#data-flow) works.
+
+ ```ruby
+ sidekiq['experimental_queue_selector'] = true
+ sidekiq['queue_groups'] = [
+ "feature_category!=continuous_integration"
+ ]
+ ```
+
+1. Save the file and [reconfigure GitLab](restart_gitlab.md#omnibus-gitlab-reconfigure) for the
+ changes to take effect.
+1. Set the new storage location in `/etc/gitlab/gitlab.rb`:
+
+ ```ruby
+ gitlab_ci['builds_directory'] = '/mnt/to/gitlab-ci/builds'
+ ```
+
+1. Save the file and [reconfigure GitLab](restart_gitlab.md#omnibus-gitlab-reconfigure) for the
+ changes to take effect.
+1. Use `rsync` to move job logs from the current location to the new location:
+
+ ```shell
+ sudo rsync -avzh --remove-source-files --ignore-existing --progress /var/opt/gitlab/gitlab-ci/builds/ /mnt/to/gitlab-ci/builds`
+ ```
+
+ Use `--ignore-existing` so you don't override new job logs with older versions of the same log.
+1. Unpause continuous integration data processing by editing `/etc/gitlab/gitlab.rb` and removing the `sidekiq` setting you updated earlier.
+1. Save the file and [reconfigure GitLab](restart_gitlab.md#omnibus-gitlab-reconfigure) for the
+ changes to take effect.
+1. Remove the old job logs storage location:
+
+ ```shell
+ sudo rm -rf /var/opt/gitlab/gitlab-ci/builds`
+ ```
+
**In installations from source:**
1. Edit `/home/git/gitlab/config/gitlab.yml` and add or amend the following lines:
diff --git a/doc/api/graphql/reference/gitlab_schema.graphql b/doc/api/graphql/reference/gitlab_schema.graphql
index df1857dda30..1a37752a0ba 100644
--- a/doc/api/graphql/reference/gitlab_schema.graphql
+++ b/doc/api/graphql/reference/gitlab_schema.graphql
@@ -5139,7 +5139,7 @@ type Design implements CurrentUserTodos & DesignFields & Noteable {
"""
The Global ID of the most recent acceptable version
"""
- earlierOrEqualToId: ID
+ earlierOrEqualToId: DesignManagementVersionID
"""
The SHA256 of the most recent acceptable version
@@ -5279,7 +5279,7 @@ type DesignCollection {
"""
Find a design by its ID
"""
- id: ID
+ id: DesignManagementDesignID
): Design
"""
@@ -5289,7 +5289,7 @@ type DesignCollection {
"""
The Global ID of the design at this version
"""
- id: ID!
+ id: DesignManagementDesignAtVersionID!
): DesignAtVersion
"""
@@ -5305,7 +5305,7 @@ type DesignCollection {
Filters designs to only those that existed at the version. If argument is
omitted or nil then all designs will reflect the latest version
"""
- atVersion: ID
+ atVersion: DesignManagementVersionID
"""
Returns the elements in the list that come before the specified cursor.
@@ -5325,7 +5325,7 @@ type DesignCollection {
"""
Filters designs by their ID
"""
- ids: [ID!]
+ ids: [DesignManagementDesignID!]
"""
Returns the last _n_ elements from the list.
@@ -5350,7 +5350,7 @@ type DesignCollection {
"""
The Global ID of the version
"""
- id: ID
+ id: DesignManagementVersionID
"""
The SHA256 of a specific version
@@ -5375,7 +5375,7 @@ type DesignCollection {
"""
The Global ID of the most recent acceptable version
"""
- earlierOrEqualToId: ID
+ earlierOrEqualToId: DesignManagementVersionID
"""
The SHA256 of the most recent acceptable version
@@ -5509,7 +5509,7 @@ type DesignManagement {
"""
The Global ID of the design at this version
"""
- id: ID!
+ id: DesignManagementDesignAtVersionID!
): DesignAtVersion
"""
@@ -5519,7 +5519,7 @@ type DesignManagement {
"""
The Global ID of the version
"""
- id: ID!
+ id: DesignManagementVersionID!
): DesignVersion
}
@@ -5569,6 +5569,11 @@ type DesignManagementDeletePayload {
}
"""
+Identifier of DesignManagement::DesignAtVersion
+"""
+scalar DesignManagementDesignAtVersionID
+
+"""
Identifier of DesignManagement::Design
"""
scalar DesignManagementDesignID
@@ -5669,6 +5674,11 @@ type DesignManagementUploadPayload {
}
"""
+Identifier of DesignManagement::Version
+"""
+scalar DesignManagementVersionID
+
+"""
A specific version in which designs were added, modified or deleted
"""
type DesignVersion {
@@ -5679,7 +5689,7 @@ type DesignVersion {
"""
The ID of a specific design
"""
- designId: ID
+ designId: DesignManagementDesignID
"""
The filename of a specific design
@@ -5689,7 +5699,7 @@ type DesignVersion {
"""
The ID of the DesignAtVersion
"""
- id: ID
+ id: DesignManagementDesignAtVersionID
): DesignAtVersion!
"""
@@ -5744,7 +5754,7 @@ type DesignVersion {
"""
Filters designs by their ID
"""
- ids: [ID!]
+ ids: [DesignManagementDesignID!]
"""
Returns the last _n_ elements from the list.
diff --git a/doc/api/graphql/reference/gitlab_schema.json b/doc/api/graphql/reference/gitlab_schema.json
index 1d1c06db039..3939d10b1a7 100644
--- a/doc/api/graphql/reference/gitlab_schema.json
+++ b/doc/api/graphql/reference/gitlab_schema.json
@@ -13948,7 +13948,7 @@
"description": "The Global ID of the most recent acceptable version",
"type": {
"kind": "SCALAR",
- "name": "ID",
+ "name": "DesignManagementVersionID",
"ofType": null
},
"defaultValue": null
@@ -14397,7 +14397,7 @@
"description": "Find a design by its ID",
"type": {
"kind": "SCALAR",
- "name": "ID",
+ "name": "DesignManagementDesignID",
"ofType": null
},
"defaultValue": null
@@ -14433,7 +14433,7 @@
"name": null,
"ofType": {
"kind": "SCALAR",
- "name": "ID",
+ "name": "DesignManagementDesignAtVersionID",
"ofType": null
}
},
@@ -14463,7 +14463,7 @@
"name": null,
"ofType": {
"kind": "SCALAR",
- "name": "ID",
+ "name": "DesignManagementDesignID",
"ofType": null
}
}
@@ -14493,7 +14493,7 @@
"description": "Filters designs to only those that existed at the version. If argument is omitted or nil then all designs will reflect the latest version",
"type": {
"kind": "SCALAR",
- "name": "ID",
+ "name": "DesignManagementVersionID",
"ofType": null
},
"defaultValue": null
@@ -14606,7 +14606,7 @@
"description": "The Global ID of the version",
"type": {
"kind": "SCALAR",
- "name": "ID",
+ "name": "DesignManagementVersionID",
"ofType": null
},
"defaultValue": null
@@ -14639,7 +14639,7 @@
"description": "The Global ID of the most recent acceptable version",
"type": {
"kind": "SCALAR",
- "name": "ID",
+ "name": "DesignManagementVersionID",
"ofType": null
},
"defaultValue": null
@@ -15061,7 +15061,7 @@
"name": null,
"ofType": {
"kind": "SCALAR",
- "name": "ID",
+ "name": "DesignManagementDesignAtVersionID",
"ofType": null
}
},
@@ -15088,7 +15088,7 @@
"name": null,
"ofType": {
"kind": "SCALAR",
- "name": "ID",
+ "name": "DesignManagementVersionID",
"ofType": null
}
},
@@ -15251,6 +15251,16 @@
},
{
"kind": "SCALAR",
+ "name": "DesignManagementDesignAtVersionID",
+ "description": "Identifier of DesignManagement::DesignAtVersion",
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
+ "kind": "SCALAR",
"name": "DesignManagementDesignID",
"description": "Identifier of DesignManagement::Design",
"fields": null,
@@ -15558,6 +15568,16 @@
"possibleTypes": null
},
{
+ "kind": "SCALAR",
+ "name": "DesignManagementVersionID",
+ "description": "Identifier of DesignManagement::Version",
+ "fields": null,
+ "inputFields": null,
+ "interfaces": null,
+ "enumValues": null,
+ "possibleTypes": null
+ },
+ {
"kind": "OBJECT",
"name": "DesignVersion",
"description": "A specific version in which designs were added, modified or deleted",
@@ -15571,7 +15591,7 @@
"description": "The ID of the DesignAtVersion",
"type": {
"kind": "SCALAR",
- "name": "ID",
+ "name": "DesignManagementDesignAtVersionID",
"ofType": null
},
"defaultValue": null
@@ -15581,7 +15601,7 @@
"description": "The ID of a specific design",
"type": {
"kind": "SCALAR",
- "name": "ID",
+ "name": "DesignManagementDesignID",
"ofType": null
},
"defaultValue": null
@@ -15681,7 +15701,7 @@
"name": null,
"ofType": {
"kind": "SCALAR",
- "name": "ID",
+ "name": "DesignManagementDesignID",
"ofType": null
}
}
diff --git a/doc/development/adding_service_component.md b/doc/development/adding_service_component.md
index d2bab4a2a07..74309a5c616 100644
--- a/doc/development/adding_service_component.md
+++ b/doc/development/adding_service_component.md
@@ -59,10 +59,8 @@ TIP: **Tip:**
## Bundling a service with GitLab
-NOTE: **Note:**
Code shipped with GitLab needs to use a license approved by the Legal team. See the list of [existing approved licenses](https://about.gitlab.com/handbook/engineering/open-source/#using-open-source-libraries).
-NOTE: **Note:**
Notify the [Distribution team](https://about.gitlab.com/handbook/engineering/development/enablement/distribution/) when adding a new dependency that must be compiled. We must be able to compile the dependency on all supported platforms.
New services to be bundled with GitLab need to be available in the following environments.
diff --git a/doc/development/api_graphql_styleguide.md b/doc/development/api_graphql_styleguide.md
index 04d7135bb9c..dc7debdce64 100644
--- a/doc/development/api_graphql_styleguide.md
+++ b/doc/development/api_graphql_styleguide.md
@@ -689,7 +689,7 @@ end
```
Fields can also be authorized against multiple abilities, in which case
-all of ability checks must pass. **Note:** This requires explicitly
+all of ability checks must pass. This requires explicitly
passing a block to `field`:
```ruby
@@ -702,7 +702,6 @@ module Types
end
```
-NOTE: **Note:**
If the field's type already [has a particular
authorization](#type-authorization) then there is no need to add that
same authorization to the field.
diff --git a/doc/development/application_limits.md b/doc/development/application_limits.md
index 4ae238cbbf2..41fcf5301ad 100644
--- a/doc/development/application_limits.md
+++ b/doc/development/application_limits.md
@@ -33,7 +33,6 @@ It's recommended to create two separate migration script files.
add_column(:plan_limits, :project_hooks, :integer, default: 100, null: false)
```
- NOTE: **Note:**
Plan limits entries set to `0` mean that limits are not enabled. You should
use this setting only in special and documented circumstances.
@@ -64,7 +63,6 @@ It's recommended to create two separate migration script files.
end
```
- NOTE: **Note:**
Some plans exist only on GitLab.com. This will be a no-op for plans
that do not exist.
@@ -103,7 +101,6 @@ can be used to validate that a model does not exceed the limits. It ensures
that the count of the records for the current model does not exceed the defined
limit.
-NOTE: **Note:**
You must specify the limit scope of the object being validated
and the limit name if it's different from the pluralized model name.
@@ -152,5 +149,4 @@ GitLab.com:
- `silver` - Namespaces and projects with a Silver subscription
- `gold` - Namespaces and projects with a Gold subscription
-NOTE: **Note:**
-The test environment doesn't have any plans.
+The `test` environment doesn't have any plans.
diff --git a/doc/development/approval_rules.md b/doc/development/approval_rules.md
index fb4546371fe..892050611e1 100644
--- a/doc/development/approval_rules.md
+++ b/doc/development/approval_rules.md
@@ -20,7 +20,7 @@ feature to work.
NOTE: **Note:**
This is a living document and should be updated accordingly when parts
-of the codebase touched in this document changed/removed or when new components
+of the codebase touched in this document are changed or removed, or when new components
are added.
## Data Model
diff --git a/doc/development/architecture.md b/doc/development/architecture.md
index 761b4bd3cfb..f5597c5c5d8 100644
--- a/doc/development/architecture.md
+++ b/doc/development/architecture.md
@@ -687,7 +687,6 @@ Sidekiq is a Ruby background job processor that pulls jobs from the Redis queue
#### Puma
-NOTE: **Note:**
Starting with GitLab 13.0, Puma is the default web server and Unicorn has been
disabled by default.
@@ -705,7 +704,6 @@ disabled by default.
#### Unicorn
-NOTE: **Note:**
Starting with GitLab 13.0, Puma is the default web server and Unicorn has been
disabled by default.
@@ -1021,9 +1019,9 @@ PostgreSQL:
GitLab has configuration files located in `/home/git/gitlab/config/*`. Commonly referenced
configuration files include:
-- `gitlab.yml` - GitLab configuration
-- `puma.rb` - Puma web server settings
-- `database.yml` - Database connection settings
+- `gitlab.yml`: GitLab configuration
+- `puma.rb`: Puma web server settings
+- `database.yml`: Database connection settings
GitLab Shell has a configuration file at `/home/git/gitlab-shell/config.yml`.
@@ -1039,9 +1037,12 @@ bundle exec rake gitlab:env:info RAILS_ENV=production
bundle exec rake gitlab:check RAILS_ENV=production
```
-Note: It is recommended to log into the `git` user using `sudo -i -u git` or `sudo su - git`. While
-the `sudo` commands provided by GitLab work in Ubuntu they do not always work in RHEL.
+It's recommended to sign in to the `git` user using either `sudo -i -u git` or
+`sudo su - git`. Although the `sudo` commands provided by GitLab work in Ubuntu,
+they don't always work in RHEL.
## GitLab.com
-We've also detailed [our architecture of GitLab.com](https://about.gitlab.com/handbook/engineering/infrastructure/production/architecture/) but this is probably over the top unless you have millions of users.
+The [GitLab.com architecture](https://about.gitlab.com/handbook/engineering/infrastructure/production/architecture/)
+is detailed for your reference, but this architecture is only useful if you have
+millions of users.
diff --git a/doc/development/changelog.md b/doc/development/changelog.md
index 5dd8e114242..b8e879c1826 100644
--- a/doc/development/changelog.md
+++ b/doc/development/changelog.md
@@ -125,7 +125,6 @@ the `--ee` option:
bin/changelog --ee 'Hey DZ, I added a feature to GitLab!'
```
-NOTE: **Note:**
All entries in the `CHANGELOG.md` file apply to all editions of GitLab.
Changelog updates are based on a common [GitLab codebase](https://gitlab.com/gitlab-org/gitlab/),
and are mirrored without proprietary code to [GitLab FOSS](https://gitlab.com/gitlab-org/gitlab-foss/) (also known as GitLab Community Edition).
diff --git a/doc/development/chaos_endpoints.md b/doc/development/chaos_endpoints.md
index 75354c4b4db..ef6772023a0 100644
--- a/doc/development/chaos_endpoints.md
+++ b/doc/development/chaos_endpoints.md
@@ -50,8 +50,7 @@ each endpoint can be set to `true`. This will run the chaos process in a Sidekiq
To simulate a memory leak in your application, use the `/-/chaos/leakmem` endpoint.
-NOTE: **Note:**
-The memory is not retained after the request finishes. Once the request has completed, the Ruby garbage collector will attempt to recover the memory.
+The memory is not retained after the request finishes. After the request has completed, the Ruby garbage collector will attempt to recover the memory.
```plaintext
GET /-/chaos/leakmem
@@ -145,8 +144,8 @@ curl http://localhost:3000/-/chaos/sleep?duration_s=60&token=secret
This endpoint will simulate the unexpected death of a worker process using a `kill` signal.
-NOTE: **Note:**
-Since this endpoint uses the `KILL` signal, the worker is not given a chance to cleanup or shutdown.
+Because this endpoint uses the `KILL` signal, the worker isn't given an
+opportunity to cleanup or shutdown.
```plaintext
GET /-/chaos/kill
diff --git a/doc/development/code_review.md b/doc/development/code_review.md
index 77d031099bd..07a85e375c2 100644
--- a/doc/development/code_review.md
+++ b/doc/development/code_review.md
@@ -390,8 +390,7 @@ When ready to merge:
- When you set the MR to "Merge When Pipeline Succeeds", you should take over
subsequent revisions for anything that would be spotted after that.
-NOTE: **Note:**
-Thanks to "Pipeline for Merged Results", authors won't have to rebase their
+Thanks to **Pipeline for Merged Results**, authors won't have to rebase their
branch as frequently anymore (only when there are conflicts) since the Merge
Results Pipeline will already incorporate the latest changes from `master`.
This results in faster review/merge cycles since maintainers don't have to ask
diff --git a/doc/development/contributing/issue_workflow.md b/doc/development/contributing/issue_workflow.md
index 0cfed2d7f9c..99650c24661 100644
--- a/doc/development/contributing/issue_workflow.md
+++ b/doc/development/contributing/issue_workflow.md
@@ -207,6 +207,13 @@ Examples of feature labels are `~wiki`, `~ldap`, `~api`, `~issues`, `~"merge req
Feature labels are all-lowercase.
+### Facet labels
+
+To track additional information or context about created issues, developers may
+add _facet labels_. Facet labels are also sometimes used for issue prioritization
+or for measurements (such as time to close). An example of a facet label is the
+~customer label, which indicates customer interest.
+
### Department labels
The current department labels are:
diff --git a/doc/development/diffs.md b/doc/development/diffs.md
index 3db355f6a19..8d4b9e865b9 100644
--- a/doc/development/diffs.md
+++ b/doc/development/diffs.md
@@ -99,7 +99,6 @@ Gitlab::Git::DiffCollection.collection_limits[:max_bytes] = Gitlab::Git::DiffCol
No more files will be rendered at all if 5 megabytes have already been rendered.
-NOTE: **Note:**
All collection limit parameters are currently sent and applied on Gitaly. That is, once the limit is surpassed,
Gitaly will only return the safe amount of data to be persisted on `merge_request_diff_files`.
@@ -114,7 +113,6 @@ That is, it's equivalent to 10kb if the maximum allowed value is 100kb.
The diff will still be persisted and expandable if the patch size doesn't
surpass `ApplicationSettings#diff_max_patch_bytes`.
-NOTE: **Note:**
Although this nomenclature (Collapsing) is also used on Gitaly, this limit is only used on GitLab (hardcoded - not sent to Gitaly).
Gitaly will only return `Diff.Collapsed` (RPC) when surpassing collection limits.
@@ -129,7 +127,6 @@ Commit::DIFF_SAFE_LINES = Gitlab::Git::DiffCollection::DEFAULT_LIMITS[:max_lines
File diff will be suppressed (technically different from collapsed, but behaves the same, and is expandable) if it has more than 5000 lines.
-NOTE: **Note:**
This limit is currently hardcoded and only applied on GitLab.
## Viewers
diff --git a/doc/development/distributed_tracing.md b/doc/development/distributed_tracing.md
index 4ddcf62d6d6..6d277f9ae99 100644
--- a/doc/development/distributed_tracing.md
+++ b/doc/development/distributed_tracing.md
@@ -186,7 +186,7 @@ variables for all GitLab processes, including Workhorse, Gitaly, Rails, and Side
### 3. Start the GitLab application
-Once the `GITLAB_TRACING` environment variable is exported to all GitLab services, start the
+After the `GITLAB_TRACING` environment variable is exported to all GitLab services, start the
application.
When `GITLAB_TRACING` is configured properly, the application will log this on startup:
diff --git a/doc/development/documentation/feature_flags.md b/doc/development/documentation/feature_flags.md
index 0f03ceeb4b5..9b4aa20700d 100644
--- a/doc/development/documentation/feature_flags.md
+++ b/doc/development/documentation/feature_flags.md
@@ -30,7 +30,6 @@ See how to document them below, according to the state of the flag:
- [Features that can be enabled or disabled for a single project](#features-enabled-by-project).
- [Features with the feature flag removed](#features-with-flag-removed).
-NOTE: **Note:**
The [`**(CORE ONLY)**`](styleguide.md#product-badges) badge or equivalent for
the feature's tier should be added to the line and heading that refers to
enabling/disabling feature flags as Admin access is required to do so,
diff --git a/doc/development/documentation/site_architecture/global_nav.md b/doc/development/documentation/site_architecture/global_nav.md
index e4aa48edb34..21b0c4b6b43 100644
--- a/doc/development/documentation/site_architecture/global_nav.md
+++ b/doc/development/documentation/site_architecture/global_nav.md
@@ -70,7 +70,6 @@ With these groups in mind, the following are general rules for where new items s
- Other documentation belongs at the top-level, but care must be taken to not create an enormously
long top-level navigation, which defeats the purpose of it.
-NOTE: **Note:**
Making all documentation and navigation items adhere to these principles is being progressively
rolled out.
@@ -117,7 +116,6 @@ for clarity.
To see the improvements planned, check the
[global nav epic](https://gitlab.com/groups/gitlab-com/-/epics/21).
-NOTE: **Note:**
**Do not** [add items](#adding-new-items) to the global nav without
the consent of one of the technical writers.
diff --git a/doc/development/documentation/site_architecture/index.md b/doc/development/documentation/site_architecture/index.md
index 0aa1f2e7163..3772746e25b 100644
--- a/doc/development/documentation/site_architecture/index.md
+++ b/doc/development/documentation/site_architecture/index.md
@@ -230,8 +230,9 @@ for its search function. This is how it works:
there's a JavaScript snippet which initiates DocSearch by using an API key
and an index name (`gitlab`) that are needed for Algolia to show the results.
-NOTE: **For GitLab Team Members:**
-If you’re a GitLab Team Member, find credentials for the Algolia dashboard
+### Algolia notes for GitLab team members
+
+If you’re a GitLab team member, find credentials for the Algolia dashboard
in the shared [GitLab 1Password account](https://about.gitlab.com/handbook/security/#1password-for-teams).
To receive weekly reports of the search usage, search the Google doc with
title `Email, Slack, and GitLab Groups and Aliases`, search for `docsearch`,
diff --git a/doc/development/documentation/site_architecture/release_process.md b/doc/development/documentation/site_architecture/release_process.md
index bb99f2522e0..547adc89a08 100644
--- a/doc/development/documentation/site_architecture/release_process.md
+++ b/doc/development/documentation/site_architecture/release_process.md
@@ -15,7 +15,6 @@ Since the charts use a different version number than all the other GitLab
products, we need to add a
[version mapping](https://docs.gitlab.com/charts/installation/version_mappings.html):
-NOTE: **Note:**
The charts stable branch is not created automatically like the other products.
There's an [issue to track this](https://gitlab.com/gitlab-org/charts/gitlab/-/issues/1442).
It is usually created on the 21st or the 22nd.
@@ -164,7 +163,7 @@ Releasing a new version is a long process that involves many moving parts.
### `test_internal_links_and_anchors` failing on dropdown merge requests
-NOTE: **Note:**
+DANGER: **Deprecated:**
We now pin versions in the `.gitlab-ci.yml` of the respective branch,
so the steps below are deprecated.
diff --git a/doc/development/documentation/structure.md b/doc/development/documentation/structure.md
index e454a401a9d..464729a5573 100644
--- a/doc/development/documentation/structure.md
+++ b/doc/development/documentation/structure.md
@@ -230,7 +230,6 @@ Consider the following guidelines when offering examples:
- Better and best cases can be considered part of the good case(s) code block.
In the same code block, precede each with comments: `# Better` and `# Best`.
-NOTE: **Note:**
Although the bad-then-good approach is acceptable for the GitLab development
guidelines, do not use it for user documentation. For user documentation, use
*Do* and *Don't*. For examples, see the [Pajamas Design System](https://design.gitlab.com/content/punctuation/).
diff --git a/doc/development/documentation/workflow.md b/doc/development/documentation/workflow.md
index ab6ca4d91e6..eb45208c924 100644
--- a/doc/development/documentation/workflow.md
+++ b/doc/development/documentation/workflow.md
@@ -10,7 +10,6 @@ The process for creating and maintaining GitLab product documentation allows
anyone to contribute a merge request or create an issue for GitLab's
documentation.
-NOTE: **Note:**
Documentation updates relating to new features or feature enhancements must
use the [feature workflow process](https://about.gitlab.com/handbook/engineering/ux/technical-writing/workflow/#for-a-product-change) described in the GitLab Handbook.
@@ -165,6 +164,5 @@ Ensure the following if skipping an initial Technical Writer review:
- For [directories and files](styleguide.md#work-with-directories-and-files).
- For [images](styleguide.md#images).
-NOTE: **Note:**
Merge requests that change the location of documentation must always be reviewed by a Technical
Writer prior to merging.
diff --git a/doc/development/fe_guide/editor_lite.md b/doc/development/fe_guide/editor_lite.md
index fbc641a1d15..e4fd7676cef 100644
--- a/doc/development/fe_guide/editor_lite.md
+++ b/doc/development/fe_guide/editor_lite.md
@@ -58,7 +58,7 @@ The editor follows the same public API as [provided by Monaco editor](https://mi
| Function | Arguments | Description
| ----- | ----- | ----- |
| `updateModelLanguage` | `path`: String | Updates the instance's syntax highlighting to follow the extension of the passed `path`. Available only on _instance_ level|
-| `use` | Array of objects | Array of **extensions** to apply to the instance. Note: `use` accepts only the array of _objects_, which means that the extensions' ES6 modules should be fetched and resolved in your views/components before being passed to `use`. This prop is available on _instance_ (applies extension to this particular instance) and _global edtor_ (applies the same extension to all instances) levels. |
+| `use` | Array of objects | Array of **extensions** to apply to the instance. Accepts only the array of _objects_, which means that the extensions' ES6 modules should be fetched and resolved in your views/components before being passed to `use`. This prop is available on _instance_ (applies extension to this particular instance) and _global edtor_ (applies the same extension to all instances) levels. |
| Monaco Editor options | See [documentation](https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.istandalonecodeeditor.html) | Default Monaco editor options |
## Tips
diff --git a/doc/development/fe_guide/frontend_faq.md b/doc/development/fe_guide/frontend_faq.md
index 5881d4f2d4f..61a02c1da12 100644
--- a/doc/development/fe_guide/frontend_faq.md
+++ b/doc/development/fe_guide/frontend_faq.md
@@ -180,10 +180,9 @@ which adds the appropriate `core-js` polyfills once for each JavaScript feature
we're using that our target browsers don't support. You don't need to add `core-js`
polyfills manually.
-NOTE: **Note:**
-GitLab still manually adds non-`core-js` polyfills for extending browser features
-(such as GitLab's SVG polyfill) that allow us reference SVGs by using `<use xlink:href>`.
-These polyfills should be added to `app/assets/javascripts/commons/polyfills.js`.
+GitLab adds non-`core-js` polyfills for extending browser features (such as
+GitLab's SVG polyfill), which allow us to reference SVGs by using `<use xlink:href>`.
+Be sure to add these polyfills to `app/assets/javascripts/commons/polyfills.js`.
To see what polyfills are being used:
diff --git a/doc/development/fe_guide/graphql.md b/doc/development/fe_guide/graphql.md
index a6e5a1b9b12..6879dee9265 100644
--- a/doc/development/fe_guide/graphql.md
+++ b/doc/development/fe_guide/graphql.md
@@ -741,8 +741,8 @@ describe('Some component with Apollo mock', () => {
})
```
-NOTE: **Note:**
-When mocking resolved values, make sure the structure of the response is the same as actual API response: i.e. root property should be `data` for example
+When mocking resolved values, ensure the structure of the response is the same
+as the actual API response. For example, root property should be `data`.
When testing queries, please keep in mind they are promises, so they need to be _resolved_ to render a result. Without resolving, we can check the `loading` state of the query:
diff --git a/doc/development/fe_guide/performance.md b/doc/development/fe_guide/performance.md
index 6fff6faf04f..128b81d4e33 100644
--- a/doc/development/fe_guide/performance.md
+++ b/doc/development/fe_guide/performance.md
@@ -77,9 +77,8 @@ controller with the `index` action. If a corresponding file exists at
`pages/projects/issues/index/index.js`, it will be compiled into a webpack
bundle and included on the page.
-NOTE: **Note:**
-Previously we had encouraged the use of
-`content_for :page_specific_javascripts` within haml files, along with
+Previously, GitLab encouraged the use of
+`content_for :page_specific_javascripts` within HAML files, along with
manually generated webpack bundles. However under this new system you should
not ever need to manually add an entry point to the `webpack.config.js` file.
@@ -97,16 +96,26 @@ browser's developer console while on any page within GitLab.
modules outside of the entry point script. Just import, read the DOM,
instantiate, and nothing else.
-- **Entry Points May Be Asynchronous:**
- _DO NOT ASSUME_ that the DOM has been fully loaded and available when an
- entry point script is run. If you require that some code be run after the
- DOM has loaded, you should attach an event handler to the `DOMContentLoaded`
- event with:
+- **`DOMContentLoaded` should not be used:**
+ All of GitLab's JavaScript files are added with the `defer` attribute.
+ According to the [Mozilla documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#attr-defer),
+ this implies that "the script is meant to be executed after the document has
+ been parsed, but before firing `DOMContentLoaded`". Since the document is already
+ parsed, `DOMContentLoaded` is not needed to bootstrap applications because all
+ the DOM nodes are already at our disposal.
+
+- **JavaScript that relies on CSS for calculations should use [`waitForCSSLoaded()`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/helpers/startup_css_helper.js#L34):**
+ GitLab uses [Startup.css](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/38052)
+ to improve page performance. This can cause issues if JavaScript relies on CSS
+ for calculations. To fix this the JavaScript can be wrapped in the
+ [`waitForCSSLoaded()`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/helpers/startup_css_helper.js#L34)
+ helper function.
```javascript
import initMyWidget from './my_widget';
+ import { waitForCSSLoaded } from '~/helpers/startup_css_helper';
- document.addEventListener('DOMContentLoaded', () => {
+ waitForCSSLoaded(() => {
initMyWidget();
});
```
diff --git a/doc/development/fe_guide/style/javascript.md b/doc/development/fe_guide/style/javascript.md
index 363813da077..b8e7429eb2c 100644
--- a/doc/development/fe_guide/style/javascript.md
+++ b/doc/development/fe_guide/style/javascript.md
@@ -141,7 +141,7 @@ module.exports = SomeClass;
export default SomeClass;
```
-_Note:_ We still use `require` in `scripts/` and `config/` files.
+We still use `require` in `scripts/` and `config/` files.
## Absolute vs relative paths for modules
diff --git a/doc/development/fe_guide/style/vue.md b/doc/development/fe_guide/style/vue.md
index c2f6b1e1b8f..4588117f51d 100644
--- a/doc/development/fe_guide/style/vue.md
+++ b/doc/development/fe_guide/style/vue.md
@@ -190,7 +190,7 @@ Please check this [rules](https://github.com/vuejs/eslint-plugin-vue#bulb-rules)
```
1. Default key should be provided if the prop is not required.
- _Note:_ There are some scenarios where we need to check for the existence of the property.
+ There are some scenarios where we need to check for the existence of the property.
On those a default key should not be provided.
```javascript
@@ -409,7 +409,7 @@ Useful links:
## Vue testing
Over time, a number of programming patterns and style preferences have emerged in our efforts to effectively test Vue components.
-The following guide describes some of these. **These are not strict guidelines**, but rather a collection of suggestions and
+The following guide describes some of these. **These are not strict guidelines**, but rather a collection of suggestions and
good practices that aim to provide insight into how we write Vue tests at GitLab.
### Mounting a component
@@ -425,7 +425,7 @@ To achieve this:
Creating a global, mutable wrapper provides a number of advantages, including the ability to:
- Define common functions for finding components/DOM elements:
-
+
```javascript
import MyComponent from '~/path/to/my_component.vue';
describe('MyComponent', () => {
@@ -533,8 +533,8 @@ the mounting function (`mount` or `shallowMount`) to be used to mount the compon
### Setting component state
-1. Avoid using [`setProps`](https://vue-test-utils.vuejs.org/api/wrapper/#setprops) to set
-component state wherever possible. Instead, set the component's
+1. Avoid using [`setProps`](https://vue-test-utils.vuejs.org/api/wrapper/#setprops) to set
+component state wherever possible. Instead, set the component's
[`propsData`](https://vue-test-utils.vuejs.org/api/options.html#propsdata) when mounting the component:
```javascript
diff --git a/doc/development/fe_guide/tooling.md b/doc/development/fe_guide/tooling.md
index 24984b29b28..809e05ea61f 100644
--- a/doc/development/fe_guide/tooling.md
+++ b/doc/development/fe_guide/tooling.md
@@ -20,7 +20,7 @@ To check all currently staged files (based on `git diff`) with ESLint, run the f
yarn eslint-staged
```
-_A list of problems found will be logged to the console._
+A list of problems found will be logged to the console.
To apply automatic ESLint fixes to all currently staged files (based on `git diff`), run the following script:
@@ -28,7 +28,7 @@ To apply automatic ESLint fixes to all currently staged files (based on `git dif
yarn eslint-staged-fix
```
-_If manual changes are required, a list of changes will be sent to the console._
+If manual changes are required, a list of changes will be sent to the console.
To check **all** files in the repository with ESLint, run the following script:
@@ -36,7 +36,7 @@ To check **all** files in the repository with ESLint, run the following script:
yarn eslint
```
-_A list of problems found will be logged to the console._
+A list of problems found will be logged to the console.
To apply automatic ESLint fixes to **all** files in the repository, run the following script:
@@ -44,7 +44,7 @@ To apply automatic ESLint fixes to **all** files in the repository, run the foll
yarn eslint-fix
```
-_If manual changes are required, a list of changes will be sent to the console._
+If manual changes are required, a list of changes will be sent to the console.
CAUTION: **Caution:**
Limit use to global rule updates. Otherwise, the changes can lead to huge Merge Requests.
@@ -60,9 +60,8 @@ rules only if you are invoking/instantiating existing code modules.
- [`no-new`](https://eslint.org/docs/rules/no-new)
- [`class-method-use-this`](https://eslint.org/docs/rules/class-methods-use-this)
-NOTE: **Note:**
-Disable these rules on a per-line basis. This makes it easier to refactor
-in the future. E.g. use `eslint-disable-next-line` or `eslint-disable-line`.
+Disable these rules on a per-line basis. This makes it easier to refactor in the
+future. For example, use `eslint-disable-next-line` or `eslint-disable-line`.
### Disabling ESLint for a single violation
diff --git a/doc/development/fe_guide/vue.md b/doc/development/fe_guide/vue.md
index 2a9e35da116..1f5072ea330 100644
--- a/doc/development/fe_guide/vue.md
+++ b/doc/development/fe_guide/vue.md
@@ -62,7 +62,7 @@ Be sure to read about [page-specific JavaScript](./performance.md#page-specific-
While mounting a Vue application, you might need to provide data from Rails to JavaScript.
To do that, you can use the `data` attributes in the HTML element and query them while mounting the application.
-_Note:_ You should only do this while initializing the application, because the mounted element will be replaced with Vue-generated DOM.
+You should only do this while initializing the application, because the mounted element will be replaced with Vue-generated DOM.
The advantage of providing data from the DOM to the Vue instance through `props` in the `render` function
instead of querying the DOM inside the main Vue component is avoiding the need to create a fixture or an HTML element in the unit test,
@@ -235,7 +235,7 @@ describe('~/todos/app.vue', () => {
mock.restore();
});
- // NOTE: It is very helpful to separate setting up the component from
+ // It is very helpful to separate setting up the component from
// its collaborators (i.e. Vuex, axios, etc.)
const createWrapper = (props = {}) => {
wrapper = shallowMount(App, {
@@ -245,7 +245,7 @@ describe('~/todos/app.vue', () => {
},
});
};
- // NOTE: Helper methods greatly help test maintainability and readability.
+ // Helper methods greatly help test maintainability and readability.
const findLoader = () => wrapper.find(GlLoadingIcon);
const findAddButton = () => wrapper.find('[data-testid="add-button"]');
const findTextInput = () => wrapper.find('[data-testid="text-input"]');
diff --git a/doc/development/fe_guide/vue3_migration.md b/doc/development/fe_guide/vue3_migration.md
index fd7fc317b6d..46437f39dbe 100644
--- a/doc/development/fe_guide/vue3_migration.md
+++ b/doc/development/fe_guide/vue3_migration.md
@@ -82,7 +82,6 @@ const FunctionalComp = (props, slots) => {
}
```
-NOTE: **Note:**
It is not recommended to replace stateful components with functional components unless you absolutely need a performance improvement right now. In Vue 3, performance gains for functional components will be negligible.
## Old slots syntax with `slot` attribute
diff --git a/doc/development/fe_guide/vuex.md b/doc/development/fe_guide/vuex.md
index e3a01aef523..fb64095bbaa 100644
--- a/doc/development/fe_guide/vuex.md
+++ b/doc/development/fe_guide/vuex.md
@@ -15,14 +15,14 @@ Vuex should be strongly considered when:
- There are complex interactions with Backend, e.g. multiple API calls
- The app involves interacting with backend via both traditional REST API and GraphQL (especially when moving the REST API over to GraphQL is a pending backend task)
-_Note:_ All of the below is explained in more detail in the official [Vuex documentation](https://vuex.vuejs.org).
+The information included in this page is explained in more detail in the
+official [Vuex documentation](https://vuex.vuejs.org).
## Separation of concerns
Vuex is composed of State, Getters, Mutations, Actions, and Modules.
-When a user clicks on an action, we need to `dispatch` it. This action will `commit` a mutation that will change the state.
-_Note:_ The action itself will not update the state, only a mutation should update the state.
+When a user clicks on an action, we need to `dispatch` it. This action will `commit` a mutation that will change the state. The action itself will not update the state; only a mutation should update the state.
## File structure
@@ -66,7 +66,7 @@ export const createStore = () =>
The first thing you should do before writing any code is to design the state.
-Often we need to provide data from haml to our Vue application. Let's store it in the state for better access.
+Often we need to provide data from HAML to our Vue application. Let's store it in the state for better access.
```javascript
export default () => ({
diff --git a/doc/development/feature_flags/controls.md b/doc/development/feature_flags/controls.md
index bd399e0a100..df737912c00 100644
--- a/doc/development/feature_flags/controls.md
+++ b/doc/development/feature_flags/controls.md
@@ -213,7 +213,6 @@ actors.
Feature.enabled?(:some_feature, group)
```
-NOTE: **Note:**
**Percentage of time** rollout is not a good idea if what you want is to make sure a feature
is always on or off to the users. In that case, **Percentage of actors** rollout is a better method.
diff --git a/doc/development/feature_flags/development.md b/doc/development/feature_flags/development.md
index 8383c3a2b09..2855662e1db 100644
--- a/doc/development/feature_flags/development.md
+++ b/doc/development/feature_flags/development.md
@@ -35,7 +35,6 @@ used so that unfinished code can be deployed in production.
A `development` feature flag should have a rollout issue,
ideally created using the [Feature Flag Roll Out template](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/issue_templates/Feature%20Flag%20Roll%20Out.md).
-NOTE: **Note:**
This is the default type used when calling `Feature.enabled?`.
### `ops` type
@@ -356,7 +355,6 @@ Introducing a feature flag into the codebase creates an additional code path tha
It is strongly advised to test all code affected by a feature flag, both when **enabled** and **disabled**
to ensure the feature works properly.
-NOTE: **Note:**
When using the testing environment, all feature flags are enabled by default.
To disable a feature flag in a test, use the `stub_feature_flags`
diff --git a/doc/development/feature_flags/index.md b/doc/development/feature_flags/index.md
index 2643571aec3..a867bcf792a 100644
--- a/doc/development/feature_flags/index.md
+++ b/doc/development/feature_flags/index.md
@@ -1,5 +1,4 @@
---
-type: index, dev
stage: none
group: Development
info: "See the Technical Writers assigned to Development Guidelines: https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments-to-development-guidelines"
diff --git a/doc/development/file_storage.md b/doc/development/file_storage.md
index 2b8f657a1e0..aa91e105513 100644
--- a/doc/development/file_storage.md
+++ b/doc/development/file_storage.md
@@ -56,10 +56,10 @@ In the case of Issues/MR/Notes Markdown attachments, there is a different approa
instead of basing the path into a mutable variable `:project_path_with_namespace`, it's possible to use the
hash of the project ID instead, if project migrates to the new approach (introduced in 10.2).
-> Note: We provide an [all-in-one Rake task](../administration/raketasks/uploads/migrate.md) to migrate all uploads to object
-> storage in one go. If a new Uploader class or model type is introduced, make
-> sure you add a Rake task invocation corresponding to it to the
-> [category list](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/tasks/gitlab/uploads/migrate.rake).
+We provide an [all-in-one Rake task](../administration/raketasks/uploads/migrate.md)
+to migrate all uploads to object storage in one go. If a new Uploader class or model
+type is introduced, make sure you add a Rake task invocation corresponding to it to the
+[category list](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/tasks/gitlab/uploads/migrate.rake).
### Path segments
@@ -107,7 +107,7 @@ The `CarrierWave::Uploader#store_dir` is overridden to
### Using `ObjectStorage::Extension::RecordsUploads`
-> Note: this concern will automatically include `RecordsUploads::Concern` if not already included.
+This concern will automatically include `RecordsUploads::Concern` if not already included.
The `ObjectStorage::Concern` uploader will search for the matching `Upload` to select the correct object store. The `Upload` is mapped using `#store_dirs + identifier` for each store (LOCAL/REMOTE).
diff --git a/doc/development/gotchas.md b/doc/development/gotchas.md
index 07cbfbaf2f3..691027f385f 100644
--- a/doc/development/gotchas.md
+++ b/doc/development/gotchas.md
@@ -163,7 +163,7 @@ allow_next_found_instance_of(Project) do |project|
end
```
-_**Note:** Since Active Record is not calling the `.new` method on model classes to instantiate the objects,
+Since Active Record is not calling the `.new` method on model classes to instantiate the objects,
you should use `expect_next_found_instance_of` or `allow_next_found_instance_of` mock helpers to setup mock on objects returned by Active Record query & finder methods._
If we also want to initialize the instance with some particular arguments, we
@@ -188,7 +188,7 @@ refresh_service.execute(oldrev, newrev, ref)
See ["Why is it bad style to `rescue Exception => e` in Ruby?"](https://stackoverflow.com/questions/10048173/why-is-it-bad-style-to-rescue-exception-e-in-ruby).
-_**Note:** This rule is [enforced automatically by
+This rule is [enforced automatically by
RuboCop](https://gitlab.com/gitlab-org/gitlab-foss/blob/8-4-stable/.rubocop.yml#L911-914)._
## Do not use inline JavaScript in views
@@ -196,8 +196,8 @@ RuboCop](https://gitlab.com/gitlab-org/gitlab-foss/blob/8-4-stable/.rubocop.yml#
Using the inline `:javascript` Haml filters comes with a
performance overhead. Using inline JavaScript is not a good way to structure your code and should be avoided.
-_**Note:** We've [removed these two filters](https://gitlab.com/gitlab-org/gitlab/blob/master/config/initializers/hamlit.rb)
-in an initializer._
+We've [removed these two filters](https://gitlab.com/gitlab-org/gitlab/blob/master/config/initializers/hamlit.rb)
+in an initializer.
### Further reading
diff --git a/doc/development/i18n/externalization.md b/doc/development/i18n/externalization.md
index 7fbde3036a6..abdaa681230 100644
--- a/doc/development/i18n/externalization.md
+++ b/doc/development/i18n/externalization.md
@@ -21,7 +21,7 @@ All `rake` commands described on this page must be run on a GitLab instance, usu
In order to be able to work on the [GitLab Community Edition](https://gitlab.com/gitlab-org/gitlab-foss)
project you must download and configure it through [GDK](https://gitlab.com/gitlab-org/gitlab-development-kit/blob/master/doc/set-up-gdk.md).
-Once you have the GitLab project ready, you can start working on the translation.
+After you have the GitLab project ready, you can start working on the translation.
## Tools
@@ -104,9 +104,8 @@ Active Record's `:message` option accepts a `Proc`, so we can do this instead:
validates :group_id, uniqueness: { scope: [:project_id], message: -> (object, data) { _("already shared with this group") } }
```
-NOTE: **Note:**
Messages in the API (`lib/api/` or `app/graphql`) do
-not need to be externalised.
+not need to be externalized.
### HAML files
@@ -385,8 +384,8 @@ Namespaces should be PascalCase.
s__('OpenedNDaysAgo|Opened')
```
-Note: The namespace should be removed from the translation. See the [translation
-guidelines for more details](translation.md#namespaced-strings).
+The namespace should be removed from the translation. See the
+[translation guidelines for more details](translation.md#namespaced-strings).
### HTML
diff --git a/doc/development/i18n/proofreader.md b/doc/development/i18n/proofreader.md
index 74a8267354a..a124bddb357 100644
--- a/doc/development/i18n/proofreader.md
+++ b/doc/development/i18n/proofreader.md
@@ -121,10 +121,8 @@ are very appreciative of the work done by translators and proofreaders!
## Become a proofreader
-NOTE: **Note:**
-Before requesting Proofreader permissions in CrowdIn please make
-sure that you have a history of contributing translations to the GitLab
-project.
+Before requesting Proofreader permissions in CrowdIn, be sure you have a history
+of contributing translations to the GitLab project.
1. Contribute translations to GitLab. See instructions for
[translating GitLab](translation.md).
@@ -146,8 +144,8 @@ project.
- link to your GitLab profile
- link to your CrowdIn profile
- In the merge request description, please include links to any projects you
- have previously translated.
+ In the merge request description, include links to any projects you have
+ previously translated.
1. Your request to become a proofreader will be considered on the merits of
your previous translations by [GitLab team members](https://about.gitlab.com/company/team/)
diff --git a/doc/development/import_project.md b/doc/development/import_project.md
index 5fca76bc9a8..8b27b7d28a5 100644
--- a/doc/development/import_project.md
+++ b/doc/development/import_project.md
@@ -23,7 +23,6 @@ The first option is to simply [import the Project tarball file via the GitLab UI
It should take up to 15 minutes for the project to fully import. You can head to the project's main page for the current status.
-NOTE: **Note:**
This method ignores all the errors silently (including the ones related to `GITALY_DISABLE_REQUEST_LIMITS`) and is used by GitLab's users. For development and testing, check the other methods below.
### Importing via the `import-project` script
diff --git a/doc/development/licensing.md b/doc/development/licensing.md
index b56b657af64..d1808822ba6 100644
--- a/doc/development/licensing.md
+++ b/doc/development/licensing.md
@@ -18,7 +18,8 @@ Some gems may not include their license information in their `gemspec` file, and
### License Finder commands
-> Note: License Finder currently uses GitLab misused terms of `whitelist` and `blacklist`. As a result, the commands below reference those terms. We've created an [issue on their project](https://github.com/pivotal/LicenseFinder/issues/745) to propose that they rename their commands.
+NOTE: **Note:**
+License Finder currently uses GitLab misused terms of `whitelist` and `blacklist`. As a result, the commands below reference those terms. We've created an [issue on their project](https://github.com/pivotal/LicenseFinder/issues/745) to propose that they rename their commands.
There are a few basic commands License Finder provides that you'll need in order to manage license detection.
diff --git a/doc/development/migration_style_guide.md b/doc/development/migration_style_guide.md
index 2fb4c96d6bf..b446f83d2b3 100644
--- a/doc/development/migration_style_guide.md
+++ b/doc/development/migration_style_guide.md
@@ -382,8 +382,7 @@ Example changes:
- `change_column_default`
- `create_table` / `drop_table`
-NOTE: **Note:**
-`with_lock_retries` method **cannot** be used within the `change` method, you must manually define the `up` and `down` methods to make the migration reversible.
+The `with_lock_retries` method **cannot** be used within the `change` method, you must manually define the `up` and `down` methods to make the migration reversible.
### How the helper method works
@@ -443,7 +442,6 @@ the `with_multiple_threads` block, instead of re-using the global connection
pool. This ensures each thread has its own connection object, and won't time
out when trying to obtain one.
-NOTE: **Note:**
PostgreSQL has a maximum amount of connections that it allows. This
limit can vary from installation to installation. As a result, it's recommended
you do not use more than 32 threads in a single migration. Usually, 4-8 threads
@@ -618,7 +616,6 @@ Before PostgreSQL 11, adding a column with a default was problematic as it would
have caused a full table rewrite. The corresponding helper `add_column_with_default`
has been deprecated and will be removed in a later release.
-NOTE: **Note:**
If a backport adding a column with a default value is needed for %12.9 or earlier versions,
it should use `add_column_with_default` helper. If a [large table](https://gitlab.com/gitlab-org/gitlab/-/blob/master/rubocop/rubocop-migrations.yml#L3)
is involved, backporting to %12.9 is contraindicated.
@@ -964,7 +961,6 @@ in a previous migration.
### Example: Add a column `my_column` to the users table
-NOTE: **Note:**
It is important not to leave out the `User.reset_column_information` command, in order to ensure that the old schema is dropped from the cache and ActiveRecord loads the updated schema information.
```ruby
diff --git a/doc/development/new_fe_guide/development/accessibility.md b/doc/development/new_fe_guide/development/accessibility.md
index a714b5fbe57..1189dd1137b 100644
--- a/doc/development/new_fe_guide/development/accessibility.md
+++ b/doc/development/new_fe_guide/development/accessibility.md
@@ -12,7 +12,7 @@ Using semantic HTML plays a key role when it comes to accessibility.
WAI-ARIA (the Accessible Rich Internet Applications specification) defines a way to make Web content and Web applications more accessible to people with disabilities.
-> Note: It is [recommended](https://www.w3.org/TR/using-aria/#notes2) to use semantic elements as the primary method to achieve accessibility rather than adding aria attributes. Adding aria attributes should be seen as a secondary method for creating accessible elements.
+The W3C recommends [using semantic elements](https://www.w3.org/TR/using-aria/#notes2) as the primary method to achieve accessibility rather than adding aria attributes. Adding aria attributes should be seen as a secondary method for creating accessible elements.
### Role
diff --git a/doc/development/ordering_table_columns.md b/doc/development/ordering_table_columns.md
index c6fcbd7d60f..4332e1b1f8f 100644
--- a/doc/development/ordering_table_columns.md
+++ b/doc/development/ordering_table_columns.md
@@ -51,7 +51,6 @@ In these examples, the `id` and `user_id` columns are packed together, which
means we only need 8 bytes to store _both_ of them. This in turn means each row
will require 8 bytes less space.
-Note: **NOTE:**
Since Ruby on Rails 5.1, the default data type for IDs is `bigint`, which uses 8 bytes.
We are using `integer` in the examples to showcase a more realistic reordering scenario.
diff --git a/doc/development/profiling.md b/doc/development/profiling.md
index 4edd34c3aff..6e1b81e659d 100644
--- a/doc/development/profiling.md
+++ b/doc/development/profiling.md
@@ -16,7 +16,6 @@ There is a `Gitlab::Profiler.profile` method, and corresponding
`bin/profile-url` script, that enable profiling a GET or POST request to a
specific URL, either as an anonymous user (the default) or as a specific user.
-NOTE: **Note:**
The first argument to the profiler is either a full URL
(including the instance hostname) or an absolute path, including the
leading slash.
diff --git a/doc/development/query_recorder.md b/doc/development/query_recorder.md
index ae5c2947d40..fb87e5137e5 100644
--- a/doc/development/query_recorder.md
+++ b/doc/development/query_recorder.md
@@ -26,7 +26,6 @@ end
As an example you might create 5 issues in between counts, which would cause the query count to increase by 5 if an N+1 problem exists.
-NOTE: **Note:**
In some cases the query count might change slightly between runs for unrelated reasons. In this case you might need to test `exceed_query_limit(control_count + acceptable_change)`, but this should be avoided if possible.
## Cached queries
diff --git a/doc/development/rake_tasks.md b/doc/development/rake_tasks.md
index c718d5654dc..2dca747425c 100644
--- a/doc/development/rake_tasks.md
+++ b/doc/development/rake_tasks.md
@@ -18,7 +18,7 @@ bundle exec rake setup
The `setup` task is an alias for `gitlab:setup`.
This tasks calls `db:reset` to create the database, and calls `db:seed_fu` to seed the database.
-Note: `db:setup` calls `db:seed` but this does nothing.
+`db:setup` calls `db:seed` but this does nothing.
### Environment variables
diff --git a/doc/development/reference_processing.md b/doc/development/reference_processing.md
index eec8a176c5f..b74419ee5b6 100644
--- a/doc/development/reference_processing.md
+++ b/doc/development/reference_processing.md
@@ -13,7 +13,6 @@ abstractions in the `Banzai` pipeline: `ReferenceFilter` and `ReferenceParser`.
This page explains what these are, how they are used, and how you would
implement a new filter/parser pair.
-NOTE: **Note:**
Each `ReferenceFilter` must have a corresponding `ReferenceParser`.
It is possible to share reference parsers between filters - if two filters find
@@ -199,6 +198,5 @@ In practice, all reference parsers inherit from [`BaseParser`](https://gitlab.co
- `#references_relation` an active record relation for objects by ID.
- `#nodes_user_can_reference(user, nodes)` to filter nodes directly.
-NOTE: **Note:**
A failure to implement this class for each reference type means that the
application will raise exceptions during Markdown processing.
diff --git a/doc/development/secure_coding_guidelines.md b/doc/development/secure_coding_guidelines.md
index 2ab9aef87d8..5575a70c71a 100644
--- a/doc/development/secure_coding_guidelines.md
+++ b/doc/development/secure_coding_guidelines.md
@@ -219,11 +219,11 @@ the mitigations for a new feature.
- [More details](https://dev.gitlab.org/gitlab/gitlabhq/-/merge_requests/2530/diffs)
-#### Feature-specific Mitigations
+#### Feature-specific mitigations
For situations in which an allowlist or GitLab:HTTP cannot be used, it will be necessary to implement mitigations directly in the feature. It is best to validate the destination IP addresses themselves, not just domain names, as DNS can be controlled by the attacker. Below are a list of mitigations that should be implemented.
-**Important Note:** There are many tricks to bypass common SSRF validations. If feature-specific mitigations are necessary, they should be reviewed by the AppSec team, or a developer who has worked on SSRF mitigations previously.
+There are many tricks to bypass common SSRF validations. If feature-specific mitigations are necessary, they should be reviewed by the AppSec team, or a developer who has worked on SSRF mitigations previously.
- Block connections to all localhost addresses
- `127.0.0.1/8` (IPv4 - note the subnet mask)
@@ -429,9 +429,8 @@ The Path Traversal check can also be used to forbid any absolute path:
requires :file_path, type: String, file_path: true
```
-NOTE: **Note:**
Absolute paths are not allowed by default. If allowing an absolute path is required, you
-need to provide an array of paths to the parameter `allowlist`.
+need to provide an array of paths to the parameter `allowlist`.
## OS command injection guidelines
diff --git a/doc/development/service_measurement.md b/doc/development/service_measurement.md
index 5516afe6720..571bbddb494 100644
--- a/doc/development/service_measurement.md
+++ b/doc/development/service_measurement.md
@@ -22,7 +22,6 @@ The measuring module is a tool that allows to measure a service's execution, and
The measuring module will log these measurements into a structured log called [`service_measurement.log`](../administration/logs.md#service_measurementlog),
as a single entry for each service execution.
-NOTE: **Note:**
For GitLab.com, `service_measurement.log` is ingested in Elasticsearch and Kibana as part of our monitoring solution.
## How to use it
@@ -70,9 +69,8 @@ def extra_attributes_for_measurement
end
```
-NOTE: **Note:**
-Once the measurement module is injected in the service, it will be behind generic feature flag.
-In order to actually use it, you need to enable measuring for the desired service by enabling the feature flag.
+After the measurement module is injected in the service, it will be behind a generic feature flag.
+To actually use it, you need to enable measuring for the desired service by enabling the feature flag.
### Enabling measurement using feature flags
diff --git a/doc/development/sidekiq_style_guide.md b/doc/development/sidekiq_style_guide.md
index 1094505e00a..dbd69543f9c 100644
--- a/doc/development/sidekiq_style_guide.md
+++ b/doc/development/sidekiq_style_guide.md
@@ -118,7 +118,6 @@ As a general rule, a worker can be considered idempotent if:
A good example of that would be a cache expiration worker.
-NOTE: **Note:**
A job scheduled for an idempotent worker will automatically be
[deduplicated](#deduplication) when an unstarted job with the same
arguments is already in the queue.
@@ -158,7 +157,6 @@ end
It's encouraged to only have the `idempotent!` call in the top-most worker class, even if
the `perform` method is defined in another class or module.
-NOTE: **Note:**
If the worker class is not marked as idempotent, a cop will fail.
Consider skipping the cop if you're not confident your job can safely
run multiple times.
@@ -484,9 +482,7 @@ class ExternalDependencyWorker
end
```
-NOTE: **Note:**
-Note that a job cannot be both high urgency and have
-external dependencies.
+A job cannot be both high urgency and have external dependencies.
## CPU-bound and Memory-bound Workers
diff --git a/doc/development/testing_guide/best_practices.md b/doc/development/testing_guide/best_practices.md
index 2c1d70a005e..dabb18c1f75 100644
--- a/doc/development/testing_guide/best_practices.md
+++ b/doc/development/testing_guide/best_practices.md
@@ -361,7 +361,7 @@ Finished in 34.51 seconds (files took 0.76702 seconds to load)
1 example, 0 failures
```
-Note: `live_debug` only works on JavaScript enabled specs.
+`live_debug` only works on JavaScript enabled specs.
#### Run `:js` spec in a visible browser
@@ -584,9 +584,9 @@ this trait should be either fixed to not rely on Sidekiq processing jobs, or the
`:sidekiq_might_not_need_inline` trait should be updated to `:sidekiq_inline` if
the processing of background jobs is needed/expected.
-NOTE: **Note:**
-The usage of `perform_enqueued_jobs` is only useful for testing delayed mail
-deliveries since our Sidekiq workers aren't inheriting from `ApplicationJob` / `ActiveJob::Base`.
+The usage of `perform_enqueued_jobs` is useful only for testing delayed mail
+deliveries, because our Sidekiq workers aren't inheriting from `ApplicationJob`
+/ `ActiveJob::Base`.
#### DNS
diff --git a/doc/development/testing_guide/end_to_end/beginners_guide.md b/doc/development/testing_guide/end_to_end/beginners_guide.md
index 497fc822de1..ef0bd9902e1 100644
--- a/doc/development/testing_guide/end_to_end/beginners_guide.md
+++ b/doc/development/testing_guide/end_to_end/beginners_guide.md
@@ -58,7 +58,6 @@ Check both [GitLab Community Edition](https://gitlab-org.gitlab.io/gitlab-foss/c
for previously-written tests for this feature. For analyzing the code coverage,
you must understand which application files implement specific features.
-NOTE: **Note:**
In this tutorial we're writing a login end-to-end test, even though it has been
sufficiently covered by lower-level testing, because it's the first step for most
end-to-end flows, and is easiest to understand.
@@ -74,7 +73,6 @@ under the stage.
![DevOps lifecycle by stages](img/gl-devops-lifecycle-by-stage-numbers_V12_10.png)
-NOTE: **Note:**
If the test is Enterprise Edition only, the test will be created in the `features/ee`
directory, but follow the same DevOps lifecycle format.
@@ -210,7 +208,6 @@ end
1. Check if the user avatar appears in the top navigation.
1. Check if the user avatar *does not* appear in the top navigation.
-NOTE: **Note:**
Behind the scenes, `be_signed_in` is a
[predicate matcher](https://relishapp.com/rspec/rspec-expectations/v/3-8/docs/built-in-matchers/predicate-matchers)
that [implements checking the user avatar](https://gitlab.com/gitlab-org/gitlab/-/blob/master/qa/qa/page/main/menu.rb#L74).
diff --git a/doc/development/testing_guide/end_to_end/best_practices.md b/doc/development/testing_guide/end_to_end/best_practices.md
index b052ea81b26..792e5ef1d6f 100644
--- a/doc/development/testing_guide/end_to_end/best_practices.md
+++ b/doc/development/testing_guide/end_to_end/best_practices.md
@@ -6,7 +6,6 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# End-to-end testing Best Practices
-NOTE: **Note:**
This is a tailored extension of the Best Practices [found in the testing guide](../best_practices.md).
## Link a test to its test-case issue
@@ -269,7 +268,7 @@ We don't run tests that require Administrator access against our Production envi
When you add a new test that requires Administrator access, apply the RSpec metadata `:requires_admin` so that the test will not be included in the test suites executed against Production and other environments on which we don't want to run those tests.
-Note: When running tests locally or configuring a pipeline, the environment variable `QA_CAN_TEST_ADMIN_FEATURES` can be set to `false` to skip tests that have the `:requires_admin` tag.
+When running tests locally or configuring a pipeline, the environment variable `QA_CAN_TEST_ADMIN_FEATURES` can be set to `false` to skip tests that have the `:requires_admin` tag.
## Prefer `Commit` resource over `ProjectPush`
@@ -294,7 +293,6 @@ Resource::Repository::ProjectPush.fabricate! do |push|
end
```
-NOTE: **Note:**
A few exceptions for using a `ProjectPush` would be when your test calls for testing SSH integration or
using the Git CLI.
diff --git a/doc/development/testing_guide/end_to_end/environment_selection.md b/doc/development/testing_guide/end_to_end/environment_selection.md
index c369804928d..f5e3e99b79e 100644
--- a/doc/development/testing_guide/end_to_end/environment_selection.md
+++ b/doc/development/testing_guide/end_to_end/environment_selection.md
@@ -55,7 +55,6 @@ RSpec.describe 'Area' do
end
```
-NOTE: **Note:**
If the test has a `before` or `after`, you must add the `only` metadata
to the outer `RSpec.describe`.
diff --git a/doc/development/testing_guide/frontend_testing.md b/doc/development/testing_guide/frontend_testing.md
index dd37c2c89fa..b8c4b4562ce 100644
--- a/doc/development/testing_guide/frontend_testing.md
+++ b/doc/development/testing_guide/frontend_testing.md
@@ -30,7 +30,6 @@ We have started to migrate frontend tests to the [Jest](https://jestjs.io) testi
Jest tests can be found in `/spec/frontend` and `/ee/spec/frontend` in EE.
-NOTE: **Note:**
Most examples have a Jest and Karma example. See the Karma examples only as explanation to what's going on in the code, should you stumble over some use cases during your discovery. The Jest examples are the one you should follow.
## Karma test suite
@@ -311,7 +310,6 @@ it('tests a promise rejection', async () => {
You can also simply return a promise from the test function.
-NOTE: **Note:**
Using the `done` and `done.fail` callbacks is discouraged when working with
promises. They should only be used when testing callback-based code.
diff --git a/doc/development/testing_guide/testing_migrations_guide.md b/doc/development/testing_guide/testing_migrations_guide.md
index cf0e26d84b1..b944c7ed406 100644
--- a/doc/development/testing_guide/testing_migrations_guide.md
+++ b/doc/development/testing_guide/testing_migrations_guide.md
@@ -239,6 +239,5 @@ describe Gitlab::BackgroundMigration::ArchiveLegacyTraces, schema: 2018052915262
end
```
-NOTE: **Note:**
These tests do not run within a database transaction, as we use a deletion database
cleanup strategy. Do not depend on a transaction being present.
diff --git a/doc/development/uploads.md b/doc/development/uploads.md
index b0c7bc85605..67979ebaba3 100644
--- a/doc/development/uploads.md
+++ b/doc/development/uploads.md
@@ -220,7 +220,6 @@ In this setup, an extra Rails route must be implemented in order to handle autho
and [its routes](https://gitlab.com/gitlab-org/gitlab/blob/cc723071ad337573e0360a879cbf99bc4fb7adb9/config/routes/git_http.rb#L31-32).
- [API endpoints for uploading packages](packages.md#file-uploads).
-Note: **Note:**
This will fallback to _disk buffered upload_ when `direct_upload` is disabled inside the [object storage setting](../administration/uploads.md#object-storage-settings).
The answer to the `/authorize` call will only contain a file system path.
diff --git a/doc/development/value_stream_analytics.md b/doc/development/value_stream_analytics.md
index 4005718bfda..90d7597d46f 100644
--- a/doc/development/value_stream_analytics.md
+++ b/doc/development/value_stream_analytics.md
@@ -59,8 +59,8 @@ def timestamp_projection
end
```
-NOTE: **Note:**
-More complex expressions are also possible (e.g. using `COALESCE`). Look at the existing event classes for examples.
+More complex expressions are also possible (for example, using `COALESCE`).
+Review the existing event classes for examples.
In some cases, defining the `timestamp_projection` method is not enough. The calculation query should know which table contains the timestamp expression. Each `Event` class is responsible for making modifications to the calculation query to make the `timestamp_projection` work. This usually means joining an additional table.
diff --git a/doc/development/what_requires_downtime.md b/doc/development/what_requires_downtime.md
index e30addaad54..484437f1907 100644
--- a/doc/development/what_requires_downtime.md
+++ b/doc/development/what_requires_downtime.md
@@ -106,13 +106,12 @@ class RenameUsersUpdatedAtToUpdatedAtTimestamp < ActiveRecord::Migration[4.2]
end
```
-This will take care of renaming the column, ensuring data stays in sync, copying
-over indexes and foreign keys, etc.
+This will take care of renaming the column, ensuring data stays in sync, and
+copying over indexes and foreign keys.
-NOTE: **Note:**
-If a column contains 1 or more indexes that do not contain the name of
-the original column, the above procedure will fail. In this case you will first
-need to rename these indexes.
+If a column contains one or more indexes that don't contain the name of the
+original column, the previously described procedure will fail. In that case,
+you'll first need to rename these indexes.
### Step 2: Add A Post-Deployment Migration
@@ -137,7 +136,6 @@ class CleanupUsersUpdatedAtRename < ActiveRecord::Migration[4.2]
end
```
-NOTE: **Note:**
If you're renaming a [large table](https://gitlab.com/gitlab-org/gitlab/-/blob/master/rubocop/rubocop-migrations.yml#L3), please carefully consider the state when the first migration has run but the second cleanup migration hasn't been run yet.
With [Canary](https://gitlab.com/gitlab-com/gl-infra/readiness/-/tree/master/library/canary/) it is possible that the system runs in this state for a significant amount of time.
@@ -148,7 +146,7 @@ done without requiring downtime. However, this does require that any application
changes are deployed _first_. Thus, changing the constraints of a column should
happen in a post-deployment migration.
-NOTE: Avoid using `change_column` as it produces an inefficient query because it re-defines
+Avoid using `change_column` as it produces an inefficient query because it re-defines
the whole column type.
You can check the following guides for each specific use case:
diff --git a/doc/operations/incident_management/alert_integrations.md b/doc/operations/incident_management/alert_integrations.md
index 58c1e1eae76..2cc33e9c243 100644
--- a/doc/operations/incident_management/alert_integrations.md
+++ b/doc/operations/incident_management/alert_integrations.md
@@ -141,6 +141,12 @@ If the existing alert is already `resolved`, GitLab creates a new alert instead.
## Link to your Opsgenie Alerts
+DANGER: **Deprecated:**
+We are building deeper integration with Opsgenie and other alerting tools through
+[HTTP endpoint integrations](#generic-http-endpoint) so you can see alerts within
+the GitLab interface. As a result, the previous direct link to Opsgenie Alerts from
+the GitLab alerts list will be deprecated following the 13.7 release on December 22, 2020.
+
> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/3066) in [GitLab Premium](https://about.gitlab.com/pricing/) 13.2.
You can monitor alerts using a GitLab integration with [Opsgenie](https://www.atlassian.com/software/opsgenie).
diff --git a/doc/subscriptions/self_managed/index.md b/doc/subscriptions/self_managed/index.md
index e03a863f153..bc88461668b 100644
--- a/doc/subscriptions/self_managed/index.md
+++ b/doc/subscriptions/self_managed/index.md
@@ -9,16 +9,23 @@ type: index, reference
You can install, administer, and maintain your own GitLab instance.
-In this page we'll go through the details of your GitLab self-managed subscription.
+This page covers the details of your GitLab self-managed subscription.
-## Choose a GitLab tier
+## Subscription
+
+The cost of a GitLab self-managed subscription is determined by the following:
+
+- GitLab tier
+- Subscription seats
+
+## GitLab tier
Pricing is [tier-based](https://about.gitlab.com/pricing/), allowing you to choose
the features which fit your budget. For information on what features are available
at each tier, see the
[GitLab self-managed feature comparison](https://about.gitlab.com/pricing/self-managed/feature-comparison/).
-## Choose the number of users
+## Subscription seats
A self-managed subscription uses a hybrid model. You pay for a subscription
according to the maximum number of users enabled during the subscription period.
@@ -26,14 +33,17 @@ For instances that aren't offline or on a closed network, the maximum number of
simultaneous users in the self-managed installation is checked each quarter,
using [Seat Link](#seat-link).
-Every occupied seat is counted in the subscription, with the following exceptions:
+### Billable users
+
+A _billable user_ counts against the number of subscription seats. Every user is considered a
+billable user, with the following exceptions:
-- [Deactivated](../../user/admin_area/activating_deactivating_users.md#deactivating-a-user), [pending approval](../../user/admin_area/approving_users.md) and
- [blocked](../../user/admin_area/blocking_unblocking_users.md) users who are restricted prior to the
- renewal of a subscription won't be counted as active users for the renewal subscription. They may
- count as active users in the subscription period in which they were originally added.
+- [Deactivated users](../../user/admin_area/activating_deactivating_users.md#deactivating-a-user) and
+ [blocked users](../../user/admin_area/blocking_unblocking_users.md) don't count as billable users in the current subscription. When they are either deactivated or blocked they release a _billable user_ seat. However, they may
+ count toward overages in the subscribed seat count.
+- Users who are [pending approval](../../user/admin_area/approving_users.md).
- Members with Guest permissions on an Ultimate subscription.
-- GitLab-created service accounts: `Ghost User` and bots (`Support Bot`, [`Project bot users`](../../user/project/settings/project_access_tokens.md#project-bot-users), etc.).
+- GitLab-created service accounts: `Ghost User` and bots (`Support Bot`, [`Project bot users`](../../user/project/settings/project_access_tokens.md#project-bot-users), and so on).
### Users statistics
@@ -99,10 +109,10 @@ It's important to regularly review your user accounts, because:
#### Users over License
A GitLab subscription is valid for a specific number of users. For details, see
-[Choose the number of users](#choose-the-number-of-users). If the active user
+[Billable users](#billable-users). If the billable user
count exceeds the number included in the subscription, known as the number of
_users over license_, you must pay for the excess number of users either before
-renewal, or at the time of renewal. This is also known the _true up_ process.
+renewal, or at the time of renewal. This is also known as the _true up_ process.
Self-managed instances can add users to a subscription any time during the
subscription period. The cost of additional users added during the subscription
diff --git a/doc/user/admin_area/activating_deactivating_users.md b/doc/user/admin_area/activating_deactivating_users.md
index 8b3a7682841..96b39ae7116 100644
--- a/doc/user/admin_area/activating_deactivating_users.md
+++ b/doc/user/admin_area/activating_deactivating_users.md
@@ -44,7 +44,7 @@ Please note that for the deactivation option to be visible to an admin, the user
Users can also be deactivated using the [GitLab API](../../api/users.md#deactivate-user).
NOTE: **Note:**
-A deactivated user does not consume a [seat](../../subscriptions/self_managed/index.md#choose-the-number-of-users).
+A deactivated user does not consume a [seat](../../subscriptions/self_managed/index.md#billable-users).
## Activating a user
@@ -62,8 +62,8 @@ To do this:
Users can also be activated using the [GitLab API](../../api/users.md#activate-user).
NOTE: **Note:**
-Activating a user will change the user's state to active and it consumes a
-[seat](../../subscriptions/self_managed/index.md#choose-the-number-of-users).
+Activating a user changes the user's state to active and consumes a
+[seat](../../subscriptions/self_managed/index.md#billable-users).
TIP: **Tip:**
A deactivated user can also activate their account themselves by simply logging back in via the UI.
diff --git a/doc/user/admin_area/approving_users.md b/doc/user/admin_area/approving_users.md
index 486d0b6a25d..cc66a0d56d1 100644
--- a/doc/user/admin_area/approving_users.md
+++ b/doc/user/admin_area/approving_users.md
@@ -18,7 +18,7 @@ A user pending approval:
- Will not be able to sign in.
- Cannot access Git repositories or the API.
- Will not receive any notifications from GitLab.
-- Does not consume a [seat](../../subscriptions/self_managed/index.md#choose-the-number-of-users).
+- Does not consume a [seat](../../subscriptions/self_managed/index.md#billable-users).
## Approving a user
@@ -33,4 +33,4 @@ Approving a user:
1. Activates their account.
1. Changes the user's state to active and it consumes a
-[seat](../../subscriptions/self_managed/index.md#choose-the-number-of-users).
+[seat](../../subscriptions/self_managed/index.md#billable-users).
diff --git a/doc/user/admin_area/blocking_unblocking_users.md b/doc/user/admin_area/blocking_unblocking_users.md
index d8dde317d38..989182db423 100644
--- a/doc/user/admin_area/blocking_unblocking_users.md
+++ b/doc/user/admin_area/blocking_unblocking_users.md
@@ -23,17 +23,17 @@ or directly from the Admin Area. To do this:
A blocked user:
-- Will not be able to login.
+- Cannot log in.
- Cannot access Git repositories or the API.
-- Will not receive any notifications from GitLab.
-- Will not be able to use [slash commands](../../integration/slash_commands.md).
+- Does not receive any notifications from GitLab.
+- Cannot use [slash commands](../../integration/slash_commands.md).
-Personal projects, and group and user history of the blocked user will be left intact.
+Personal projects, and group and user history of the blocked user are left intact.
Users can also be blocked using the [GitLab API](../../api/users.md#block-user).
NOTE: **Note:**
-A blocked user does not consume a [seat](../../subscriptions/self_managed/index.md#choose-the-number-of-users).
+A blocked user does not consume a [seat](../../subscriptions/self_managed/index.md#billable-users).
## Unblocking a user
@@ -47,5 +47,5 @@ A blocked user can be unblocked from the Admin Area. To do this:
Users can also be unblocked using the [GitLab API](../../api/users.md#unblock-user).
NOTE: **Note:**
-Unblocking a user will change the user's state to active and it consumes a
-[seat](../../subscriptions/self_managed/index.md#choose-the-number-of-users).
+Unblocking a user changes the user's state to active and consumes a
+[seat](../../subscriptions/self_managed/index.md#billable-users).
diff --git a/doc/user/admin_area/index.md b/doc/user/admin_area/index.md
index 701ce95ebdd..fd8c72ad081 100644
--- a/doc/user/admin_area/index.md
+++ b/doc/user/admin_area/index.md
@@ -146,22 +146,16 @@ you must provide the complete email address.
#### Users statistics
-The **Users statistics** page provides an overview of user accounts by role, such as _Users with
-highest role Maintainer_.
+The **Users statistics** page provides an overview of user accounts by role. These statistics are
+calculated daily, so user changes made since the last update are not reflected.
The following totals are also included:
-- Active users
+- Billable users
- Blocked users
- Total users
-GitLab billing is based on the number of **Active users**, calculated as **Total users** -
-**Blocked users**. For details of active users, see
-[Choosing the number of users](../../subscriptions/self_managed/index.md#choose-the-number-of-users).
-
-NOTE: **Note:**
-Users statistics are calculated daily, so user changes made since the last update won't be
-reflected in the statistics.
+GitLab billing is based on the number of [**Billable users**](../../subscriptions/self_managed/index.md#billable-users).
### Administering Groups
diff --git a/doc/user/clusters/agent/index.md b/doc/user/clusters/agent/index.md
index a2b731aae04..f11fdc474ca 100644
--- a/doc/user/clusters/agent/index.md
+++ b/doc/user/clusters/agent/index.md
@@ -402,3 +402,4 @@ This basic GitOps example deploys NGINX:
- [Configuration repository](https://gitlab.com/gitlab-org/configure/examples/kubernetes-agent)
- [Manifest repository](https://gitlab.com/gitlab-org/configure/examples/gitops-project)
+- [Install GitLab Runner](https://gitlab.com/gitlab-examples/install-runner-via-k8s-agent)
diff --git a/doc/user/packages/index.md b/doc/user/packages/index.md
index 6488eb8121c..83d179cbc9c 100644
--- a/doc/user/packages/index.md
+++ b/doc/user/packages/index.md
@@ -39,7 +39,6 @@ guide you through the process.
| ------ | ------ |
| Chef | [#36889](https://gitlab.com/gitlab-org/gitlab/-/issues/36889) |
| CocoaPods | [#36890](https://gitlab.com/gitlab-org/gitlab/-/issues/36890) |
-| CocoaPods | [#36891](https://gitlab.com/gitlab-org/gitlab/-/issues/36891) |
| Conda | [#36891](https://gitlab.com/gitlab-org/gitlab/-/issues/36891) |
| CRAN | [#36892](https://gitlab.com/gitlab-org/gitlab/-/issues/36892) |
| Debian | [WIP: Merge Request](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/44746) |
diff --git a/doc/user/project/settings/project_access_tokens.md b/doc/user/project/settings/project_access_tokens.md
index b6ce21ebea6..9f8cf2ff41a 100644
--- a/doc/user/project/settings/project_access_tokens.md
+++ b/doc/user/project/settings/project_access_tokens.md
@@ -54,7 +54,7 @@ Furthermore, the bot user can not be added to any other project.
When the project access token is [revoked](#revoking-a-project-access-token) the bot user is then deleted and all records are moved to a system-wide user with the username "Ghost User". For more information, see [Associated Records](../../profile/account/delete_account.md#associated-records).
-Project bot users are [GitLab-created service accounts](../../../subscriptions/self_managed/index.md#choose-the-number-of-users) and do not count as licensed seats.
+Project bot users are [GitLab-created service accounts](../../../subscriptions/self_managed/index.md#billable-users) and do not count as licensed seats.
## Revoking a project access token
diff --git a/lib/gitlab/database/partitioning_migration_helpers.rb b/lib/gitlab/database/partitioning_migration_helpers.rb
index 881177a195e..3196dd20356 100644
--- a/lib/gitlab/database/partitioning_migration_helpers.rb
+++ b/lib/gitlab/database/partitioning_migration_helpers.rb
@@ -5,6 +5,7 @@ module Gitlab
module PartitioningMigrationHelpers
include ForeignKeyHelpers
include TableManagementHelpers
+ include IndexHelpers
end
end
end
diff --git a/lib/gitlab/database/partitioning_migration_helpers/index_helpers.rb b/lib/gitlab/database/partitioning_migration_helpers/index_helpers.rb
new file mode 100644
index 00000000000..f367292f4b0
--- /dev/null
+++ b/lib/gitlab/database/partitioning_migration_helpers/index_helpers.rb
@@ -0,0 +1,90 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module Database
+ module PartitioningMigrationHelpers
+ module IndexHelpers
+ include Gitlab::Database::MigrationHelpers
+ include Gitlab::Database::SchemaHelpers
+
+ # Concurrently creates a new index on a partitioned table. In concept this works similarly to
+ # `add_concurrent_index`, and won't block reads or writes on the table while the index is being built.
+ #
+ # A special helper is required for partitioning because Postgres does not support concurrently building indexes
+ # on partitioned tables. This helper concurrently adds the same index to each partition, and creates the final
+ # index on the parent table once all of the partitions are indexed. This is the recommended safe way to add
+ # indexes to partitioned tables.
+ #
+ # Example:
+ #
+ # add_concurrent_partitioned_index :users, :some_column
+ #
+ # See Rails' `add_index` for more info on the available arguments.
+ def add_concurrent_partitioned_index(table_name, column_names, options = {})
+ raise ArgumentError, 'A name is required for indexes added to partitioned tables' unless options[:name]
+
+ partitioned_table = find_partitioned_table(table_name)
+
+ if index_name_exists?(table_name, options[:name])
+ Gitlab::AppLogger.warn "Index not created because it already exists (this may be due to an aborted" \
+ " migration or similar): table_name: #{table_name}, index_name: #{options[:name]}"
+
+ return
+ end
+
+ partitioned_table.postgres_partitions.each do |partition|
+ partition_index_name = generated_index_name(partition.identifier, options[:name])
+ partition_options = options.merge(name: partition_index_name)
+
+ add_concurrent_index(partition.identifier, column_names, partition_options)
+ end
+
+ with_lock_retries do
+ add_index(table_name, column_names, options)
+ end
+ end
+
+ # Safely removes an existing index from a partitioned table. The method name is a bit inaccurate as it does not
+ # drop the index concurrently, but it's named as such to maintain consistency with other similar helpers, and
+ # indicate that this should be safe to use in a production environment.
+ #
+ # In current versions of Postgres it's impossible to drop an index concurrently, or drop an index from an
+ # individual partition that exists across the entire partitioned table. As a result this helper drops the index
+ # from the parent table, which automatically cascades to all partitions. While this does require an exclusive
+ # lock, dropping an index is a fast operation that won't block the table for a significant period of time.
+ #
+ # Example:
+ #
+ # remove_concurrent_partitioned_index_by_name :users, 'index_name_goes_here'
+ def remove_concurrent_partitioned_index_by_name(table_name, index_name)
+ find_partitioned_table(table_name)
+
+ unless index_name_exists?(table_name, index_name)
+ Gitlab::AppLogger.warn "Index not removed because it does not exist (this may be due to an aborted " \
+ "migration or similar): table_name: #{table_name}, index_name: #{index_name}"
+
+ return
+ end
+
+ with_lock_retries do
+ remove_index(table_name, name: index_name)
+ end
+ end
+
+ private
+
+ def find_partitioned_table(table_name)
+ partitioned_table = Gitlab::Database::PostgresPartitionedTable.find_by_name_in_current_schema(table_name)
+
+ raise ArgumentError, "#{table_name} is not a partitioned table" unless partitioned_table
+
+ partitioned_table
+ end
+
+ def generated_index_name(partition_name, index_name)
+ object_name("#{partition_name}_#{index_name}", 'index')
+ end
+ end
+ end
+ end
+end
diff --git a/lib/gitlab/database/postgres_partitioned_table.rb b/lib/gitlab/database/postgres_partitioned_table.rb
index 58385821bde..5d2eaa22ee4 100644
--- a/lib/gitlab/database/postgres_partitioned_table.rb
+++ b/lib/gitlab/database/postgres_partitioned_table.rb
@@ -15,6 +15,10 @@ module Gitlab
find(identifier)
end
+ def self.find_by_name_in_current_schema(name)
+ find_by("identifier = concat(current_schema(), '.', ?)", name)
+ end
+
def dynamic?
DYNAMIC_PARTITION_STRATEGIES.include?(strategy)
end
diff --git a/lib/gitlab/usage_data_counters/known_events.yml b/lib/gitlab/usage_data_counters/known_events.yml
index 30c72267ba3..eb25404c681 100644
--- a/lib/gitlab/usage_data_counters/known_events.yml
+++ b/lib/gitlab/usage_data_counters/known_events.yml
@@ -319,3 +319,8 @@
category: issues_edit
redis_slot: project_management
aggregation: daily
+# Secrets Management
+- name: i_ci_secrets_management_vault_build_created
+ category: ci_secrets_management
+ redis_slot: ci_secrets_management
+ aggregation: weekly
diff --git a/lib/gitlab/webpack/dev_server_middleware.rb b/lib/gitlab/webpack/dev_server_middleware.rb
index 069e68e8d29..88f2a4455c6 100644
--- a/lib/gitlab/webpack/dev_server_middleware.rb
+++ b/lib/gitlab/webpack/dev_server_middleware.rb
@@ -16,14 +16,14 @@ module Gitlab
super(app, backend: "#{@proxy_scheme}://#{@proxy_host}:#{@proxy_port}", **opts)
end
- # disable SSL check since any cert used here will likely be self-signed
- def rewrite_env(env)
- env["rack.ssl_verify_none"] = true
- env
- end
-
def perform_request(env)
if @proxy_path && env['PATH_INFO'].start_with?("/#{@proxy_path}")
+ # disable SSL check since any cert used here will likely be self-signed
+ env['rack.ssl_verify_none'] = true
+
+ # ensure we pass the expected Host header so webpack-dev-server doesn't complain
+ env['HTTP_HOST'] = "#{@proxy_host}:#{@proxy_port}"
+
if relative_url_root = Rails.application.config.relative_url_root
env['SCRIPT_NAME'] = ""
env['REQUEST_PATH'].sub!(/\A#{Regexp.escape(relative_url_root)}/, '')
diff --git a/spec/graphql/resolvers/design_management/design_resolver_spec.rb b/spec/graphql/resolvers/design_management/design_resolver_spec.rb
index 02d7f94612c..d119b64a93e 100644
--- a/spec/graphql/resolvers/design_management/design_resolver_spec.rb
+++ b/spec/graphql/resolvers/design_management/design_resolver_spec.rb
@@ -57,12 +57,21 @@ RSpec.describe Resolvers::DesignManagement::DesignResolver do
end
context 'the ID belongs to a design on another issue' do
- let(:args) { { id: GitlabSchema.id_from_object(design_on_other_issue).to_s } }
+ let(:args) { { id: global_id_of(design_on_other_issue) } }
it 'returns nothing' do
expect(resolve_design).to be_nil
end
end
+
+ context 'the ID does not belong to a design at all' do
+ let(:args) { { id: global_id_of(issue) } }
+ let(:msg) { /does not represent an instance of DesignManagement::Design/ }
+
+ it 'complains meaningfully' do
+ expect { resolve_design }.to raise_error(msg)
+ end
+ end
end
context 'by filename' do
diff --git a/spec/graphql/resolvers/design_management/designs_resolver_spec.rb b/spec/graphql/resolvers/design_management/designs_resolver_spec.rb
index cfa37d34fd9..cb56920563b 100644
--- a/spec/graphql/resolvers/design_management/designs_resolver_spec.rb
+++ b/spec/graphql/resolvers/design_management/designs_resolver_spec.rb
@@ -65,8 +65,24 @@ RSpec.describe Resolvers::DesignManagement::DesignsResolver do
let(:second_version) { create(:design_version) }
let(:second_design) { create(:design, issue: issue, versions: [second_version]) }
+ context 'ids is provided but null' do
+ let(:args) { { ids: nil } }
+
+ it 'behaves as if unfiltered' do
+ expect(resolve_designs).to contain_exactly(first_design, second_design)
+ end
+ end
+
+ context 'ids is provided but empty' do
+ let(:args) { { ids: [] } }
+
+ it 'eliminates all values' do
+ expect(resolve_designs).to be_empty
+ end
+ end
+
context 'the ID is on the current issue' do
- let(:args) { { ids: [GitlabSchema.id_from_object(second_design).to_s] } }
+ let(:args) { { ids: [GitlabSchema.id_from_object(second_design)] } }
it 'resolves to just the relevant design' do
expect(resolve_designs).to contain_exactly(second_design)
@@ -77,7 +93,7 @@ RSpec.describe Resolvers::DesignManagement::DesignsResolver do
let(:third_version) { create(:design_version) }
let(:third_design) { create(:design, issue: create(:issue, project: project), versions: [third_version]) }
- let(:args) { { ids: [GitlabSchema.id_from_object(third_design).to_s] } }
+ let(:args) { { ids: [GitlabSchema.id_from_object(third_design)] } }
it 'ignores it' do
expect(resolve_designs).to be_empty
diff --git a/spec/graphql/resolvers/design_management/version_in_collection_resolver_spec.rb b/spec/graphql/resolvers/design_management/version_in_collection_resolver_spec.rb
index 8ad928e9854..403261fc22a 100644
--- a/spec/graphql/resolvers/design_management/version_in_collection_resolver_spec.rb
+++ b/spec/graphql/resolvers/design_management/version_in_collection_resolver_spec.rb
@@ -32,7 +32,7 @@ RSpec.describe Resolvers::DesignManagement::VersionInCollectionResolver do
end
context 'we pass an id' do
- let(:params) { { id: global_id_of(first_version) } }
+ let(:params) { { version_id: global_id_of(first_version) } }
it { is_expected.to eq(first_version) }
end
@@ -44,13 +44,14 @@ RSpec.describe Resolvers::DesignManagement::VersionInCollectionResolver do
end
context 'we pass an inconsistent mixture of sha and version id' do
- let(:params) { { sha: first_version.sha, id: global_id_of(create(:design_version)) } }
+ let(:params) { { sha: first_version.sha, version_id: global_id_of(create(:design_version)) } }
it { is_expected.to be_nil }
end
context 'we pass the id of something that is not a design_version' do
- let(:params) { { id: global_id_of(project) } }
+ let(:params) { { version_id: global_id_of(project) } }
+ let(:appropriate_error) { ::GraphQL::CoercionError }
it 'raises an appropriate error' do
expect { result }.to raise_error(appropriate_error)
diff --git a/spec/lib/gitlab/database/partitioning_migration_helpers/index_helpers_spec.rb b/spec/lib/gitlab/database/partitioning_migration_helpers/index_helpers_spec.rb
new file mode 100644
index 00000000000..7f61ff759fc
--- /dev/null
+++ b/spec/lib/gitlab/database/partitioning_migration_helpers/index_helpers_spec.rb
@@ -0,0 +1,186 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe Gitlab::Database::PartitioningMigrationHelpers::IndexHelpers do
+ include TableSchemaHelpers
+
+ let(:migration) do
+ ActiveRecord::Migration.new.extend(described_class)
+ end
+
+ let(:table_name) { '_test_partitioned_table' }
+ let(:column_name) { 'created_at' }
+ let(:index_name) { '_test_partitioning_index_name' }
+ let(:partition_schema) { 'gitlab_partitions_dynamic' }
+ let(:partition1_identifier) { "#{partition_schema}.#{table_name}_202001" }
+ let(:partition2_identifier) { "#{partition_schema}.#{table_name}_202002" }
+ let(:partition1_index) { "index_#{table_name}_202001_#{column_name}" }
+ let(:partition2_index) { "index_#{table_name}_202002_#{column_name}" }
+
+ before do
+ allow(migration).to receive(:puts)
+
+ connection.execute(<<~SQL)
+ CREATE TABLE #{table_name} (
+ id serial NOT NULL,
+ created_at timestamptz NOT NULL,
+ PRIMARY KEY (id, created_at)
+ ) PARTITION BY RANGE (created_at);
+
+ CREATE TABLE #{partition1_identifier} PARTITION OF #{table_name}
+ FOR VALUES FROM ('2020-01-01') TO ('2020-02-01');
+
+ CREATE TABLE #{partition2_identifier} PARTITION OF #{table_name}
+ FOR VALUES FROM ('2020-02-01') TO ('2020-03-01');
+ SQL
+ end
+
+ describe '#add_concurrent_partitioned_index' do
+ before do
+ allow(migration).to receive(:index_name_exists?).with(table_name, index_name).and_return(false)
+
+ allow(migration).to receive(:generated_index_name).and_return(partition1_index, partition2_index)
+
+ allow(migration).to receive(:with_lock_retries).and_yield
+ end
+
+ context 'when the index does not exist on the parent table' do
+ it 'creates the index on each partition, and the parent table', :aggregate_failures do
+ expect(migration).to receive(:index_name_exists?).with(table_name, index_name).and_return(false)
+
+ expect_add_concurrent_index_and_call_original(partition1_identifier, column_name, partition1_index)
+ expect_add_concurrent_index_and_call_original(partition2_identifier, column_name, partition2_index)
+
+ expect(migration).to receive(:with_lock_retries).ordered.and_yield
+ expect(migration).to receive(:add_index).with(table_name, column_name, name: index_name).ordered.and_call_original
+
+ migration.add_concurrent_partitioned_index(table_name, column_name, name: index_name)
+
+ expect_index_to_exist(partition1_index, schema: partition_schema)
+ expect_index_to_exist(partition2_index, schema: partition_schema)
+ expect_index_to_exist(index_name)
+ end
+
+ def expect_add_concurrent_index_and_call_original(table, column, index)
+ expect(migration).to receive(:add_concurrent_index).ordered.with(table, column, name: index)
+ .and_wrap_original { |_, table, column, options| connection.add_index(table, column, options) }
+ end
+ end
+
+ context 'when the index exists on the parent table' do
+ it 'does not attempt to create any indexes', :aggregate_failures do
+ expect(migration).to receive(:index_name_exists?).with(table_name, index_name).and_return(true)
+
+ expect(migration).not_to receive(:add_concurrent_index)
+ expect(migration).not_to receive(:with_lock_retries)
+ expect(migration).not_to receive(:add_index)
+
+ migration.add_concurrent_partitioned_index(table_name, column_name, name: index_name)
+ end
+ end
+
+ context 'when additional index options are given' do
+ before do
+ connection.execute(<<~SQL)
+ DROP TABLE #{partition2_identifier}
+ SQL
+ end
+
+ it 'forwards them to the index helper methods', :aggregate_failures do
+ expect(migration).to receive(:add_concurrent_index)
+ .with(partition1_identifier, column_name, name: partition1_index, where: 'x > 0', unique: true)
+
+ expect(migration).to receive(:add_index)
+ .with(table_name, column_name, name: index_name, where: 'x > 0', unique: true)
+
+ migration.add_concurrent_partitioned_index(table_name, column_name,
+ name: index_name, where: 'x > 0', unique: true)
+ end
+ end
+
+ context 'when a name argument for the index is not given' do
+ it 'raises an error', :aggregate_failures do
+ expect(migration).not_to receive(:add_concurrent_index)
+ expect(migration).not_to receive(:with_lock_retries)
+ expect(migration).not_to receive(:add_index)
+
+ expect do
+ migration.add_concurrent_partitioned_index(table_name, column_name)
+ end.to raise_error(ArgumentError, /A name is required for indexes added to partitioned tables/)
+ end
+ end
+
+ context 'when the given table is not a partitioned table' do
+ before do
+ allow(Gitlab::Database::PostgresPartitionedTable).to receive(:find_by_name_in_current_schema)
+ .with(table_name).and_return(nil)
+ end
+
+ it 'raises an error', :aggregate_failures do
+ expect(migration).not_to receive(:add_concurrent_index)
+ expect(migration).not_to receive(:with_lock_retries)
+ expect(migration).not_to receive(:add_index)
+
+ expect do
+ migration.add_concurrent_partitioned_index(table_name, column_name, name: index_name)
+ end.to raise_error(ArgumentError, /#{table_name} is not a partitioned table/)
+ end
+ end
+ end
+
+ describe '#remove_concurrent_partitioned_index_by_name' do
+ context 'when the index exists' do
+ before do
+ connection.execute(<<~SQL)
+ CREATE INDEX #{partition1_index} ON #{partition1_identifier} (#{column_name});
+ CREATE INDEX #{partition2_index} ON #{partition2_identifier} (#{column_name});
+
+ CREATE INDEX #{index_name} ON #{table_name} (#{column_name});
+ SQL
+ end
+
+ it 'drops the index on the parent table, cascading to all partitions', :aggregate_failures do
+ expect_index_to_exist(partition1_index, schema: partition_schema)
+ expect_index_to_exist(partition2_index, schema: partition_schema)
+ expect_index_to_exist(index_name)
+
+ expect(migration).to receive(:with_lock_retries).ordered.and_yield
+ expect(migration).to receive(:remove_index).with(table_name, name: index_name).ordered.and_call_original
+
+ migration.remove_concurrent_partitioned_index_by_name(table_name, index_name)
+
+ expect_index_not_to_exist(partition1_index, schema: partition_schema)
+ expect_index_not_to_exist(partition2_index, schema: partition_schema)
+ expect_index_not_to_exist(index_name)
+ end
+ end
+
+ context 'when the index does not exist' do
+ it 'does not attempt to drop the index', :aggregate_failures do
+ expect(migration).to receive(:index_name_exists?).with(table_name, index_name).and_return(false)
+
+ expect(migration).not_to receive(:with_lock_retries)
+ expect(migration).not_to receive(:remove_index)
+
+ migration.remove_concurrent_partitioned_index_by_name(table_name, index_name)
+ end
+ end
+
+ context 'when the given table is not a partitioned table' do
+ before do
+ allow(Gitlab::Database::PostgresPartitionedTable).to receive(:find_by_name_in_current_schema)
+ .with(table_name).and_return(nil)
+ end
+
+ it 'raises an error', :aggregate_failures do
+ expect(migration).not_to receive(:with_lock_retries)
+ expect(migration).not_to receive(:remove_index)
+
+ expect do
+ migration.remove_concurrent_partitioned_index_by_name(table_name, index_name)
+ end.to raise_error(ArgumentError, /#{table_name} is not a partitioned table/)
+ end
+ end
+ end
+end
diff --git a/spec/lib/gitlab/database/postgres_partitioned_table_spec.rb b/spec/lib/gitlab/database/postgres_partitioned_table_spec.rb
index a25b90ca5a1..21a46f1a0a6 100644
--- a/spec/lib/gitlab/database/postgres_partitioned_table_spec.rb
+++ b/spec/lib/gitlab/database/postgres_partitioned_table_spec.rb
@@ -39,6 +39,23 @@ RSpec.describe Gitlab::Database::PostgresPartitionedTable, type: :model do
it_behaves_like 'a postgres model'
+ describe '.find_by_name_in_current_schema' do
+ it 'finds the partitioned tables in the current schema by name', :aggregate_failures do
+ partitioned_table = described_class.find_by_name_in_current_schema(name)
+
+ expect(partitioned_table).not_to be_nil
+ expect(partitioned_table.identifier).to eq(identifier)
+ end
+
+ it 'does not find partitioned tables in a different schema' do
+ ActiveRecord::Base.connection.execute(<<~SQL)
+ ALTER TABLE #{identifier} SET SCHEMA gitlab_partitions_dynamic
+ SQL
+
+ expect(described_class.find_by_name_in_current_schema(name)).to be_nil
+ end
+ end
+
describe '#dynamic?' do
it 'returns true for tables partitioned by range' do
expect(find('public.foo_range')).to be_dynamic
diff --git a/spec/lib/gitlab/usage_data_counters/hll_redis_counter_spec.rb b/spec/lib/gitlab/usage_data_counters/hll_redis_counter_spec.rb
index 0060447df5c..421e16e3cfe 100644
--- a/spec/lib/gitlab/usage_data_counters/hll_redis_counter_spec.rb
+++ b/spec/lib/gitlab/usage_data_counters/hll_redis_counter_spec.rb
@@ -20,7 +20,10 @@ RSpec.describe Gitlab::UsageDataCounters::HLLRedisCounter, :clean_gitlab_redis_s
describe '.categories' do
it 'gets all unique category names' do
- expect(described_class.categories).to contain_exactly('analytics', 'compliance', 'ide_edit', 'search', 'source_code', 'incident_management', 'issues_edit', 'testing')
+ expect(described_class.categories).to contain_exactly(
+ 'analytics', 'compliance', 'ide_edit', 'search', 'source_code',
+ 'incident_management', 'issues_edit', 'testing', 'ci_secrets_management'
+ )
end
end
diff --git a/spec/lib/gitlab/usage_data_spec.rb b/spec/lib/gitlab/usage_data_spec.rb
index 243da628204..8d15fffad07 100644
--- a/spec/lib/gitlab/usage_data_spec.rb
+++ b/spec/lib/gitlab/usage_data_spec.rb
@@ -1216,7 +1216,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
subject { described_class.redis_hll_counters }
let(:categories) { ::Gitlab::UsageDataCounters::HLLRedisCounter.categories }
- let(:ineligible_total_categories) { %w[source_code testing] }
+ let(:ineligible_total_categories) { %w[source_code testing ci_secrets_management] }
it 'has all known_events' do
expect(subject).to have_key(:redis_hll_counters)
diff --git a/spec/support/helpers/table_schema_helpers.rb b/spec/support/helpers/table_schema_helpers.rb
index b79ea4eb5f0..f3f36491e7c 100644
--- a/spec/support/helpers/table_schema_helpers.rb
+++ b/spec/support/helpers/table_schema_helpers.rb
@@ -16,6 +16,14 @@ module TableSchemaHelpers
expect(table_oid(replacement_table)).to be_nil
end
+ def expect_index_to_exist(name, schema: nil)
+ expect(index_exists_by_name(name, schema: schema)).to eq(true)
+ end
+
+ def expect_index_not_to_exist(name, schema: nil)
+ expect(index_exists_by_name(name, schema: schema)).to be_nil
+ end
+
def table_oid(name)
connection.select_value(<<~SQL)
SELECT oid
@@ -76,4 +84,19 @@ module TableSchemaHelpers
AND contype = 'p'
SQL
end
+
+ def index_exists_by_name(index, schema: nil)
+ schema = schema ? "'#{schema}'" : 'current_schema'
+
+ connection.select_value(<<~SQL)
+ SELECT true
+ FROM pg_catalog.pg_index i
+ INNER JOIN pg_catalog.pg_class c
+ ON c.oid = i.indexrelid
+ INNER JOIN pg_catalog.pg_namespace n
+ ON c.relnamespace = n.oid
+ WHERE c.relname = '#{index}'
+ AND n.nspname = #{schema}
+ SQL
+ end
end