summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-15 00:08:29 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-15 00:08:29 +0000
commit38b948a54e00841b51c446beb0adf079af60c963 (patch)
tree2e9dfe54e2d0ec444223f773dc283b1c639baae9
parent7f35b02e86cd3d2e8b4a81c5c3a8483ff6973c5a (diff)
downloadgitlab-ce-38b948a54e00841b51c446beb0adf079af60c963.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--.gitlab/CODEOWNERS17
-rw-r--r--.rubocop_todo/layout/line_length.yml1
-rw-r--r--app/controllers/concerns/web_hooks/hook_execution_notice.rb2
-rw-r--r--app/models/incident_management/timeline_event_tag.rb2
-rw-r--r--app/models/integrations/chat_message/pipeline_message.rb9
-rw-r--r--app/models/integrations/datadog.rb4
-rw-r--r--app/models/integrations/jenkins.rb4
-rw-r--r--app/models/integrations/packagist.rb6
-rw-r--r--app/services/web_hook_service.rb15
-rw-r--r--app/views/search/results/_blob_highlight.html.haml3
-rw-r--r--app/workers/projects/post_creation_worker.rb1
-rw-r--r--config/feature_flags/development/truncate_long_blobs_in_search.yml8
-rw-r--r--config/metrics/counts_all/20210216181029_projects_with_expiration_policy_enabled_with_cadence_set_to_1d.yml4
-rw-r--r--config/metrics/counts_all/20210216181031_projects_with_expiration_policy_enabled_with_cadence_set_to_7d.yml4
-rw-r--r--config/metrics/counts_all/20210216181033_projects_with_expiration_policy_enabled_with_cadence_set_to_14d.yml4
-rw-r--r--config/metrics/counts_all/20210216181035_projects_with_expiration_policy_enabled_with_cadence_set_to_1month.yml4
-rw-r--r--config/metrics/counts_all/20210216181037_projects_with_expiration_policy_enabled_with_cadence_set_to_3month.yml4
-rw-r--r--config/open_api.yml14
-rw-r--r--data/deprecations/15-6-deprecate-merge_status-api-field.yml15
-rw-r--r--db/migrate/20221110150942_add_project_id_lower_name_index_remove_old_index.rb26
-rw-r--r--db/schema_migrations/202211101509421
-rw-r--r--db/structure.sql2
-rw-r--r--doc/administration/auth/authentiq.md2
-rw-r--r--doc/administration/auth/jwt.md2
-rw-r--r--doc/administration/auth/ldap/google_secure_ldap.md2
-rw-r--r--doc/administration/auth/smartcard.md2
-rw-r--r--doc/administration/cicd.md2
-rw-r--r--doc/administration/libravatar.md2
-rw-r--r--doc/administration/pages/index.md2
-rw-r--r--doc/administration/system_hooks.md2
-rw-r--r--doc/api/graphql/reference/index.md3
-rw-r--r--doc/api/templates/dockerfiles.md2
-rw-r--r--doc/api/templates/gitignores.md2
-rw-r--r--doc/api/templates/gitlab_ci_ymls.md2
-rw-r--r--doc/api/templates/licenses.md2
-rw-r--r--doc/ci/chatops/index.md2
-rw-r--r--doc/ci/ci_cd_for_external_repos/bitbucket_integration.md2
-rw-r--r--doc/ci/ci_cd_for_external_repos/github_integration.md2
-rw-r--r--doc/ci/enable_or_disable_ci.md2
-rw-r--r--doc/ci/environments/deployment_approvals.md2
-rw-r--r--doc/ci/pipelines/schedules.md2
-rw-r--r--doc/ci/pipelines/settings.md2
-rw-r--r--doc/development/database/database_migration_pipeline.md51
-rw-r--r--doc/gitlab-basics/add-file.md2
-rw-r--r--doc/gitlab-basics/command-line-commands.md2
-rw-r--r--doc/gitlab-basics/start-using-git.md2
-rw-r--r--doc/install/aws/manual_install_aws.md4
-rw-r--r--doc/install/google_cloud_platform/index.md2
-rw-r--r--doc/install/relative_url.md2
-rw-r--r--doc/install/requirements.md2
-rw-r--r--doc/security/crime_vulnerability.md2
-rw-r--r--doc/security/information_exclusivity.md2
-rw-r--r--doc/security/password_length_limits.md2
-rw-r--r--doc/security/ssh_keys_restrictions.md2
-rw-r--r--doc/security/two_factor_authentication.md2
-rw-r--r--doc/security/unlock_user.md2
-rw-r--r--doc/security/user_email_confirmation.md2
-rw-r--r--doc/security/user_file_uploads.md2
-rw-r--r--doc/security/webhooks.md2
-rw-r--r--doc/subscriptions/index.md2
-rw-r--r--doc/topics/git/how_to_install_git/index.md2
-rw-r--r--doc/topics/git/lfs/migrate_to_git_lfs.md2
-rw-r--r--doc/topics/git/numerous_undo_possibilities_in_git/index.md2
-rw-r--r--doc/topics/git/useful_git_commands.md2
-rw-r--r--doc/update/deprecations.md14
-rw-r--r--doc/user/admin_area/appearance.md2
-rw-r--r--doc/user/admin_area/broadcast_messages.md2
-rw-r--r--doc/user/admin_area/custom_project_templates.md2
-rw-r--r--doc/user/admin_area/diff_limits.md2
-rw-r--r--doc/user/admin_area/email_from_gitlab.md2
-rw-r--r--doc/user/admin_area/geo_sites.md2
-rw-r--r--doc/user/admin_area/labels.md2
-rw-r--r--doc/user/admin_area/monitoring/health_check.md2
-rw-r--r--doc/user/admin_area/review_abuse_reports.md2
-rw-r--r--doc/user/admin_area/settings/continuous_integration.md8
-rw-r--r--doc/user/admin_area/settings/email.md2
-rw-r--r--doc/user/admin_area/settings/external_authorization.md2
-rw-r--r--doc/user/admin_area/settings/floc.md2
-rw-r--r--doc/user/admin_area/settings/help_page.md2
-rw-r--r--doc/user/admin_area/settings/instance_template_repository.md2
-rw-r--r--doc/user/admin_area/settings/sign_up_restrictions.md2
-rw-r--r--doc/user/admin_area/settings/terms.md2
-rw-r--r--doc/user/admin_area/settings/third_party_offers.md2
-rw-r--r--doc/user/admin_area/settings/usage_statistics.md2
-rw-r--r--doc/user/admin_area/settings/user_and_ip_rate_limits.md2
-rw-r--r--doc/user/admin_area/settings/visibility_and_access_controls.md2
-rw-r--r--doc/user/application_security/security_dashboard/index.md2
-rw-r--r--doc/user/clusters/agent/gitops/helm.md40
-rw-r--r--doc/user/group/clusters/index.md2
-rw-r--r--doc/user/group/contribution_analytics/index.md2
-rw-r--r--doc/user/group/custom_project_templates.md2
-rw-r--r--doc/user/group/epics/index.md2
-rw-r--r--doc/user/group/insights/index.md2
-rw-r--r--doc/user/group/issues_analytics/index.md2
-rw-r--r--doc/user/group/repositories_analytics/index.md2
-rw-r--r--doc/user/group/roadmap/index.md2
-rw-r--r--doc/user/group/subgroups/index.md2
-rw-r--r--doc/user/profile/active_sessions.md2
-rw-r--r--doc/user/profile/preferences.md2
-rw-r--r--doc/user/project/import/github.md4
-rw-r--r--doc/user/project/issues/confidential_issues.md6
-rw-r--r--doc/user/project/merge_requests/authorization_for_merge_requests.md2
-rw-r--r--doc/user/project/merge_requests/conflicts.md2
-rw-r--r--doc/user/project/merge_requests/drafts.md2
-rw-r--r--doc/user/project/merge_requests/revert_changes.md2
-rw-r--r--doc/user/project/merge_requests/reviews/suggestions.md5
-rw-r--r--doc/user/project/merge_requests/squash_and_merge.md2
-rw-r--r--doc/user/project/merge_requests/versions.md2
-rw-r--r--doc/user/project/milestones/burndown_and_burnup_charts.md2
-rw-r--r--doc/user/project/milestones/index.md2
-rw-r--r--doc/user/project/protected_branches.md2
-rw-r--r--doc/user/project/protected_tags.md2
-rw-r--r--doc/user/project/quick_actions.md2
-rw-r--r--doc/user/project/repository/branches/index.md2
-rw-r--r--doc/user/project/repository/web_editor.md2
-rw-r--r--doc/user/public_access.md2
-rw-r--r--glfm_specification/output_example_snapshots/html.yml2
-rw-r--r--lib/api/api.rb8
-rw-r--r--lib/api/entities/error_tracking.rb10
-rw-r--r--lib/api/entities/package_file.rb11
-rw-r--r--lib/api/error_tracking/project_settings.rb30
-rw-r--r--lib/api/geo.rb7
-rw-r--r--lib/api/package_files.rb22
-rw-r--r--lib/api/topics.rb4
-rw-r--r--lib/banzai/filter/repository_link_filter.rb1
-rw-r--r--lib/gitlab/database/background_migration/batched_migration.rb12
-rw-r--r--lib/gitlab/usage_data.rb6
-rw-r--r--locale/gitlab.pot5
-rw-r--r--package.json2
-rw-r--r--qa/qa/mobile/page/base.rb16
-rw-r--r--qa/qa/page/base.rb1
-rw-r--r--qa/qa/runtime/browser.rb2
-rw-r--r--rubocop/cop/gitlab/json.rb9
-rw-r--r--spec/controllers/projects/hooks_controller_spec.rb4
-rw-r--r--spec/factories/integrations.rb13
-rw-r--r--spec/lib/gitlab/database/background_migration/batched_migration_spec.rb43
-rw-r--r--spec/lib/gitlab/health_checks/gitaly_check_spec.rb4
-rw-r--r--spec/lib/gitlab/usage_data_spec.rb14
-rw-r--r--spec/models/incident_management/timeline_event_tag_spec.rb2
-rw-r--r--spec/models/integrations/chat_message/pipeline_message_spec.rb41
-rw-r--r--spec/models/integrations/packagist_spec.rb83
-rw-r--r--spec/rubocop/cop/gitlab/json_spec.rb27
-rw-r--r--spec/scripts/lib/glfm/update_example_snapshots_spec.rb2
-rw-r--r--spec/services/web_hook_service_spec.rb27
-rw-r--r--spec/support/helpers/usage_data_helpers.rb5
-rw-r--r--spec/workers/projects/post_creation_worker_spec.rb34
-rw-r--r--yarn.lock8
147 files changed, 615 insertions, 295 deletions
diff --git a/.gitlab/CODEOWNERS b/.gitlab/CODEOWNERS
index 872d7c2ea00..6be011a56d7 100644
--- a/.gitlab/CODEOWNERS
+++ b/.gitlab/CODEOWNERS
@@ -85,7 +85,24 @@ Dangerfile @gl-quality/eng-prod
/lib/gitlab/ci/templates/ @gitlab-org/maintainers/cicd-templates
/lib/gitlab/ci/templates/Auto-DevOps.gitlab-ci.yml @DylanGriffith @mayra-cabrera @tkuah
/lib/gitlab/ci/templates/Security/ @gonzoyumo @twoodham @sethgitlab @thiagocsf
+/lib/gitlab/ci/templates/Security/API-Fuzzing.*.yml @gitlab-org/secure/dynamic-analysis
/lib/gitlab/ci/templates/Security/Container-Scanning.*.yml @gitlab-org/secure/composition-analysis-be
+/lib/gitlab/ci/templates/Security/Coverage-Fuzzing.*.yml @gitlab-org/secure/dynamic-analysis
+/lib/gitlab/ci/templates/Security/DAST.*.yml @gitlab-org/secure/dynamic-analysis
+/lib/gitlab/ci/templates/Security/Dependency-Scanning.*.yml @gitlab-org/secure/composition-analysis-be
+/lib/gitlab/ci/templates/Security/License-Scanning.*.yml @gitlab-org/secure/composition-analysis-be
+/lib/gitlab/ci/templates/Security/SAST.*.yml @gitlab-org/secure/static-analysis
+/lib/gitlab/ci/templates/Security/Secret-Detection.*.yml @gitlab-org/secure/static-analysis
+/lib/gitlab/ci/templates/Security/Secure-Binaries.*.yml @gitlab-org/secure/static-analysis @gitlab-org/secure/composition-analysis-be @gitlab-org/secure/dynamic-analysis
+# Note: The `Fortify-FoD-sast.gitlab-ci.yml` template is provided and maintained by Fortify, an official Technology Partner with GitLab.
+/lib/gitlab/ci/templates/Jobs/API-Fuzzing.*.yml @gitlab-org/secure/dynamic-analysis
+/lib/gitlab/ci/templates/Jobs/Container-Scanning.*.yml @gitlab-org/secure/composition-analysis-be
+/lib/gitlab/ci/templates/Jobs/Coverage-Fuzzing.*.yml @gitlab-org/secure/dynamic-analysis
+/lib/gitlab/ci/templates/Jobs/DAST.*.yml @gitlab-org/secure/dynamic-analysis
+/lib/gitlab/ci/templates/Jobs/Dependency-Scanning.*.yml @gitlab-org/secure/composition-analysis-be
+/lib/gitlab/ci/templates/Jobs/License-Scanning.*.yml @gitlab-org/secure/composition-analysis-be
+/lib/gitlab/ci/templates/Jobs/SAST.*.yml @gitlab-org/secure/static-analysis
+/lib/gitlab/ci/templates/Jobs/Secret-Detection.*.yml @gitlab-org/secure/static-analysis
^[Project Alias]
/ee/app/models/project_alias.rb @patrickbajao
diff --git a/.rubocop_todo/layout/line_length.yml b/.rubocop_todo/layout/line_length.yml
index a53c450fee3..e4767345ab5 100644
--- a/.rubocop_todo/layout/line_length.yml
+++ b/.rubocop_todo/layout/line_length.yml
@@ -2946,7 +2946,6 @@ Layout/LineLength:
- 'lib/api/entities/project.rb'
- 'lib/api/entities/user.rb'
- 'lib/api/environments.rb'
- - 'lib/api/error_tracking/project_settings.rb'
- 'lib/api/feature_flags.rb'
- 'lib/api/files.rb'
- 'lib/api/generic_packages.rb'
diff --git a/app/controllers/concerns/web_hooks/hook_execution_notice.rb b/app/controllers/concerns/web_hooks/hook_execution_notice.rb
index d651313b30d..69b140723e3 100644
--- a/app/controllers/concerns/web_hooks/hook_execution_notice.rb
+++ b/app/controllers/concerns/web_hooks/hook_execution_notice.rb
@@ -5,7 +5,7 @@ module WebHooks
private
def set_hook_execution_notice(result)
- http_status = result[:http_status]
+ http_status = result.payload[:http_status]
message = result[:message]
if http_status && http_status >= 200 && http_status < 400
diff --git a/app/models/incident_management/timeline_event_tag.rb b/app/models/incident_management/timeline_event_tag.rb
index 2064ccc8c5e..75d23f05e4e 100644
--- a/app/models/incident_management/timeline_event_tag.rb
+++ b/app/models/incident_management/timeline_event_tag.rb
@@ -17,7 +17,7 @@ module IncidentManagement
through: :timeline_event_tag_links
validates :name, presence: true, format: { with: /\A[^,]+\z/ }
- validates :name, uniqueness: { scope: :project_id }
+ validates :name, uniqueness: { scope: :project_id, case_sensitive: false }
validates :name, length: { maximum: 255 }
scope :by_names, -> (tag_names) { where(name: tag_names) }
diff --git a/app/models/integrations/chat_message/pipeline_message.rb b/app/models/integrations/chat_message/pipeline_message.rb
index b3502905bf7..88db40bea7f 100644
--- a/app/models/integrations/chat_message/pipeline_message.rb
+++ b/app/models/integrations/chat_message/pipeline_message.rb
@@ -126,6 +126,14 @@ module Integrations
}
end
+ def pipeline_name_field
+ {
+ title: s_("ChatMessage|Pipeline name"),
+ value: pipeline.name,
+ short: false
+ }
+ end
+
def attachments_fields
fields = [
{
@@ -143,6 +151,7 @@ module Integrations
fields << failed_stages_field if failed_stages.any?
fields << failed_jobs_field if failed_jobs.any?
fields << yaml_error_field if pipeline.has_yaml_errors?
+ fields << pipeline_name_field if Feature.enabled?(:pipeline_name, project) && pipeline.name.present?
fields
end
diff --git a/app/models/integrations/datadog.rb b/app/models/integrations/datadog.rb
index eecf6b3a60a..27bed5d3f76 100644
--- a/app/models/integrations/datadog.rb
+++ b/app/models/integrations/datadog.rb
@@ -168,8 +168,8 @@ module Integrations
result = execute(data)
{
- success: (200..299).cover?(result[:http_status]),
- result: result[:message]
+ success: (200..299).cover?(result.payload[:http_status]),
+ result: result.message
}
end
diff --git a/app/models/integrations/jenkins.rb b/app/models/integrations/jenkins.rb
index 24a7ff62e68..d2e8393ef95 100644
--- a/app/models/integrations/jenkins.rb
+++ b/app/models/integrations/jenkins.rb
@@ -44,12 +44,12 @@ module Integrations
def test(data)
begin
result = execute(data)
- return { success: false, result: result[:message] } if result[:http_status] != 200
+ return { success: false, result: result.message } if result.payload[:http_status] != 200
rescue StandardError => e
return { success: false, result: e }
end
- { success: true, result: result[:message] }
+ { success: true, result: result.message }
end
override :hook_url
diff --git a/app/models/integrations/packagist.rb b/app/models/integrations/packagist.rb
index 64dfef1a4ef..7148de66aee 100644
--- a/app/models/integrations/packagist.rb
+++ b/app/models/integrations/packagist.rb
@@ -54,12 +54,12 @@ module Integrations
def test(data)
begin
result = execute(data)
- return { success: false, result: result[:message] } if result[:http_status] != 202
+ return { success: false, result: result.message } if result.payload[:http_status] != 202
rescue StandardError => e
- return { success: false, result: e }
+ return { success: false, result: e.message }
end
- { success: true, result: result[:message] }
+ { success: true, result: result.message }
end
override :hook_url
diff --git a/app/services/web_hook_service.rb b/app/services/web_hook_service.rb
index e5e5e375198..d32dcd73734 100644
--- a/app/services/web_hook_service.rb
+++ b/app/services/web_hook_service.rb
@@ -57,11 +57,11 @@ class WebHookService
end
def execute
- return { status: :error, message: 'Hook disabled' } if disabled?
+ return ServiceResponse.error(message: 'Hook disabled') if disabled?
if recursion_blocked?
log_recursion_blocked
- return { status: :error, message: 'Recursive webhook blocked' }
+ return ServiceResponse.error(message: 'Recursive webhook blocked')
end
Gitlab::WebHooks::RecursionDetection.register!(hook)
@@ -79,11 +79,7 @@ class WebHookService
execution_duration: Gitlab::Metrics::System.monotonic_time - start_time
)
- {
- status: :success,
- http_status: response.code,
- message: response.body
- }
+ ServiceResponse.success(message: response.body, payload: { http_status: response.code })
rescue *Gitlab::HTTP::HTTP_ERRORS,
Gitlab::Json::LimitedEncoder::LimitExceeded, URI::InvalidURIError => e
execution_duration = Gitlab::Metrics::System.monotonic_time - start_time
@@ -97,10 +93,7 @@ class WebHookService
Gitlab::AppLogger.error("WebHook Error after #{execution_duration.to_i.seconds}s => #{e}")
- {
- status: :error,
- message: error_message
- }
+ ServiceResponse.error(message: error_message)
end
def async_execute
diff --git a/app/views/search/results/_blob_highlight.html.haml b/app/views/search/results/_blob_highlight.html.haml
index 1b84883b34b..37ffabad717 100644
--- a/app/views/search/results/_blob_highlight.html.haml
+++ b/app/views/search/results/_blob_highlight.html.haml
@@ -4,8 +4,7 @@
#search-blob-content.file-content.code.js-syntax-highlight{ class: 'gl-py-3!' }
- if blob.present?
.blob-content{ data: { blob_id: blob.id, path: blob.path, highlight_line: highlight, qa_selector: 'file_content' } }
- - blob_highlight = blob.present.highlight_and_trim(trim_length: 1024, ellipsis_svg: sprite_icon('ellipsis_h', size: 12, css_class: "gl-text-gray-700")) if Feature.enabled?(:truncate_long_blobs_in_search, current_user)
- - blob_highlight ||= blob.present.highlight
+ - blob_highlight = blob.present.highlight_and_trim(trim_length: 1024, ellipsis_svg: sprite_icon('ellipsis_h', size: 12, css_class: "gl-text-gray-700"))
- blob_highlight.lines.each_with_index do |line, index|
- i = index + offset
.line_holder.code-search-line.gl-display-flex
diff --git a/app/workers/projects/post_creation_worker.rb b/app/workers/projects/post_creation_worker.rb
index 7448f1b202f..886919ecace 100644
--- a/app/workers/projects/post_creation_worker.rb
+++ b/app/workers/projects/post_creation_worker.rb
@@ -17,6 +17,7 @@ module Projects
return unless project
create_prometheus_integration(project)
+ create_incident_management_timeline_event_tags(project)
end
private
diff --git a/config/feature_flags/development/truncate_long_blobs_in_search.yml b/config/feature_flags/development/truncate_long_blobs_in_search.yml
deleted file mode 100644
index 4d10402e188..00000000000
--- a/config/feature_flags/development/truncate_long_blobs_in_search.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-name: truncate_long_blobs_in_search
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/101743
-rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/381009
-milestone: '15.6'
-type: development
-group: group::global search
-default_enabled: true
diff --git a/config/metrics/counts_all/20210216181029_projects_with_expiration_policy_enabled_with_cadence_set_to_1d.yml b/config/metrics/counts_all/20210216181029_projects_with_expiration_policy_enabled_with_cadence_set_to_1d.yml
index 1694127fd2c..2c6e2745560 100644
--- a/config/metrics/counts_all/20210216181029_projects_with_expiration_policy_enabled_with_cadence_set_to_1d.yml
+++ b/config/metrics/counts_all/20210216181029_projects_with_expiration_policy_enabled_with_cadence_set_to_1d.yml
@@ -10,6 +10,10 @@ value_type: number
status: active
time_frame: all
data_source: database
+instrumentation_class: DistinctCountProjectsWithExpirationPolicyMetric
+options:
+ enabled: true
+ cadence: 1d
distribution:
- ee
- ce
diff --git a/config/metrics/counts_all/20210216181031_projects_with_expiration_policy_enabled_with_cadence_set_to_7d.yml b/config/metrics/counts_all/20210216181031_projects_with_expiration_policy_enabled_with_cadence_set_to_7d.yml
index a9f8ed70c94..15be6b54bfd 100644
--- a/config/metrics/counts_all/20210216181031_projects_with_expiration_policy_enabled_with_cadence_set_to_7d.yml
+++ b/config/metrics/counts_all/20210216181031_projects_with_expiration_policy_enabled_with_cadence_set_to_7d.yml
@@ -10,6 +10,10 @@ value_type: number
status: active
time_frame: all
data_source: database
+instrumentation_class: DistinctCountProjectsWithExpirationPolicyMetric
+options:
+ enabled: true
+ cadence: 7d
distribution:
- ee
- ce
diff --git a/config/metrics/counts_all/20210216181033_projects_with_expiration_policy_enabled_with_cadence_set_to_14d.yml b/config/metrics/counts_all/20210216181033_projects_with_expiration_policy_enabled_with_cadence_set_to_14d.yml
index 7afc773b713..68d54c4ebe0 100644
--- a/config/metrics/counts_all/20210216181033_projects_with_expiration_policy_enabled_with_cadence_set_to_14d.yml
+++ b/config/metrics/counts_all/20210216181033_projects_with_expiration_policy_enabled_with_cadence_set_to_14d.yml
@@ -10,6 +10,10 @@ value_type: number
status: active
time_frame: all
data_source: database
+instrumentation_class: DistinctCountProjectsWithExpirationPolicyMetric
+options:
+ enabled: true
+ cadence: 14d
distribution:
- ee
- ce
diff --git a/config/metrics/counts_all/20210216181035_projects_with_expiration_policy_enabled_with_cadence_set_to_1month.yml b/config/metrics/counts_all/20210216181035_projects_with_expiration_policy_enabled_with_cadence_set_to_1month.yml
index b083411ab7f..fe620f1997c 100644
--- a/config/metrics/counts_all/20210216181035_projects_with_expiration_policy_enabled_with_cadence_set_to_1month.yml
+++ b/config/metrics/counts_all/20210216181035_projects_with_expiration_policy_enabled_with_cadence_set_to_1month.yml
@@ -10,6 +10,10 @@ value_type: number
status: active
time_frame: all
data_source: database
+instrumentation_class: DistinctCountProjectsWithExpirationPolicyMetric
+options:
+ enabled: true
+ cadence: 1month
distribution:
- ee
- ce
diff --git a/config/metrics/counts_all/20210216181037_projects_with_expiration_policy_enabled_with_cadence_set_to_3month.yml b/config/metrics/counts_all/20210216181037_projects_with_expiration_policy_enabled_with_cadence_set_to_3month.yml
index 0df858b127d..8b06790d4ac 100644
--- a/config/metrics/counts_all/20210216181037_projects_with_expiration_policy_enabled_with_cadence_set_to_3month.yml
+++ b/config/metrics/counts_all/20210216181037_projects_with_expiration_policy_enabled_with_cadence_set_to_3month.yml
@@ -10,6 +10,10 @@ value_type: number
status: active
time_frame: all
data_source: database
+instrumentation_class: DistinctCountProjectsWithExpirationPolicyMetric
+options:
+ enabled: true
+ cadence: 3month
distribution:
- ee
- ce
diff --git a/config/open_api.yml b/config/open_api.yml
index 41036a26291..af31b89c315 100644
--- a/config/open_api.yml
+++ b/config/open_api.yml
@@ -17,14 +17,16 @@ metadata:
# Keep in alphabetical order
- name: access_requests
description: Operations related to access requests
+ - name: ci_lint
+ description: Operations related to linting a CI config file
+ - name: ci_resource_groups
+ description: Operations to manage job concurrency with resource groups
- name: ci_variables
description: Operations related to CI/CD variables
- name: cluster_agents
description: Operations related to the GitLab agent for Kubernetes
- name: clusters
description: Operations related to clusters
- - name: ci_resource_groups
- description: Operations to manage job concurrency with resource groups
- name: dependency_proxy
description: Operations to manage dependency proxy for a groups
- name: deploy_keys
@@ -37,6 +39,8 @@ metadata:
description: Operations related to DevOps Research and Assessment (DORA) key metrics
- name: environments
description: Operations related to environments
+ - name: error_tracking_project_settings
+ description: Operations related to error tracking project settings
- name: feature_flags_user_lists
description: Operations related to accessing GitLab feature flag user lists
- name: feature_flags
@@ -45,8 +49,8 @@ metadata:
description: Operations related to managing Flipper-based feature flags
- name: freeze_periods
description: Operations related to deploy freeze periods
- - name: ci_lint
- description: Operations related to linting a CI config file
+ - name: geo
+ description: Operations related to Geo
- name: geo_nodes
description: Operations related Geo Nodes
- name: group_export
@@ -61,6 +65,8 @@ metadata:
description: Operations related to metadata of the GitLab instance
- name: metrics_user_starred_dashboards
description: Operations related to User-starred metrics dashboards
+ - name: package_files
+ description: Operations about package files
- name: project_export
description: Operations related to exporting projects
- name: project_hooks
diff --git a/data/deprecations/15-6-deprecate-merge_status-api-field.yml b/data/deprecations/15-6-deprecate-merge_status-api-field.yml
new file mode 100644
index 00000000000..55a7cce0b6c
--- /dev/null
+++ b/data/deprecations/15-6-deprecate-merge_status-api-field.yml
@@ -0,0 +1,15 @@
+- name: "merge_status API field" # The name of the feature to be deprecated
+ announcement_milestone: "15.6" # The milestone when this feature was first announced as deprecated.
+ announcement_date: "2022-11-22" # The date of the milestone release when this feature was first announced as deprecated. This should almost always be the 22nd of a month (YYYY-MM-22), unless you did an out of band blog post.
+ removal_milestone: "16.0" # The milestone when this feature is planned to be removed
+ removal_date: "2023-05-22" # the date of the milestone release when this feature is planned to be removed
+ breaking_change: true # If this deprecation is a breaking change, set this value to true
+ body: | # Do not modify this line, instead modify the lines below.
+ The `merge_status` field in the [merge request API](https://docs.gitlab.com/ee/api/merge_requests.html#merge-status) has been deprecated in favor of the `detailed_merge_status` field which more correctly identifies all of the potential statuses that a merge request can be in. API users are encouraged to use the new `detailed_merge_status` field instead. The `merge_status` field will be removed in v5 of the GitLab REST API.
+# The following items are not published on the docs page, but may be used in the future.
+ stage: create # (optional - may be required in the future) String value of the stage that the feature was created in. e.g., Growth
+ tiers: # (optional - may be required in the future) An array of tiers that the feature is available in currently. e.g., [Free, Silver, Gold, Core, Premium, Ultimate]
+ issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/382032 # (optional) This is a link to the deprecation issue in GitLab
+ documentation_url: https://docs.gitlab.com/ee/api/merge_requests.html#merge-status # (optional) This is a link to the current documentation page
+ image_url: # (optional) This is a link to a thumbnail image depicting the feature
+ video_url: # (optional) Use the youtube thumbnail URL with the structure of https://img.youtube.com/vi/UNIQUEID/hqdefault.jpg
diff --git a/db/migrate/20221110150942_add_project_id_lower_name_index_remove_old_index.rb b/db/migrate/20221110150942_add_project_id_lower_name_index_remove_old_index.rb
new file mode 100644
index 00000000000..dfff2f89610
--- /dev/null
+++ b/db/migrate/20221110150942_add_project_id_lower_name_index_remove_old_index.rb
@@ -0,0 +1,26 @@
+# frozen_string_literal: true
+
+class AddProjectIdLowerNameIndexRemoveOldIndex < Gitlab::Database::Migration[2.0]
+ INDEX_NAME = 'index_im_timeline_event_tags_name_project_id'
+ NEW_INDEX_NAME = 'index_im_timeline_event_tags_on_lower_name_and_project_id'
+
+ disable_ddl_transaction!
+
+ def up
+ # Add new index
+ add_concurrent_index :incident_management_timeline_event_tags, 'project_id, LOWER(name)',
+ unique: true, name: NEW_INDEX_NAME
+
+ # Remove old index
+ remove_concurrent_index_by_name :incident_management_timeline_event_tags, INDEX_NAME
+ end
+
+ def down
+ # Add old index
+ add_concurrent_index :incident_management_timeline_event_tags, [:project_id, :name],
+ unique: true, name: INDEX_NAME
+
+ # Remove new index
+ remove_concurrent_index_by_name :incident_management_timeline_event_tags, NEW_INDEX_NAME
+ end
+end
diff --git a/db/schema_migrations/20221110150942 b/db/schema_migrations/20221110150942
new file mode 100644
index 00000000000..1c627232e78
--- /dev/null
+++ b/db/schema_migrations/20221110150942
@@ -0,0 +1 @@
+fa663262d6d73637e7ffefecd0f06705456bc226024d5023377a527cf3498ac7 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 46d06cfb51a..852460460ec 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -29229,7 +29229,7 @@ CREATE UNIQUE INDEX index_im_oncall_schedules_on_project_id_and_iid ON incident_
CREATE INDEX index_im_timeline_event_id ON incident_management_timeline_event_tag_links USING btree (timeline_event_id);
-CREATE UNIQUE INDEX index_im_timeline_event_tags_name_project_id ON incident_management_timeline_event_tags USING btree (project_id, name);
+CREATE UNIQUE INDEX index_im_timeline_event_tags_on_lower_name_and_project_id ON incident_management_timeline_event_tags USING btree (project_id, lower(name));
CREATE UNIQUE INDEX index_im_timeline_event_tags_on_tag_id_and_event_id ON incident_management_timeline_event_tag_links USING btree (timeline_event_tag_id, timeline_event_id);
diff --git a/doc/administration/auth/authentiq.md b/doc/administration/auth/authentiq.md
index 1ac62b06fe7..d51601439f9 100644
--- a/doc/administration/auth/authentiq.md
+++ b/doc/administration/auth/authentiq.md
@@ -95,6 +95,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/administration/auth/jwt.md b/doc/administration/auth/jwt.md
index c7e7253ef72..c1e76d1c2ed 100644
--- a/doc/administration/auth/jwt.md
+++ b/doc/administration/auth/jwt.md
@@ -87,6 +87,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/administration/auth/ldap/google_secure_ldap.md b/doc/administration/auth/ldap/google_secure_ldap.md
index 2077c6f7baf..01197fdacdf 100644
--- a/doc/administration/auth/ldap/google_secure_ldap.md
+++ b/doc/administration/auth/ldap/google_secure_ldap.md
@@ -225,6 +225,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/administration/auth/smartcard.md b/doc/administration/auth/smartcard.md
index 11117e8a74c..5b6d299f171 100644
--- a/doc/administration/auth/smartcard.md
+++ b/doc/administration/auth/smartcard.md
@@ -342,6 +342,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/administration/cicd.md b/doc/administration/cicd.md
index 6899b572e8f..ad0671d4c13 100644
--- a/doc/administration/cicd.md
+++ b/doc/administration/cicd.md
@@ -101,6 +101,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/administration/libravatar.md b/doc/administration/libravatar.md
index 5b2334bff8a..802a3be46fa 100644
--- a/doc/administration/libravatar.md
+++ b/doc/administration/libravatar.md
@@ -134,6 +134,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/administration/pages/index.md b/doc/administration/pages/index.md
index 670d2f206ab..3d31491a9d2 100644
--- a/doc/administration/pages/index.md
+++ b/doc/administration/pages/index.md
@@ -1215,7 +1215,7 @@ the section below.
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/administration/system_hooks.md b/doc/administration/system_hooks.md
index cdcd899b5d4..038c26a9c2e 100644
--- a/doc/administration/system_hooks.md
+++ b/doc/administration/system_hooks.md
@@ -764,6 +764,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md
index 721b15db3d9..b230725a728 100644
--- a/doc/api/graphql/reference/index.md
+++ b/doc/api/graphql/reference/index.md
@@ -19731,7 +19731,8 @@ Represents a vulnerability.
| <a id="vulnerabilitytitle"></a>`title` | [`String`](#string) | Title of the vulnerability. |
| <a id="vulnerabilityusernotescount"></a>`userNotesCount` | [`Int!`](#int) | Number of user notes attached to the vulnerability. |
| <a id="vulnerabilityuserpermissions"></a>`userPermissions` | [`VulnerabilityPermissions!`](#vulnerabilitypermissions) | Permissions for the current user on the resource. |
-| <a id="vulnerabilityvulnerabilitypath"></a>`vulnerabilityPath` | [`String`](#string) | URL to the vulnerability's details page. |
+| <a id="vulnerabilityvulnerabilitypath"></a>`vulnerabilityPath` | [`String`](#string) | Path to the vulnerability's details page. |
+| <a id="vulnerabilityweburl"></a>`webUrl` | [`String`](#string) | URL to the vulnerability's details page. |
#### Fields with arguments
diff --git a/doc/api/templates/dockerfiles.md b/doc/api/templates/dockerfiles.md
index 9636393dfe9..31b676558db 100644
--- a/doc/api/templates/dockerfiles.md
+++ b/doc/api/templates/dockerfiles.md
@@ -142,6 +142,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/api/templates/gitignores.md b/doc/api/templates/gitignores.md
index 7c68daa5c48..1569a2bc89d 100644
--- a/doc/api/templates/gitignores.md
+++ b/doc/api/templates/gitignores.md
@@ -146,6 +146,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/api/templates/gitlab_ci_ymls.md b/doc/api/templates/gitlab_ci_ymls.md
index 152f3373ad6..b7048795313 100644
--- a/doc/api/templates/gitlab_ci_ymls.md
+++ b/doc/api/templates/gitlab_ci_ymls.md
@@ -147,6 +147,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/api/templates/licenses.md b/doc/api/templates/licenses.md
index e676da2e999..6abdb3ca3b0 100644
--- a/doc/api/templates/licenses.md
+++ b/doc/api/templates/licenses.md
@@ -166,6 +166,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/ci/chatops/index.md b/doc/ci/chatops/index.md
index 3354c94aff2..f0efb5fc884 100644
--- a/doc/ci/chatops/index.md
+++ b/doc/ci/chatops/index.md
@@ -121,6 +121,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/ci/ci_cd_for_external_repos/bitbucket_integration.md b/doc/ci/ci_cd_for_external_repos/bitbucket_integration.md
index 3c4c33aa32c..a0665e1c054 100644
--- a/doc/ci/ci_cd_for_external_repos/bitbucket_integration.md
+++ b/doc/ci/ci_cd_for_external_repos/bitbucket_integration.md
@@ -165,6 +165,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/ci/ci_cd_for_external_repos/github_integration.md b/doc/ci/ci_cd_for_external_repos/github_integration.md
index 18cc430c225..9933fafcb69 100644
--- a/doc/ci/ci_cd_for_external_repos/github_integration.md
+++ b/doc/ci/ci_cd_for_external_repos/github_integration.md
@@ -98,6 +98,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/ci/enable_or_disable_ci.md b/doc/ci/enable_or_disable_ci.md
index adb9b5a87d5..e75f902c153 100644
--- a/doc/ci/enable_or_disable_ci.md
+++ b/doc/ci/enable_or_disable_ci.md
@@ -54,6 +54,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/ci/environments/deployment_approvals.md b/doc/ci/environments/deployment_approvals.md
index 4fd6a3968db..d7fa31b583b 100644
--- a/doc/ci/environments/deployment_approvals.md
+++ b/doc/ci/environments/deployment_approvals.md
@@ -186,6 +186,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/ci/pipelines/schedules.md b/doc/ci/pipelines/schedules.md
index 0eeb0eada87..02728d5e1e0 100644
--- a/doc/ci/pipelines/schedules.md
+++ b/doc/ci/pipelines/schedules.md
@@ -95,6 +95,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/ci/pipelines/settings.md b/doc/ci/pipelines/settings.md
index d1e34d803bb..20ff4aa0da3 100644
--- a/doc/ci/pipelines/settings.md
+++ b/doc/ci/pipelines/settings.md
@@ -463,6 +463,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/development/database/database_migration_pipeline.md b/doc/development/database/database_migration_pipeline.md
index e5ab837bf94..06e16b4c7f1 100644
--- a/doc/development/database/database_migration_pipeline.md
+++ b/doc/development/database/database_migration_pipeline.md
@@ -30,39 +30,46 @@ Each database tested has four sections which are described below.
The first section of the comment contains a summary of the test results, including:
-| Result | Description |
-|-------------------|---------------------------------------------------------------------------------------------------------------------|
-| Warnings | Highlights critical issues such as exceptions or long-running queries. |
-| Migrations | The time each migration took to complete, whether it was successful, and the increment in the size of the database. |
-| Runtime histogram | Expand this section to see a histogram of query runtimes across all migrations. |
+- **Warnings** - Highlights critical issues such as exceptions or long-running queries.
+- **Migrations** - The time each migration took to complete, whether it was successful,
+ and the increment in the size of the database.
+- **Runtime histogram** - Expand this section to see a histogram of query runtimes across all migrations.
## Migration details
The next section of the comment contains detailed information for each migration, including:
-| Result | Description |
-|-------------------|-------------------------------------------------------------------------------------------------------------------------|
-| Details | The type of migration, total duration, and database size change. |
-| Queries | Every query executed during the migration, along with the number of calls, timings, and the number of the changed rows. |
-| Runtime histogram | Indicates the distribution of query times for the migration. |
+- **Details** - The type of migration, total duration, and database size change.
+- **Queries** - Every query executed during the migration, along with the number of
+ calls, timings, and the number of the changed rows.
+- **Runtime histogram** - Indicates the distribution of query times for the migration.
-## Background Migration Details
+## Background migration details
The next section of the comment contains detailed information about each batched background migration, including:
-| Result | Description |
-|------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| Sampling Information | The number of batches sampled during this test run. Sampled batches are chosen uniformly across the table's ID range. Sampling runs for 30 minutes, split evenly across each background migration to test. |
-| Aggregated Query Information | Aggregate data about each query executed across all the sampled batches, along with the number of calls, timings, and the number of changed rows. |
-| Batch runtime histogram | A histogram of timings for each sampled batch from the background migration. |
-| Query runtime histogram | A histogram of timings for all queries executed in any batch of this background migration. |
+- **Sampling information** - The number of batches sampled during this test run.
+ Sampled batches are chosen uniformly across the table's ID range. Sampling runs
+ for 30 minutes, split evenly across each background migration to test.
+- **Aggregated query information** - Aggregate data about each query executed across
+ all the sampled batches, along with the number of calls, timings, and the number of changed rows.
+- **Batch runtime histogram** - A histogram of timings for each sampled batch
+ from the background migration.
+- **Query runtime histogram** - A histogram of timings for all queries executed
+ in any batch of this background migration.
## Clone details and artifacts
Some additional information is included at the bottom of the comment:
-| Result | Description |
-|----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| Migrations pending on GitLab.com | A summary of migrations not deployed yet to GitLab.com. This information is useful when testing a migration that was merged but not deployed yet. |
-| Clone details | A link to the `Postgres.ai` thin clone created for this testing pipeline, along with information about its expiry. This can be used to further explore the results of running the migration. Only accessible by database maintainers or with an access request. |
-| Artifacts | A link to the pipeline's artifacts. Full query logs for each migration (ending in `.log`) are available there and only accessible by database maintainers or with an access request. Details of the specific batched background migration batches sampled are also available. |
+- **Migrations pending on GitLab.com** - A summary of migrations not deployed yet
+ to GitLab.com. This information is useful when testing a migration that was merged
+ but not deployed yet.
+- **Clone details** - A link to the `Postgres.ai` thin clone created for this
+ testing pipeline, along with information about its expiry. This can be used to
+ further explore the results of running the migration. Only accessible by
+ database maintainers or with an access request.
+- **Artifacts** - A link to the pipeline's artifacts. Full query logs for each
+ migration (ending in `.log`) are available there, and only accessible by
+ database maintainers or with an access request. Details of the specific
+ batched background migration batches sampled are also available.
diff --git a/doc/gitlab-basics/add-file.md b/doc/gitlab-basics/add-file.md
index 64384372a44..95b8b59a48d 100644
--- a/doc/gitlab-basics/add-file.md
+++ b/doc/gitlab-basics/add-file.md
@@ -90,6 +90,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/gitlab-basics/command-line-commands.md b/doc/gitlab-basics/command-line-commands.md
index 4b53535a711..07ab9365693 100644
--- a/doc/gitlab-basics/command-line-commands.md
+++ b/doc/gitlab-basics/command-line-commands.md
@@ -118,6 +118,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/gitlab-basics/start-using-git.md b/doc/gitlab-basics/start-using-git.md
index 056fad4061b..25ef094b2a7 100644
--- a/doc/gitlab-basics/start-using-git.md
+++ b/doc/gitlab-basics/start-using-git.md
@@ -443,6 +443,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/install/aws/manual_install_aws.md b/doc/install/aws/manual_install_aws.md
index 7dbb245dd99..5d8138e4705 100644
--- a/doc/install/aws/manual_install_aws.md
+++ b/doc/install/aws/manual_install_aws.md
@@ -147,7 +147,7 @@ We now create a VPC, a virtual networking environment that you control:
![Create VPC](img/create_vpc.png)
-1. Select the VPC, select **Actions**, select **Edit DNS resolution**, and enable DNS resolution. Hit **Save** when done.
+1. Select the VPC, select **Actions**, select **Edit DNS resolution**, and enable DNS resolution. Select **Save** when done.
### Subnets
@@ -226,7 +226,7 @@ it receive traffic from any destination.
route to show the options at the bottom.
1. Select the **Routes** tab, select **Edit routes > Add route** and set `0.0.0.0/0`
as the destination. In the target column, select the `gitlab-gateway` we created previously.
- Hit **Save routes** once done.
+ Select **Save routes** when done.
Next, we must associate the **public** subnets to the route table:
diff --git a/doc/install/google_cloud_platform/index.md b/doc/install/google_cloud_platform/index.md
index 7ba1fbad5ea..d16ac3e2174 100644
--- a/doc/install/google_cloud_platform/index.md
+++ b/doc/install/google_cloud_platform/index.md
@@ -143,6 +143,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/install/relative_url.md b/doc/install/relative_url.md
index 3fe34f6a9b0..6f4221f9e2e 100644
--- a/doc/install/relative_url.md
+++ b/doc/install/relative_url.md
@@ -134,6 +134,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/install/requirements.md b/doc/install/requirements.md
index cfa7ead3601..f581a1c50f9 100644
--- a/doc/install/requirements.md
+++ b/doc/install/requirements.md
@@ -322,6 +322,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/security/crime_vulnerability.md b/doc/security/crime_vulnerability.md
index e2aa4b5d4ab..463ccb7b629 100644
--- a/doc/security/crime_vulnerability.md
+++ b/doc/security/crime_vulnerability.md
@@ -70,6 +70,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/security/information_exclusivity.md b/doc/security/information_exclusivity.md
index 37a9fdfdd81..16facadd782 100644
--- a/doc/security/information_exclusivity.md
+++ b/doc/security/information_exclusivity.md
@@ -35,6 +35,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/security/password_length_limits.md b/doc/security/password_length_limits.md
index 698fb0efe55..0211a326e0a 100644
--- a/doc/security/password_length_limits.md
+++ b/doc/security/password_length_limits.md
@@ -37,6 +37,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/security/ssh_keys_restrictions.md b/doc/security/ssh_keys_restrictions.md
index 5a8450bb8e7..f15d71461d4 100644
--- a/doc/security/ssh_keys_restrictions.md
+++ b/doc/security/ssh_keys_restrictions.md
@@ -71,6 +71,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/security/two_factor_authentication.md b/doc/security/two_factor_authentication.md
index 0343dc3f551..95915c4e03b 100644
--- a/doc/security/two_factor_authentication.md
+++ b/doc/security/two_factor_authentication.md
@@ -171,6 +171,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/security/unlock_user.md b/doc/security/unlock_user.md
index dc3764e9b0f..9a1f60f2462 100644
--- a/doc/security/unlock_user.md
+++ b/doc/security/unlock_user.md
@@ -66,6 +66,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/security/user_email_confirmation.md b/doc/security/user_email_confirmation.md
index 3f7c66b311b..ffc537c8f10 100644
--- a/doc/security/user_email_confirmation.md
+++ b/doc/security/user_email_confirmation.md
@@ -28,6 +28,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/security/user_file_uploads.md b/doc/security/user_file_uploads.md
index 63a5e51e3b5..db2948a8bd5 100644
--- a/doc/security/user_file_uploads.md
+++ b/doc/security/user_file_uploads.md
@@ -53,6 +53,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/security/webhooks.md b/doc/security/webhooks.md
index 49ab4215ea5..eeb6720dfb7 100644
--- a/doc/security/webhooks.md
+++ b/doc/security/webhooks.md
@@ -99,6 +99,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/subscriptions/index.md b/doc/subscriptions/index.md
index ceda10d9a1c..47c1f730746 100644
--- a/doc/subscriptions/index.md
+++ b/doc/subscriptions/index.md
@@ -265,6 +265,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/topics/git/how_to_install_git/index.md b/doc/topics/git/how_to_install_git/index.md
index 7d753374473..f3ea1431733 100644
--- a/doc/topics/git/how_to_install_git/index.md
+++ b/doc/topics/git/how_to_install_git/index.md
@@ -89,6 +89,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/topics/git/lfs/migrate_to_git_lfs.md b/doc/topics/git/lfs/migrate_to_git_lfs.md
index d661deec0ea..07c89e52653 100644
--- a/doc/topics/git/lfs/migrate_to_git_lfs.md
+++ b/doc/topics/git/lfs/migrate_to_git_lfs.md
@@ -172,7 +172,7 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/topics/git/numerous_undo_possibilities_in_git/index.md b/doc/topics/git/numerous_undo_possibilities_in_git/index.md
index e1e4300f42c..678e03a2c13 100644
--- a/doc/topics/git/numerous_undo_possibilities_in_git/index.md
+++ b/doc/topics/git/numerous_undo_possibilities_in_git/index.md
@@ -402,7 +402,7 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/topics/git/useful_git_commands.md b/doc/topics/git/useful_git_commands.md
index 26ad155054b..4156a3078da 100644
--- a/doc/topics/git/useful_git_commands.md
+++ b/doc/topics/git/useful_git_commands.md
@@ -217,6 +217,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/update/deprecations.md b/doc/update/deprecations.md
index 147bf5b1715..fe8efac9e71 100644
--- a/doc/update/deprecations.md
+++ b/doc/update/deprecations.md
@@ -121,6 +121,20 @@ As part of the new [GitLab Runner token architecture](https://docs.gitlab.com/ee
From GitLab 16.0 and later, the methods to register runners introduced by the new GitLab Runner token architecture will be the only supported methods.
</div>
+
+<div class="deprecation removal-160 breaking-change">
+
+### merge_status API field
+
+Planned removal: GitLab <span class="removal-milestone">16.0</span> (2023-05-22)
+
+WARNING:
+This is a [breaking change](https://docs.gitlab.com/ee/development/deprecation_guidelines/).
+Review the details carefully before upgrading.
+
+The `merge_status` field in the [merge request API](https://docs.gitlab.com/ee/api/merge_requests.html#merge-status) has been deprecated in favor of the `detailed_merge_status` field which more correctly identifies all of the potential statuses that a merge request can be in. API users are encouraged to use the new `detailed_merge_status` field instead. The `merge_status` field will be removed in v5 of the GitLab REST API.
+
+</div>
</div>
<div class="announcement-milestone">
diff --git a/doc/user/admin_area/appearance.md b/doc/user/admin_area/appearance.md
index 5513fa3585d..fc42c7770f2 100644
--- a/doc/user/admin_area/appearance.md
+++ b/doc/user/admin_area/appearance.md
@@ -94,6 +94,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/admin_area/broadcast_messages.md b/doc/user/admin_area/broadcast_messages.md
index e5d0a6e297e..acb3e92fff8 100644
--- a/doc/user/admin_area/broadcast_messages.md
+++ b/doc/user/admin_area/broadcast_messages.md
@@ -111,6 +111,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/admin_area/custom_project_templates.md b/doc/user/admin_area/custom_project_templates.md
index 551ed667250..de2856c2320 100644
--- a/doc/user/admin_area/custom_project_templates.md
+++ b/doc/user/admin_area/custom_project_templates.md
@@ -49,6 +49,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/admin_area/diff_limits.md b/doc/user/admin_area/diff_limits.md
index 3a1ecac6ee6..3d7c49c1f2b 100644
--- a/doc/user/admin_area/diff_limits.md
+++ b/doc/user/admin_area/diff_limits.md
@@ -47,6 +47,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/admin_area/email_from_gitlab.md b/doc/user/admin_area/email_from_gitlab.md
index c1d3521d60c..ba465fbea29 100644
--- a/doc/user/admin_area/email_from_gitlab.md
+++ b/doc/user/admin_area/email_from_gitlab.md
@@ -55,6 +55,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/admin_area/geo_sites.md b/doc/user/admin_area/geo_sites.md
index 093ed84f41a..f3be036fd38 100644
--- a/doc/user/admin_area/geo_sites.md
+++ b/doc/user/admin_area/geo_sites.md
@@ -112,6 +112,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/admin_area/labels.md b/doc/user/admin_area/labels.md
index 524546d447c..8e1ca979707 100644
--- a/doc/user/admin_area/labels.md
+++ b/doc/user/admin_area/labels.md
@@ -22,6 +22,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/admin_area/monitoring/health_check.md b/doc/user/admin_area/monitoring/health_check.md
index e6f9c045329..2939a8b0418 100644
--- a/doc/user/admin_area/monitoring/health_check.md
+++ b/doc/user/admin_area/monitoring/health_check.md
@@ -143,6 +143,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/admin_area/review_abuse_reports.md b/doc/user/admin_area/review_abuse_reports.md
index af2f6640f8e..b8531fded18 100644
--- a/doc/user/admin_area/review_abuse_reports.md
+++ b/doc/user/admin_area/review_abuse_reports.md
@@ -89,6 +89,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/admin_area/settings/continuous_integration.md b/doc/user/admin_area/settings/continuous_integration.md
index 454f597f867..adca9c85af1 100644
--- a/doc/user/admin_area/settings/continuous_integration.md
+++ b/doc/user/admin_area/settings/continuous_integration.md
@@ -20,10 +20,10 @@ for all projects:
1. Check (or uncheck to disable) the box that says **Default to Auto DevOps pipeline for all projects**.
1. Optionally, set up the [Auto DevOps base domain](../../../topics/autodevops/requirements.md#auto-devops-base-domain)
which is used for Auto Deploy and Auto Review Apps.
-1. Hit **Save changes** for the changes to take effect.
+1. Select **Save changes** for the changes to take effect.
From now on, every existing project and newly created ones that don't have a
-`.gitlab-ci.yml`, uses the Auto DevOps pipelines.
+`.gitlab-ci.yml` use the Auto DevOps pipelines.
If you want to disable it for a specific project, you can do so in
[its settings](../../../topics/autodevops/index.md#enable-or-disable-auto-devops).
@@ -174,7 +174,7 @@ To set the duration for which the jobs are considered as old and expired:
1. On the left sidebar, select **Settings > CI/CD**.
1. Expand the **Continuous Integration and Deployment** section.
1. Set the value of **Archive jobs**.
-1. Hit **Save changes** for the changes to take effect.
+1. Select **Save changes** for the changes to take effect.
After that time passes, the jobs are archived in the background and no longer able to be
retried. Make it empty to never expire jobs. It has to be no less than 1 day,
@@ -201,7 +201,7 @@ of your GitLab instance (`.gitlab-ci.yml` if not set):
1. On the top bar, select **Main menu > Admin**.
1. On the left sidebar, select **Settings > CI/CD**.
1. Input the new file and path in the **Default CI/CD configuration file** field.
-1. Hit **Save changes** for the changes to take effect.
+1. Select **Save changes** for the changes to take effect.
It is also possible to specify a [custom CI/CD configuration file for a specific project](../../../ci/pipelines/settings.md#specify-a-custom-cicd-configuration-file).
diff --git a/doc/user/admin_area/settings/email.md b/doc/user/admin_area/settings/email.md
index 6a7c01ff98b..6d2a3c2cdae 100644
--- a/doc/user/admin_area/settings/email.md
+++ b/doc/user/admin_area/settings/email.md
@@ -92,6 +92,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/admin_area/settings/external_authorization.md b/doc/user/admin_area/settings/external_authorization.md
index 62d3d713616..a34ceac0d95 100644
--- a/doc/user/admin_area/settings/external_authorization.md
+++ b/doc/user/admin_area/settings/external_authorization.md
@@ -115,6 +115,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/admin_area/settings/floc.md b/doc/user/admin_area/settings/floc.md
index 08f3e8c09b2..f8137afa40f 100644
--- a/doc/user/admin_area/settings/floc.md
+++ b/doc/user/admin_area/settings/floc.md
@@ -36,6 +36,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/admin_area/settings/help_page.md b/doc/user/admin_area/settings/help_page.md
index 654d153d0b0..8d0fef398af 100644
--- a/doc/user/admin_area/settings/help_page.md
+++ b/doc/user/admin_area/settings/help_page.md
@@ -106,6 +106,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/admin_area/settings/instance_template_repository.md b/doc/user/admin_area/settings/instance_template_repository.md
index 44961e83563..bf07c5b2808 100644
--- a/doc/user/admin_area/settings/instance_template_repository.md
+++ b/doc/user/admin_area/settings/instance_template_repository.md
@@ -82,6 +82,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/admin_area/settings/sign_up_restrictions.md b/doc/user/admin_area/settings/sign_up_restrictions.md
index f2139583cc2..76415596dce 100644
--- a/doc/user/admin_area/settings/sign_up_restrictions.md
+++ b/doc/user/admin_area/settings/sign_up_restrictions.md
@@ -198,6 +198,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/admin_area/settings/terms.md b/doc/user/admin_area/settings/terms.md
index 28fe352c684..9a02e50b23f 100644
--- a/doc/user/admin_area/settings/terms.md
+++ b/doc/user/admin_area/settings/terms.md
@@ -43,6 +43,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/admin_area/settings/third_party_offers.md b/doc/user/admin_area/settings/third_party_offers.md
index fbd282ed5ad..8d2ae72ba69 100644
--- a/doc/user/admin_area/settings/third_party_offers.md
+++ b/doc/user/admin_area/settings/third_party_offers.md
@@ -31,6 +31,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/admin_area/settings/usage_statistics.md b/doc/user/admin_area/settings/usage_statistics.md
index 5607f7e9950..df60268a8bf 100644
--- a/doc/user/admin_area/settings/usage_statistics.md
+++ b/doc/user/admin_area/settings/usage_statistics.md
@@ -202,6 +202,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/admin_area/settings/user_and_ip_rate_limits.md b/doc/user/admin_area/settings/user_and_ip_rate_limits.md
index 7431fc329d1..e285275f5bb 100644
--- a/doc/user/admin_area/settings/user_and_ip_rate_limits.md
+++ b/doc/user/admin_area/settings/user_and_ip_rate_limits.md
@@ -225,6 +225,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/admin_area/settings/visibility_and_access_controls.md b/doc/user/admin_area/settings/visibility_and_access_controls.md
index 0afc2ca156b..6d878bcb01c 100644
--- a/doc/user/admin_area/settings/visibility_and_access_controls.md
+++ b/doc/user/admin_area/settings/visibility_and_access_controls.md
@@ -309,6 +309,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/application_security/security_dashboard/index.md b/doc/user/application_security/security_dashboard/index.md
index af98fc783e7..7c44b49b78c 100644
--- a/doc/user/application_security/security_dashboard/index.md
+++ b/doc/user/application_security/security_dashboard/index.md
@@ -153,7 +153,7 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/clusters/agent/gitops/helm.md b/doc/user/clusters/agent/gitops/helm.md
index af9f80618b5..0ec87376636 100644
--- a/doc/user/clusters/agent/gitops/helm.md
+++ b/doc/user/clusters/agent/gitops/helm.md
@@ -54,16 +54,50 @@ gitops:
path: dir-in-project/with/charts
namespace: my-ns
max_history: 1
+ values:
+ - inline:
+ someKey: example value
```
| Keyword | Description |
|--|--|
| `charts` | List of charts you want to be applied in your cluster. Charts are applied concurrently. |
| `release_name` | Required. Name of the release to use when applying the chart. |
-| `id` | Required. ID of the project where Helm chart is committed. No authentication mechanisms are currently supported. |
-| `path` | Optional. Path of the chart in the project repository. Root of the repository is used by default. This is the directory with the `Chart.yaml` file. |
+| `values` | Optional. [Custom values](#custom-values) for the release. An array of objects. Only supports `inline` values. |
| `namespace` | Optional. Namespace to use when applying the chart. Defaults to `default`. |
| `max_history` | Optional. Maximum number of release [revisions to store in the cluster](https://helm.sh/docs/helm/helm_history/). |
+| `source` | Required. From where the chart should get installed. Only supports project sources. |
+| `source.project.id` | Required. ID of the project where Helm chart is committed. Authentication is not supported. |
+| `source.project.path` | Optional. Path of the chart in the project repository. Root of the repository is used by default. Should be the directory with the `Chart.yaml` file. |
+
+## Custom values
+
+> [Introduced](https://gitlab.com/gitlab-org/cluster-integration/gitlab-agent/-/merge_requests/766) in GitLab 15.6. Requires both GitLab and the installed agent to be version 15.6 or later.
+
+To customize the values for a release, set the `values` key. It must be
+an array of objects. Each object must have exactly one top-level key that describes
+where the values come from. The supported top-level keys are:
+
+- `inline`: Specify the values inline in YAML format, similar to a Helm values
+ file.
+
+When installing a chart with custom values:
+
+- Custom values get merged on top of the chart's default `values.yaml` file.
+- Values from subsequent entries in the `values` array overwrite values from
+ previous entries.
+
+Example:
+
+```yaml
+gitops:
+ charts:
+ - release_name: some-release
+ values:
+ - inline:
+ someKey: example value
+ # ...
+```
## Automatic drift remediation
@@ -98,7 +132,7 @@ The following are known issues:
[this epic](https://gitlab.com/groups/gitlab-org/-/epics/7704).
- Values for the chart must be in a `values.yaml` file. This file must be with the chart,
in the same project and path.
-- Because of drift detection and remediation, release history, stored in the cluster, is not useful.
+- Because of drift detection and remediation, the release history stored in the cluster is not useful.
A new release is created every five minutes and the oldest release is discarded.
Eventually history consists only of the same information.
View [this issue](https://gitlab.com/gitlab-org/gitlab/-/issues/372023) for details.
diff --git a/doc/user/group/clusters/index.md b/doc/user/group/clusters/index.md
index c6cc828302f..62f5a3ba54f 100644
--- a/doc/user/group/clusters/index.md
+++ b/doc/user/group/clusters/index.md
@@ -187,6 +187,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/group/contribution_analytics/index.md b/doc/user/group/contribution_analytics/index.md
index 07561e020ba..b1efd2e9251 100644
--- a/doc/user/group/contribution_analytics/index.md
+++ b/doc/user/group/contribution_analytics/index.md
@@ -74,6 +74,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/group/custom_project_templates.md b/doc/user/group/custom_project_templates.md
index 7f77c2147e1..547e64df7c5 100644
--- a/doc/user/group/custom_project_templates.md
+++ b/doc/user/group/custom_project_templates.md
@@ -78,6 +78,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/group/epics/index.md b/doc/user/group/epics/index.md
index 985f1edeee0..21c95f37aeb 100644
--- a/doc/user/group/epics/index.md
+++ b/doc/user/group/epics/index.md
@@ -71,6 +71,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/group/insights/index.md b/doc/user/group/insights/index.md
index b4bca919498..9eb6d4387c1 100644
--- a/doc/user/group/insights/index.md
+++ b/doc/user/group/insights/index.md
@@ -79,6 +79,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/group/issues_analytics/index.md b/doc/user/group/issues_analytics/index.md
index 4764625ff83..dbade014ec2 100644
--- a/doc/user/group/issues_analytics/index.md
+++ b/doc/user/group/issues_analytics/index.md
@@ -55,6 +55,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/group/repositories_analytics/index.md b/doc/user/group/repositories_analytics/index.md
index 3ac26032294..9971457f2ac 100644
--- a/doc/user/group/repositories_analytics/index.md
+++ b/doc/user/group/repositories_analytics/index.md
@@ -82,6 +82,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/group/roadmap/index.md b/doc/user/group/roadmap/index.md
index 28431cb6b9a..3a9d0c833c1 100644
--- a/doc/user/group/roadmap/index.md
+++ b/doc/user/group/roadmap/index.md
@@ -164,6 +164,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/group/subgroups/index.md b/doc/user/group/subgroups/index.md
index 58f5e476f26..95c8e60af5d 100644
--- a/doc/user/group/subgroups/index.md
+++ b/doc/user/group/subgroups/index.md
@@ -212,6 +212,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/profile/active_sessions.md b/doc/user/profile/active_sessions.md
index d0600e5e80d..430d1c3dc9f 100644
--- a/doc/user/profile/active_sessions.md
+++ b/doc/user/profile/active_sessions.md
@@ -51,6 +51,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/profile/preferences.md b/doc/user/profile/preferences.md
index 9c0d94e6447..dce8684d993 100644
--- a/doc/user/profile/preferences.md
+++ b/doc/user/profile/preferences.md
@@ -230,6 +230,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/project/import/github.md b/doc/user/project/import/github.md
index 4e8115dda25..04457ca9073 100644
--- a/doc/user/project/import/github.md
+++ b/doc/user/project/import/github.md
@@ -112,8 +112,8 @@ If you are not using the GitHub integration, you can still perform an authorizat
1. Select **Generate token**.
1. Copy the token hash.
1. Go back to GitLab and provide the token to the GitHub importer.
-1. Hit the **List Your GitHub Repositories** button and wait while GitLab reads your repositories' information.
- Once done, you are taken to the importer page to select the repositories to import.
+1. Select **List Your GitHub Repositories** and wait while GitLab reads your repositories' information.
+ When done, you are taken to the importer page to select the repositories to import.
To use a newer personal access token in imports after previously performing these steps, sign out of
your GitLab account and sign in again, or revoke the older personal access token in GitHub.
diff --git a/doc/user/project/issues/confidential_issues.md b/doc/user/project/issues/confidential_issues.md
index b1bb3f0dbf8..2b302a60d63 100644
--- a/doc/user/project/issues/confidential_issues.md
+++ b/doc/user/project/issues/confidential_issues.md
@@ -16,9 +16,9 @@ keep security vulnerabilities private or prevent surprises from leaking out.
You can make an issue confidential when you create or edit an issue.
When you create a new issue, a checkbox right below the text area is available
-to mark the issue as confidential. Check that box and hit the **Create issue**
-button to create the issue. For existing issues, edit them, check the
-confidential checkbox and hit **Save changes**.
+to mark the issue as confidential. Check that box and select **Create issue**
+to create the issue. For existing issues, edit them, check the
+confidential checkbox and select **Save changes**.
When you create a confidential issue in a project, the project becomes listed in the **Contributed projects** section in your [profile](../../profile/index.md). **Contributed projects** does not show information about the confidential issue; it only shows the project name.
diff --git a/doc/user/project/merge_requests/authorization_for_merge_requests.md b/doc/user/project/merge_requests/authorization_for_merge_requests.md
index ba28432e90a..52944ee3143 100644
--- a/doc/user/project/merge_requests/authorization_for_merge_requests.md
+++ b/doc/user/project/merge_requests/authorization_for_merge_requests.md
@@ -68,6 +68,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/project/merge_requests/conflicts.md b/doc/user/project/merge_requests/conflicts.md
index 902095bcbce..24f22924a08 100644
--- a/doc/user/project/merge_requests/conflicts.md
+++ b/doc/user/project/merge_requests/conflicts.md
@@ -172,6 +172,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/project/merge_requests/drafts.md b/doc/user/project/merge_requests/drafts.md
index 2beb7406518..0bc9b337e3b 100644
--- a/doc/user/project/merge_requests/drafts.md
+++ b/doc/user/project/merge_requests/drafts.md
@@ -88,6 +88,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/project/merge_requests/revert_changes.md b/doc/user/project/merge_requests/revert_changes.md
index 3b07f75a3a7..76f351f1346 100644
--- a/doc/user/project/merge_requests/revert_changes.md
+++ b/doc/user/project/merge_requests/revert_changes.md
@@ -95,6 +95,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/project/merge_requests/reviews/suggestions.md b/doc/user/project/merge_requests/reviews/suggestions.md
index 1d91eee787b..832f78d18a1 100644
--- a/doc/user/project/merge_requests/reviews/suggestions.md
+++ b/doc/user/project/merge_requests/reviews/suggestions.md
@@ -47,8 +47,11 @@ After the author applies a suggestion:
## Multi-line suggestions
+> [Changed](https://gitlab.com/gitlab-org/gitlab/-/issues/232339) in GitLab 13.11: suggestions in multi-line comments also become multi-line.
+
Reviewers can also suggest changes to multiple lines with a single suggestion
-within merge request diff threads by adjusting the range offsets. The
+within merge request diff threads by selecting and dragging selection to all
+relevant line numbers or by adjusting the range offsets. The
offsets are relative to the position of the diff thread, and specify the
range to be replaced by the suggestion when it is applied.
diff --git a/doc/user/project/merge_requests/squash_and_merge.md b/doc/user/project/merge_requests/squash_and_merge.md
index e83e17072d6..9f87f1e2e0d 100644
--- a/doc/user/project/merge_requests/squash_and_merge.md
+++ b/doc/user/project/merge_requests/squash_and_merge.md
@@ -83,6 +83,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/project/merge_requests/versions.md b/doc/user/project/merge_requests/versions.md
index 4e285baa542..a864a9849b0 100644
--- a/doc/user/project/merge_requests/versions.md
+++ b/doc/user/project/merge_requests/versions.md
@@ -76,6 +76,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/project/milestones/burndown_and_burnup_charts.md b/doc/user/project/milestones/burndown_and_burnup_charts.md
index 01eeee9d3b9..81b334c0a02 100644
--- a/doc/user/project/milestones/burndown_and_burnup_charts.md
+++ b/doc/user/project/milestones/burndown_and_burnup_charts.md
@@ -145,6 +145,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/project/milestones/index.md b/doc/user/project/milestones/index.md
index 76c5e32eb2b..bbe4aadc50d 100644
--- a/doc/user/project/milestones/index.md
+++ b/doc/user/project/milestones/index.md
@@ -238,6 +238,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/project/protected_branches.md b/doc/user/project/protected_branches.md
index f9dcf838c33..ab97ff08123 100644
--- a/doc/user/project/protected_branches.md
+++ b/doc/user/project/protected_branches.md
@@ -260,6 +260,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/project/protected_tags.md b/doc/user/project/protected_tags.md
index 22ce81409a3..152a55d24b7 100644
--- a/doc/user/project/protected_tags.md
+++ b/doc/user/project/protected_tags.md
@@ -114,6 +114,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/project/quick_actions.md b/doc/user/project/quick_actions.md
index 7d59d93df56..f19aee96514 100644
--- a/doc/user/project/quick_actions.md
+++ b/doc/user/project/quick_actions.md
@@ -145,6 +145,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/project/repository/branches/index.md b/doc/user/project/repository/branches/index.md
index 9755b5cb944..6cc7394e7b3 100644
--- a/doc/user/project/repository/branches/index.md
+++ b/doc/user/project/repository/branches/index.md
@@ -124,6 +124,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/project/repository/web_editor.md b/doc/user/project/repository/web_editor.md
index 9bedea2cce4..c9ef70e57b8 100644
--- a/doc/user/project/repository/web_editor.md
+++ b/doc/user/project/repository/web_editor.md
@@ -253,6 +253,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/doc/user/public_access.md b/doc/user/public_access.md
index 5b307592871..bdc711f2098 100644
--- a/doc/user/public_access.md
+++ b/doc/user/public_access.md
@@ -107,6 +107,6 @@ important to describe those, too. Think of things that may go wrong and include
This is important to minimize requests for support, and to avoid doc comments with
questions that you know someone might ask.
-Each scenario can be a third-level heading, e.g. `### Getting error message X`.
+Each scenario can be a third-level heading, for example `### Getting error message X`.
If you have none to add when creating a doc, leave this section in place
but commented out to help encourage others to add to it in the future. -->
diff --git a/glfm_specification/output_example_snapshots/html.yml b/glfm_specification/output_example_snapshots/html.yml
index a16ee2e7200..bdd0777ce17 100644
--- a/glfm_specification/output_example_snapshots/html.yml
+++ b/glfm_specification/output_example_snapshots/html.yml
@@ -7921,7 +7921,7 @@
canonical: |
<p><a href="projects-test-file">projects-test-file</a></p>
static: |-
- <p data-sourcepos="1:1-1:40" dir="auto"><a href="/glfm_group/glfm_project/-/blob/master/projects-test-file">projects-test-file</a></p>
+ <p data-sourcepos="1:1-1:40" dir="auto"><a href="/glfm_group/glfm_project/-/blob/master/projects-test-file" class="gfm">projects-test-file</a></p>
08_03_00__gitlab_internal_extension_markdown__markdown_preview_api_request_overrides__003:
canonical: |
<p>This project snippet ID reference IS filtered: $88888</p>
diff --git a/lib/api/api.rb b/lib/api/api.rb
index 3857979b67b..d49b11d812b 100644
--- a/lib/api/api.rb
+++ b/lib/api/api.rb
@@ -195,11 +195,13 @@ module API
mount ::API::DeployTokens
mount ::API::Deployments
mount ::API::Environments
+ mount ::API::ErrorTracking::ProjectSettings
mount ::API::FeatureFlags
mount ::API::FeatureFlagsUserLists
mount ::API::Features
mount ::API::Files
mount ::API::FreezePeriods
+ mount ::API::Geo
mount ::API::GroupAvatar
mount ::API::GroupClusters
mount ::API::GroupExport
@@ -215,6 +217,7 @@ module API
mount ::API::MergeRequestDiffs
mount ::API::Metadata
mount ::API::Metrics::UserStarredDashboards
+ mount ::API::PackageFiles
mount ::API::PersonalAccessTokens::SelfInformation
mount ::API::PersonalAccessTokens
mount ::API::ProjectClusters
@@ -245,6 +248,7 @@ module API
mount ::API::Terraform::Modules::V1::Packages
mount ::API::Terraform::State
mount ::API::Terraform::StateVersion
+ mount ::API::Topics
mount ::API::Unleash
mount ::API::UserCounts
mount ::API::Wikis
@@ -276,10 +280,8 @@ module API
mount ::API::Discussions
mount ::API::ErrorTracking::ClientKeys
mount ::API::ErrorTracking::Collector
- mount ::API::ErrorTracking::ProjectSettings
mount ::API::Events
mount ::API::GenericPackages
- mount ::API::Geo
mount ::API::GoProxy
mount ::API::GroupBoards
mount ::API::GroupContainerRepositories
@@ -305,7 +307,6 @@ module API
mount ::API::NpmProjectPackages
mount ::API::NugetGroupPackages
mount ::API::NugetProjectPackages
- mount ::API::PackageFiles
mount ::API::Pages
mount ::API::PagesDomains
mount ::API::ProjectContainerRepositories
@@ -327,7 +328,6 @@ module API
mount ::API::Tags
mount ::API::Templates
mount ::API::Todos
- mount ::API::Topics
mount ::API::UsageData
mount ::API::UsageDataNonSqlMetrics
mount ::API::UsageDataQueries
diff --git a/lib/api/entities/error_tracking.rb b/lib/api/entities/error_tracking.rb
index 163bda92680..27288b8bbe8 100644
--- a/lib/api/entities/error_tracking.rb
+++ b/lib/api/entities/error_tracking.rb
@@ -4,11 +4,11 @@ module API
module Entities
module ErrorTracking
class ProjectSetting < Grape::Entity
- expose :enabled, as: :active
- expose :project_name
- expose :sentry_external_url
- expose :api_url
- expose :integrated
+ expose :enabled, as: :active, documentation: { type: 'boolean' }
+ expose :project_name, documentation: { type: 'string', example: 'sample sentry project' }
+ expose :sentry_external_url, documentation: { type: 'string', example: 'https://sentry.io/myawesomeproject/project' }
+ expose :api_url, documentation: { type: 'string', example: 'https://sentry.io/api/0/projects/myawesomeproject/project' }
+ expose :integrated, documentation: { type: 'boolean' }
def integrated
return false unless ::Feature.enabled?(:integrated_error_tracking, object.project)
diff --git a/lib/api/entities/package_file.rb b/lib/api/entities/package_file.rb
index e34a6a7aa1d..19372b75012 100644
--- a/lib/api/entities/package_file.rb
+++ b/lib/api/entities/package_file.rb
@@ -3,9 +3,14 @@
module API
module Entities
class PackageFile < Grape::Entity
- expose :id, :package_id, :created_at
- expose :file_name, :size
- expose :file_md5, :file_sha1, :file_sha256
+ expose :id, documentation: { type: 'integer', example: 225 }
+ expose :package_id, documentation: { type: 'integer', example: 4 }
+ expose :created_at, documentation: { type: 'dateTime', example: '2018-11-07T15:25:52.199Z' }
+ expose :file_name, documentation: { type: 'string', example: 'my-app-1.5-20181107.152550-1.jar' }
+ expose :size, documentation: { type: 'integer', example: '2421' }
+ expose :file_md5, documentation: { type: 'string', example: '58e6a45a629910c6ff99145a688971ac' }
+ expose :file_sha1, documentation: { type: 'string', example: 'ebd193463d3915d7e22219f52740056dfd26cbfe' }
+ expose :file_sha256, documentation: { type: 'string', example: 'a903393463d3915d7e22219f52740056dfd26cbfeff321b' }
expose :pipelines, if: ->(package_file) { package_file.pipelines.present? }, using: Package::Pipeline
end
end
diff --git a/lib/api/error_tracking/project_settings.rb b/lib/api/error_tracking/project_settings.rb
index 01a55fbbd55..ec1d6a8b87f 100644
--- a/lib/api/error_tracking/project_settings.rb
+++ b/lib/api/error_tracking/project_settings.rb
@@ -4,6 +4,8 @@ module API
class ErrorTracking::ProjectSettings < ::API::Base
before { authenticate! }
+ ERROR_TRACKING_PROJECT_SETTINGS_TAGS = %w[error_tracking_project_settings].freeze
+
feature_category :error_tracking
urgency :low
@@ -14,7 +16,8 @@ module API
end
params do
- requires :id, types: [String, Integer], desc: 'The ID or URL-encoded path of the project'
+ requires :id, types: [String, Integer],
+ desc: 'The ID or URL-encoded path of the project owned by the authenticated user'
end
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
@@ -24,22 +27,35 @@ module API
not_found!('Error Tracking Setting') unless project_setting
end
- desc 'Get error tracking settings for the project' do
- detail 'This feature was introduced in GitLab 12.7.'
+ desc 'Get Error Tracking settings' do
+ detail 'Get error tracking settings for the project. This feature was introduced in GitLab 12.7.'
success Entities::ErrorTracking::ProjectSetting
+ tags ERROR_TRACKING_PROJECT_SETTINGS_TAGS
end
get ':id/error_tracking/settings' do
present project_setting, with: Entities::ErrorTracking::ProjectSetting
end
- desc 'Enable or disable error tracking settings for the project' do
- detail 'This feature was introduced in GitLab 12.8.'
+ desc 'Enable or disable the Error Tracking project settings' do
+ detail 'The API allows you to enable or disable the Error Tracking settings for a project.'\
+ 'Only for users with the Maintainer role for the project.'
success Entities::ErrorTracking::ProjectSetting
+ failure [
+ { code: 400, message: 'Bad request' },
+ { code: 401, message: 'Unauthorized' },
+ { code: 404, message: 'Not found' }
+ ]
+ tags ERROR_TRACKING_PROJECT_SETTINGS_TAGS
end
params do
- requires :active, type: Boolean, desc: 'Specifying whether to enable or disable error tracking settings', allow_blank: false
- optional :integrated, type: Boolean, desc: 'Specifying whether to enable or disable integrated error tracking'
+ requires :active,
+ type: Boolean,
+ desc: 'Pass true to enable the already configured Error Tracking settings or false to disable it.',
+ allow_blank: false
+ optional :integrated,
+ type: Boolean,
+ desc: 'Pass true to enable the integrated Error Tracking backend. Available in GitLab 14.2 and later.'
end
patch ':id/error_tracking/settings/' do
diff --git a/lib/api/geo.rb b/lib/api/geo.rb
index cb04d2a4e1e..8798b76b52b 100644
--- a/lib/api/geo.rb
+++ b/lib/api/geo.rb
@@ -13,6 +13,13 @@ module API
end
resource :geo do
+ desc 'Returns a Geo proxy response' do
+ summary "Determine if a Geo site should proxy requests"
+ success code: 200
+ failure [{ code: 403, message: 'Forbidden' }]
+ tags %w[geo]
+ end
+
# Workhorse calls this to determine if it is a Geo site that should proxy
# requests. Workhorse doesn't know if it's in a FOSS/EE context.
get '/proxy' do
diff --git a/lib/api/package_files.rb b/lib/api/package_files.rb
index bf1cd88c18c..bb9f96cdbb1 100644
--- a/lib/api/package_files.rb
+++ b/lib/api/package_files.rb
@@ -8,19 +8,23 @@ module API
authorize_packages_access!(user_project)
end
+ PACKAGE_FILES_TAGS = %w[package_files].freeze
+
feature_category :package_registry
urgency :low
helpers ::API::Helpers::PackagesHelpers
params do
- requires :id, types: [String, Integer], desc: 'The ID or URL-encoded path of the project'
- requires :package_id, type: Integer, desc: 'The ID of a package'
+ requires :id, types: [String, Integer], desc: 'ID or URL-encoded path of the project'
+ requires :package_id, type: Integer, desc: 'ID of a package'
end
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
- desc 'Get all package files' do
- detail 'This feature was introduced in GitLab 11.8'
+ desc 'List package files' do
+ detail 'Get a list of package files of a single package'
success ::API::Entities::PackageFile
+ is_array true
+ tags PACKAGE_FILES_TAGS
end
params do
use :pagination
@@ -35,11 +39,17 @@ module API
present paginate(package_files), with: ::API::Entities::PackageFile
end
- desc 'Remove a package file' do
+ desc 'Delete a package file' do
detail 'This feature was introduced in GitLab 13.12'
+ success code: 204
+ failure [
+ { code: 403, message: 'Forbidden' },
+ { code: 404, message: 'Not found' }
+ ]
+ tags PACKAGE_FILES_TAGS
end
params do
- requires :package_file_id, type: Integer, desc: 'The ID of a package file'
+ requires :package_file_id, type: Integer, desc: 'ID of a package file'
end
delete ':id/packages/:package_id/package_files/:package_file_id' do
authorize_destroy_package!(user_project)
diff --git a/lib/api/topics.rb b/lib/api/topics.rb
index ff28ccde788..b16b40244d4 100644
--- a/lib/api/topics.rb
+++ b/lib/api/topics.rb
@@ -11,7 +11,9 @@ module API
success Entities::Projects::Topic
end
params do
- optional :search, type: String, desc: 'Return list of topics matching the search criteria'
+ optional :search, type: String,
+ desc: 'Return list of topics matching the search criteria',
+ documentation: { example: 'search' }
optional :without_projects, type: Boolean, desc: 'Return list of topics without assigned projects'
use :pagination
end
diff --git a/lib/banzai/filter/repository_link_filter.rb b/lib/banzai/filter/repository_link_filter.rb
index f5cf1833304..e95da735647 100644
--- a/lib/banzai/filter/repository_link_filter.rb
+++ b/lib/banzai/filter/repository_link_filter.rb
@@ -101,6 +101,7 @@ module Banzai
if uri.relative? && uri.path.present?
html_attr.value = rebuild_relative_uri(uri).to_s
+ html_attr.parent.add_class('gfm')
end
rescue URI::Error, Addressable::URI::InvalidURIError
# noop
diff --git a/lib/gitlab/database/background_migration/batched_migration.rb b/lib/gitlab/database/background_migration/batched_migration.rb
index 209e281dd8d..61a660ad14c 100644
--- a/lib/gitlab/database/background_migration/batched_migration.rb
+++ b/lib/gitlab/database/background_migration/batched_migration.rb
@@ -94,8 +94,7 @@ module Gitlab
end
def self.active_migration(connection:)
- for_gitlab_schema(Gitlab::Database.gitlab_schemas_for_connection(connection))
- .executable.queue_order.first
+ active_migrations_distinct_on_table(connection: connection, limit: 1).first
end
def self.find_executable(id, connection:)
@@ -103,6 +102,15 @@ module Gitlab
.executable.find_by_id(id)
end
+ def self.active_migrations_distinct_on_table(connection:, limit:)
+ distinct_on_table = select('DISTINCT ON (table_name) id')
+ .for_gitlab_schema(Gitlab::Database.gitlab_schemas_for_connection(connection))
+ .executable
+ .order(table_name: :asc, id: :asc)
+
+ where(id: distinct_on_table).queue_order.limit(limit)
+ end
+
def self.successful_rows_counts(migrations)
BatchedJob
.with_status(:succeeded)
diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb
index 544211666bb..dd22b7ada60 100644
--- a/lib/gitlab/usage_data.rb
+++ b/lib/gitlab/usage_data.rb
@@ -339,10 +339,8 @@ module Gitlab
# rubocop: enable UsageData/LargeTable
# rubocop: disable UsageData/LargeTable
- %i[cadence older_than].each do |option|
- ::ContainerExpirationPolicy.public_send("#{option}_options").keys.each do |value| # rubocop: disable GitlabSecurity/PublicSend
- results["projects_with_expiration_policy_enabled_with_#{option}_set_to_#{value}".to_sym] = distinct_count(base.where(option => value), :project_id, start: start, finish: finish)
- end
+ ::ContainerExpirationPolicy.older_than_options.keys.each do |value|
+ results["projects_with_expiration_policy_enabled_with_older_than_set_to_#{value}".to_sym] = distinct_count(base.where(older_than: value), :project_id, start: start, finish: finish)
end
# rubocop: enable UsageData/LargeTable
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 7abfb806d2a..f719a9833e1 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -8004,6 +8004,9 @@ msgstr ""
msgid "ChatMessage|Pipeline %{pipeline_link} of %{ref_type} %{ref_link} by %{user_combined_name} %{humanized_status}"
msgstr ""
+msgid "ChatMessage|Pipeline name"
+msgstr ""
+
msgid "ChatMessage|Tag"
msgstr ""
@@ -34810,7 +34813,7 @@ msgstr ""
msgid "Review time"
msgstr ""
-msgid "Review time is defined as the time it takes from first comment until merged."
+msgid "Review time is the amount of time since the first comment in a merge request."
msgstr ""
msgid "ReviewApp|Enable Review App"
diff --git a/package.json b/package.json
index 84da16079e6..4a378e68872 100644
--- a/package.json
+++ b/package.json
@@ -106,7 +106,7 @@
"codesandbox-api": "0.0.23",
"compression-webpack-plugin": "^5.0.2",
"copy-webpack-plugin": "^6.4.1",
- "core-js": "^3.26.0",
+ "core-js": "^3.26.1",
"cron-validator": "^1.1.1",
"cronstrue": "^1.122.0",
"cropper": "^2.3.0",
diff --git a/qa/qa/mobile/page/base.rb b/qa/qa/mobile/page/base.rb
new file mode 100644
index 00000000000..8bc7e5f25ab
--- /dev/null
+++ b/qa/qa/mobile/page/base.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+module QA
+ module Mobile
+ module Page
+ module Base
+ prepend Support::Page::Logging
+
+ def fill_element(name, content)
+ # We need to bypass click_element_cooridinates as it does not work on mobile devices
+ find_element(name).set(content)
+ end
+ end
+ end
+ end
+end
diff --git a/qa/qa/page/base.rb b/qa/qa/page/base.rb
index 0678f95ba4c..f59b06b4e75 100644
--- a/qa/qa/page/base.rb
+++ b/qa/qa/page/base.rb
@@ -6,6 +6,7 @@ module QA
module Page
class Base
prepend Support::Page::Logging
+ prepend Mobile::Page::Base if QA::Runtime::Env.remote_mobile_device_name
include Capybara::DSL
include Scenario::Actable
diff --git a/qa/qa/runtime/browser.rb b/qa/qa/runtime/browser.rb
index 0dbc3cdf09d..d2ddaf86353 100644
--- a/qa/qa/runtime/browser.rb
+++ b/qa/qa/runtime/browser.rb
@@ -111,6 +111,7 @@ module QA
if QA::Runtime::Env.remote_mobile_device_name
capabilities['platformName'] = 'Android'
+ capabilities['appium:automationName'] = 'UiAutomator2'
capabilities['appium:deviceName'] = QA::Runtime::Env.remote_mobile_device_name
capabilities['appium:platformVersion'] = 'latest'
else
@@ -120,6 +121,7 @@ module QA
when :safari
if QA::Runtime::Env.remote_mobile_device_name
capabilities['platformName'] = 'iOS'
+ capabilities['appium:automationName'] = 'XCUITest'
capabilities['appium:deviceName'] = QA::Runtime::Env.remote_mobile_device_name
capabilities['appium:platformVersion'] = 'latest'
end
diff --git a/rubocop/cop/gitlab/json.rb b/rubocop/cop/gitlab/json.rb
index d27c8dab66c..cf2ed0ba536 100644
--- a/rubocop/cop/gitlab/json.rb
+++ b/rubocop/cop/gitlab/json.rb
@@ -7,7 +7,7 @@ module RuboCop
extend RuboCop::Cop::AutoCorrector
MSG = <<~EOL
- Prefer `Gitlab::Json` over calling `JSON` or `to_json` directly. See https://docs.gitlab.com/ee/development/json.html
+ Prefer `Gitlab::Json` over calling `JSON` directly. See https://docs.gitlab.com/ee/development/json.html
EOL
AVAILABLE_METHODS = %i[parse parse! load decode dump generate encode pretty_generate].to_set.freeze
@@ -16,10 +16,6 @@ module RuboCop
(send (const {nil? | (const nil? :ActiveSupport)} :JSON) $_ $...)
PATTERN
- def_node_matcher :to_json_call?, <<~PATTERN
- (send $_ :to_json)
- PATTERN
-
def on_send(node)
method_name, arg_source = match_node(node)
return unless method_name
@@ -41,9 +37,6 @@ module RuboCop
return [method_name, arg_nodes.map(&:source).join(", ")]
end
- receiver = to_json_call?(node)
- return [:dump, receiver.source] if receiver
-
nil
end
diff --git a/spec/controllers/projects/hooks_controller_spec.rb b/spec/controllers/projects/hooks_controller_spec.rb
index dbab3575831..18f16937505 100644
--- a/spec/controllers/projects/hooks_controller_spec.rb
+++ b/spec/controllers/projects/hooks_controller_spec.rb
@@ -229,7 +229,7 @@ RSpec.describe Projects::HooksController do
context 'when the hook fails completely' do
before do
allow_next(::TestHooks::ProjectService)
- .to receive(:execute).and_return({ message: 'All is woe' })
+ .to receive(:execute).and_return(ServiceResponse.error(message: 'All is woe'))
end
it 'informs the user' do
@@ -247,7 +247,7 @@ RSpec.describe Projects::HooksController do
it 'prevents making test requests' do
expect_next_instance_of(TestHooks::ProjectService) do |service|
- expect(service).to receive(:execute).and_return(http_status: 200)
+ expect(service).to receive(:execute).and_return(ServiceResponse.success(payload: { http_status: 200 }))
end
2.times { post :test, params: { namespace_id: project.namespace, project_id: project, id: hook } }
diff --git a/spec/factories/integrations.rb b/spec/factories/integrations.rb
index 5ac26b7a260..ebbf1b560e5 100644
--- a/spec/factories/integrations.rb
+++ b/spec/factories/integrations.rb
@@ -43,6 +43,19 @@ FactoryBot.define do
end
end
+ factory :packagist_integration, class: 'Integrations::Packagist' do
+ project
+ type { 'Integrations::Packagist' }
+ active { true }
+ properties do
+ {
+ username: 'username',
+ token: 'test',
+ server: 'https://packagist.example.com'
+ }
+ end
+ end
+
factory :prometheus_integration, class: 'Integrations::Prometheus' do
project
active { true }
diff --git a/spec/lib/gitlab/database/background_migration/batched_migration_spec.rb b/spec/lib/gitlab/database/background_migration/batched_migration_spec.rb
index 9194c1ccb55..31ae5e9b55d 100644
--- a/spec/lib/gitlab/database/background_migration/batched_migration_spec.rb
+++ b/spec/lib/gitlab/database/background_migration/batched_migration_spec.rb
@@ -211,6 +211,12 @@ RSpec.describe Gitlab::Database::BackgroundMigration::BatchedMigration, type: :m
expect(active_migration).to eq(migration3)
end
end
+
+ context 'when there are no active migrations available' do
+ it 'returns nil' do
+ expect(active_migration).to eq(nil)
+ end
+ end
end
describe '.find_executable' do
@@ -266,6 +272,43 @@ RSpec.describe Gitlab::Database::BackgroundMigration::BatchedMigration, type: :m
end
end
+ describe '.active_migrations_distinct_on_table' do
+ let(:connection) { Gitlab::Database.database_base_models[:main].connection }
+
+ around do |example|
+ Gitlab::Database::SharedModel.using_connection(connection) do
+ example.run
+ end
+ end
+
+ it 'returns one pending executable migration per table' do
+ # non-active migration
+ create(:batched_background_migration, :finished)
+ # migration put on hold
+ create(:batched_background_migration, :active, on_hold_until: 10.minutes.from_now)
+ # migration not availab for the current connection
+ create(:batched_background_migration, :active, gitlab_schema: :gitlab_not_existing)
+ # active migration that is no longer on hold
+ migration_1 = create(:batched_background_migration, :active, table_name: :users, on_hold_until: 10.minutes.ago)
+ # another active migration for the same table
+ create(:batched_background_migration, :active, table_name: :users)
+ # active migration for different table
+ migration_2 = create(:batched_background_migration, :active, table_name: :projects)
+ # active migration for third table
+ create(:batched_background_migration, :active, table_name: :namespaces)
+
+ actual = described_class.active_migrations_distinct_on_table(connection: connection, limit: 2)
+
+ expect(actual).to eq([migration_1, migration_2])
+ end
+
+ it 'returns epmty collection when there are no pending executable migrations' do
+ actual = described_class.active_migrations_distinct_on_table(connection: connection, limit: 2)
+
+ expect(actual).to be_empty
+ end
+ end
+
describe '.created_after' do
let!(:migration_old) { create :batched_background_migration, created_at: 2.days.ago }
let!(:migration_new) { create :batched_background_migration, created_at: 0.days.ago }
diff --git a/spec/lib/gitlab/health_checks/gitaly_check_spec.rb b/spec/lib/gitlab/health_checks/gitaly_check_spec.rb
index 000b8eff661..948452c0b58 100644
--- a/spec/lib/gitlab/health_checks/gitaly_check_spec.rb
+++ b/spec/lib/gitlab/health_checks/gitaly_check_spec.rb
@@ -40,9 +40,9 @@ RSpec.describe Gitlab::HealthChecks::GitalyCheck do
end
let(:healthy_check) { double(check: { success: true }) }
- let(:ready_check) { double(readiness_check: { success: false, message: 'Clock is out of sync' }) }
+ let(:ready_check) { double(readiness_check: { success: false, message: 'A readiness check has failed' }) }
- it { is_expected.to match_array([result_class.new('gitaly_check', false, 'Clock is out of sync', shard: 'default')]) }
+ it { is_expected.to match_array([result_class.new('gitaly_check', false, 'A readiness check has failed', shard: 'default')]) }
end
end
diff --git a/spec/lib/gitlab/usage_data_spec.rb b/spec/lib/gitlab/usage_data_spec.rb
index 5d01b4afbcb..5fbc807fa6d 100644
--- a/spec/lib/gitlab/usage_data_spec.rb
+++ b/spec/lib/gitlab/usage_data_spec.rb
@@ -606,10 +606,8 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
let_it_be(:disabled) { create(:container_expiration_policy, enabled: false) }
let_it_be(:enabled) { create(:container_expiration_policy, enabled: true) }
- %i[cadence older_than].each do |attribute|
- ContainerExpirationPolicy.send("#{attribute}_options").keys.each do |value|
- let_it_be("container_expiration_policy_with_#{attribute}_set_to_#{value}") { create(:container_expiration_policy, attribute => value) }
- end
+ ::ContainerExpirationPolicy.older_than_options.keys.each do |value|
+ let_it_be("container_expiration_policy_with_older_than_set_to_#{value}") { create(:container_expiration_policy, older_than: value) }
end
let_it_be('container_expiration_policy_with_older_than_set_to_null') { create(:container_expiration_policy, older_than: nil) }
@@ -625,13 +623,7 @@ RSpec.describe Gitlab::UsageData, :aggregate_failures do
expect(subject[:projects_with_expiration_policy_enabled_with_older_than_set_to_14d]).to eq 1
expect(subject[:projects_with_expiration_policy_enabled_with_older_than_set_to_30d]).to eq 1
expect(subject[:projects_with_expiration_policy_enabled_with_older_than_set_to_60d]).to eq 1
- expect(subject[:projects_with_expiration_policy_enabled_with_older_than_set_to_90d]).to eq 7
-
- expect(subject[:projects_with_expiration_policy_enabled_with_cadence_set_to_1d]).to eq 8
- expect(subject[:projects_with_expiration_policy_enabled_with_cadence_set_to_7d]).to eq 1
- expect(subject[:projects_with_expiration_policy_enabled_with_cadence_set_to_14d]).to eq 1
- expect(subject[:projects_with_expiration_policy_enabled_with_cadence_set_to_1month]).to eq 1
- expect(subject[:projects_with_expiration_policy_enabled_with_cadence_set_to_3month]).to eq 1
+ expect(subject[:projects_with_expiration_policy_enabled_with_older_than_set_to_90d]).to eq 2
end
end
diff --git a/spec/models/incident_management/timeline_event_tag_spec.rb b/spec/models/incident_management/timeline_event_tag_spec.rb
index 66cc885d8b8..3d3ce08a909 100644
--- a/spec/models/incident_management/timeline_event_tag_spec.rb
+++ b/spec/models/incident_management/timeline_event_tag_spec.rb
@@ -18,7 +18,7 @@ RSpec.describe IncidentManagement::TimelineEventTag do
it { is_expected.to validate_presence_of(:name) }
it { is_expected.to validate_length_of(:name).is_at_most(255) }
- it { is_expected.to validate_uniqueness_of(:name).scoped_to([:project_id]) }
+ it { is_expected.to validate_uniqueness_of(:name).scoped_to([:project_id]).ignoring_case_sensitivity }
it { is_expected.to allow_value('Test tag 1').for(:name) }
it { is_expected.not_to allow_value('Test tag, 1').for(:name) }
diff --git a/spec/models/integrations/chat_message/pipeline_message_spec.rb b/spec/models/integrations/chat_message/pipeline_message_spec.rb
index a63cc0b6d83..f3388853b37 100644
--- a/spec/models/integrations/chat_message/pipeline_message_spec.rb
+++ b/spec/models/integrations/chat_message/pipeline_message_spec.rb
@@ -44,13 +44,18 @@ RSpec.describe Integrations::ChatMessage::PipelineMessage do
before do
test_commit = double("A test commit", committer: args[:user], title: "A test commit message")
- test_project = double("A test project", commit_by: test_commit, name: args[:project][:name], web_url: args[:project][:web_url])
+ test_project = build(:project, name: args[:project][:name])
+
+ allow(test_project).to receive(:commit_by).and_return(test_commit)
+ allow(test_project).to receive(:web_url).and_return(args[:project][:web_url])
allow(test_project).to receive(:avatar_url).with(no_args).and_return("/avatar")
allow(test_project).to receive(:avatar_url).with(only_path: false).and_return(args[:project][:avatar_url])
allow(Project).to receive(:find) { test_project }
- test_pipeline = double("A test pipeline",
- has_yaml_errors?: has_yaml_errors, yaml_errors: "yaml error description here")
+ test_pipeline = build(:ci_empty_pipeline, name: 'Build pipeline')
+
+ allow(test_pipeline).to receive(:has_yaml_errors?).and_return(has_yaml_errors)
+ allow(test_pipeline).to receive(:yaml_errors).and_return("yaml error description here")
allow(Ci::Pipeline).to receive(:find) { test_pipeline }
allow(Gitlab::UrlBuilder).to receive(:build).with(test_commit).and_return("http://example.com/commit")
@@ -69,6 +74,24 @@ RSpec.describe Integrations::ChatMessage::PipelineMessage do
)
end
+ it 'returns pipeline name' do
+ name_field = subject.attachments.first[:fields].find { |a| a[:title] == 'Pipeline name' }
+
+ expect(name_field[:value]).to eq('Build pipeline')
+ end
+
+ context 'when pipeline_name feature flag is disabled' do
+ before do
+ stub_feature_flags(pipeline_name: false)
+ end
+
+ it 'does not return pipeline name' do
+ name_field = subject.attachments.first[:fields].find { |a| a[:title] == 'Pipeline name' }
+
+ expect(name_field).to be nil
+ end
+ end
+
context "when the pipeline failed" do
before do
args[:object_attributes][:status] = 'failed'
@@ -204,8 +227,8 @@ RSpec.describe Integrations::ChatMessage::PipelineMessage do
expect(subject.attachments.first[:title_link]).to eq("http://example.gitlab.com/-/pipelines/123")
end
- it "returns two attachment fields" do
- expect(subject.attachments.first[:fields].count).to eq(2)
+ it "returns three attachment fields" do
+ expect(subject.attachments.first[:fields].count).to eq(3)
end
it "returns the commit message as the attachment's second field property" do
@@ -232,8 +255,8 @@ RSpec.describe Integrations::ChatMessage::PipelineMessage do
]
end
- it "returns four attachment fields" do
- expect(subject.attachments.first[:fields].count).to eq(4)
+ it "returns five attachment fields" do
+ expect(subject.attachments.first[:fields].count).to eq(5)
end
it "returns the stage name and link to the 'Failed jobs' tab on the pipeline's page as the attachment's third field property" do
@@ -337,8 +360,8 @@ RSpec.describe Integrations::ChatMessage::PipelineMessage do
context "when the CI config file contains a YAML error" do
let(:has_yaml_errors) { true }
- it "returns three attachment fields" do
- expect(subject.attachments.first[:fields].count).to eq(3)
+ it "returns four attachment fields" do
+ expect(subject.attachments.first[:fields].count).to eq(4)
end
it "returns the YAML error deatils as the attachment's third field property" do
diff --git a/spec/models/integrations/packagist_spec.rb b/spec/models/integrations/packagist_spec.rb
index ef86f0565b6..e00de0f7418 100644
--- a/spec/models/integrations/packagist_spec.rb
+++ b/spec/models/integrations/packagist_spec.rb
@@ -3,49 +3,76 @@
require 'spec_helper'
RSpec.describe Integrations::Packagist do
- let(:packagist_params) do
- {
- active: true,
- project: project,
- properties: {
- username: packagist_username,
- token: packagist_token,
- server: packagist_server
- }
- }
- end
-
- let(:packagist_hook_url) do
- "#{packagist_server}/api/update-package?username=#{packagist_username}&apiToken=#{packagist_token}"
- end
-
- let(:packagist_token) { 'verySecret' }
- let(:packagist_username) { 'theUser' }
- let(:packagist_server) { 'https://packagist.example.com' }
- let_it_be(:project) { create(:project) }
-
it_behaves_like Integrations::HasWebHook do
- let(:integration) { described_class.new(packagist_params) }
- let(:hook_url) { "#{packagist_server}/api/update-package?username={username}&apiToken={token}" }
+ let_it_be(:project) { create(:project) }
+
+ let(:integration) { build(:packagist_integration, project: project) }
+ let(:hook_url) { "#{integration.server}/api/update-package?username={username}&apiToken={token}" }
end
it_behaves_like Integrations::ResetSecretFields do
- let(:integration) { described_class.new(packagist_params) }
+ let(:integration) { build(:packagist_integration) }
end
describe '#execute' do
- let(:user) { create(:user) }
- let(:push_sample_data) { Gitlab::DataBuilder::Push.build_sample(project, user) }
- let(:packagist_integration) { described_class.create!(packagist_params) }
+ let(:project) { build(:project) }
+ let(:integration) { build(:packagist_integration, project: project) }
+
+ let(:packagist_hook_url) do
+ "#{integration.server}/api/update-package?username=#{integration.username}&apiToken=#{integration.token}"
+ end
before do
stub_request(:post, packagist_hook_url)
end
it 'calls Packagist API' do
- packagist_integration.execute(push_sample_data)
+ user = create(:user)
+ push_sample_data = Gitlab::DataBuilder::Push.build_sample(project, user)
+ integration.execute(push_sample_data)
expect(a_request(:post, packagist_hook_url)).to have_been_made.once
end
end
+
+ describe '#test' do
+ let(:integration) { build(:packagist_integration) }
+ let(:test_data) { { foo: 'bar' } }
+
+ subject(:result) { integration.test(test_data) }
+
+ context 'when test request executes without errors' do
+ before do
+ allow(integration).to receive(:execute).with(test_data).and_return(
+ ServiceResponse.success(message: 'success message', payload: { http_status: http_status })
+ )
+ end
+
+ context 'when response is a 200' do
+ let(:http_status) { 200 }
+
+ it 'return failure result' do
+ is_expected.to eq(success: false, result: 'success message')
+ end
+ end
+
+ context 'when response is a 202' do
+ let(:http_status) { 202 }
+
+ it 'return success result' do
+ is_expected.to eq(success: true, result: 'success message')
+ end
+ end
+ end
+
+ context 'when test request executes with errors' do
+ before do
+ allow(integration).to receive(:execute).with(test_data).and_raise(StandardError, 'error message')
+ end
+
+ it 'return failure result' do
+ is_expected.to eq(success: false, result: 'error message')
+ end
+ end
+ end
end
diff --git a/spec/rubocop/cop/gitlab/json_spec.rb b/spec/rubocop/cop/gitlab/json_spec.rb
index 7a7982b2404..70f63a78dd1 100644
--- a/spec/rubocop/cop/gitlab/json_spec.rb
+++ b/spec/rubocop/cop/gitlab/json_spec.rb
@@ -10,7 +10,7 @@ RSpec.describe RuboCop::Cop::Gitlab::Json do
class Foo
def bar
JSON.parse('{ "foo": "bar" }')
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Prefer `Gitlab::Json` over calling `JSON` or `to_json` directly. [...]
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Prefer `Gitlab::Json` over calling `JSON` directly. [...]
end
end
RUBY
@@ -31,7 +31,7 @@ RSpec.describe RuboCop::Cop::Gitlab::Json do
class Foo
def bar
JSON.parse('{ "foo": "bar" }')
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Prefer `Gitlab::Json` over calling `JSON` or `to_json` directly. [...]
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Prefer `Gitlab::Json` over calling `JSON` directly. [...]
end
end
RUBY
@@ -52,7 +52,7 @@ RSpec.describe RuboCop::Cop::Gitlab::Json do
class Foo
def bar
ActiveSupport::JSON.parse('{ "foo": "bar" }')
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Prefer `Gitlab::Json` over calling `JSON` or `to_json` directly. [...]
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Prefer `Gitlab::Json` over calling `JSON` directly. [...]
end
end
RUBY
@@ -66,25 +66,4 @@ RSpec.describe RuboCop::Cop::Gitlab::Json do
RUBY
end
end
-
- context 'when .to_json is called' do
- it 'registers an offense and autocorrects' do
- expect_offense(<<~RUBY)
- class Foo
- def bar
- { foo: "bar" }.to_json
- ^^^^^^^^^^^^^^^^^^^^^^ Prefer `Gitlab::Json` over calling `JSON` or `to_json` directly. [...]
- end
- end
- RUBY
-
- expect_correction(<<~RUBY)
- class Foo
- def bar
- Gitlab::Json.dump({ foo: "bar" })
- end
- end
- RUBY
- end
- end
end
diff --git a/spec/scripts/lib/glfm/update_example_snapshots_spec.rb b/spec/scripts/lib/glfm/update_example_snapshots_spec.rb
index f28a33045ff..58e016b6d68 100644
--- a/spec/scripts/lib/glfm/update_example_snapshots_spec.rb
+++ b/spec/scripts/lib/glfm/update_example_snapshots_spec.rb
@@ -685,7 +685,7 @@ RSpec.describe Glfm::UpdateExampleSnapshots, '#process' do
canonical: |
<p><a href="projects-test-file">projects-test-file</a></p>
static: |-
- <p data-sourcepos="1:1-1:40" dir="auto"><a href="/glfm_group/glfm_project/-/blob/master/projects-test-file">projects-test-file</a></p>
+ <p data-sourcepos="1:1-1:40" dir="auto"><a href="/glfm_group/glfm_project/-/blob/master/projects-test-file" class="gfm">projects-test-file</a></p>
wysiwyg: |-
<p><a target="_blank" rel="noopener noreferrer nofollow" href="projects-test-file">projects-test-file</a></p>
06_03_00__api_request_overrides__project_snippet_ref__001:
diff --git a/spec/services/web_hook_service_spec.rb b/spec/services/web_hook_service_spec.rb
index cc8f087cbb6..c081b20d95f 100644
--- a/spec/services/web_hook_service_spec.rb
+++ b/spec/services/web_hook_service_spec.rb
@@ -229,7 +229,7 @@ RSpec.describe WebHookService, :request_store, :clean_gitlab_redis_shared_state
it 'does not execute disabled hooks' do
allow(service_instance).to receive(:disabled?).and_return(true)
- expect(service_instance.execute).to eq({ status: :error, message: 'Hook disabled' })
+ expect(service_instance.execute).to have_attributes(status: :error, message: 'Hook disabled')
end
it 'executes and registers the hook with the recursion detection', :aggregate_failures do
@@ -301,7 +301,8 @@ RSpec.describe WebHookService, :request_store, :clean_gitlab_redis_shared_state
project_hook.enable!
stub_full_request(project_hook.url, method: :post).to_raise(exception)
- expect(service_instance.execute).to eq({ status: :error, message: exception.to_s })
+
+ expect(service_instance.execute).to have_attributes(status: :error, message: exception.to_s)
expect { service_instance.execute }.not_to raise_error
end
end
@@ -310,7 +311,10 @@ RSpec.describe WebHookService, :request_store, :clean_gitlab_redis_shared_state
let_it_be(:project_hook) { create(:project_hook, url: 'http://server.com/my path/') }
it 'handles exceptions' do
- expect(service_instance.execute).to eq(status: :error, message: 'bad URI(is not URI?): "http://server.com/my path/"')
+ expect(service_instance.execute).to have_attributes(
+ status: :error,
+ message: 'bad URI(is not URI?): "http://server.com/my path/"'
+ )
expect { service_instance.execute }.not_to raise_error
end
end
@@ -319,20 +323,31 @@ RSpec.describe WebHookService, :request_store, :clean_gitlab_redis_shared_state
it 'does not perform the request' do
stub_const("#{described_class}::REQUEST_BODY_SIZE_LIMIT", 10.bytes)
- expect(service_instance.execute).to eq({ status: :error, message: "Gitlab::Json::LimitedEncoder::LimitExceeded" })
+ expect(service_instance.execute).to have_attributes(
+ status: :error,
+ message: 'Gitlab::Json::LimitedEncoder::LimitExceeded'
+ )
end
end
it 'handles 200 status code' do
stub_full_request(project_hook.url, method: :post).to_return(status: 200, body: 'Success')
- expect(service_instance.execute).to include({ status: :success, http_status: 200, message: 'Success' })
+ expect(service_instance.execute).to have_attributes(
+ status: :success,
+ payload: { http_status: 200 },
+ message: 'Success'
+ )
end
it 'handles 2xx status codes' do
stub_full_request(project_hook.url, method: :post).to_return(status: 201, body: 'Success')
- expect(service_instance.execute).to include({ status: :success, http_status: 201, message: 'Success' })
+ expect(service_instance.execute).to have_attributes(
+ status: :success,
+ payload: { http_status: 201 },
+ message: 'Success'
+ )
end
context 'execution logging' do
diff --git a/spec/support/helpers/usage_data_helpers.rb b/spec/support/helpers/usage_data_helpers.rb
index fa221e64edc..92a946db337 100644
--- a/spec/support/helpers/usage_data_helpers.rb
+++ b/spec/support/helpers/usage_data_helpers.rb
@@ -73,11 +73,6 @@ module UsageDataHelpers
projects_with_expiration_policy_enabled_with_older_than_set_to_30d
projects_with_expiration_policy_enabled_with_older_than_set_to_60d
projects_with_expiration_policy_enabled_with_older_than_set_to_90d
- projects_with_expiration_policy_enabled_with_cadence_set_to_1d
- projects_with_expiration_policy_enabled_with_cadence_set_to_7d
- projects_with_expiration_policy_enabled_with_cadence_set_to_14d
- projects_with_expiration_policy_enabled_with_cadence_set_to_1month
- projects_with_expiration_policy_enabled_with_cadence_set_to_3month
projects_with_terraform_reports
projects_with_terraform_states
pages_domains
diff --git a/spec/workers/projects/post_creation_worker_spec.rb b/spec/workers/projects/post_creation_worker_spec.rb
index 3158ac9fa27..732dc540fb7 100644
--- a/spec/workers/projects/post_creation_worker_spec.rb
+++ b/spec/workers/projects/post_creation_worker_spec.rb
@@ -81,6 +81,40 @@ RSpec.describe Projects::PostCreationWorker do
end
end
end
+
+ describe 'Incident timeline event tags' do
+ context 'when project is nil' do
+ let(:job_args) { [nil] }
+
+ it 'does not create event tags' do
+ expect { subject }.not_to change { IncidentManagement::TimelineEventTag.count }
+ end
+ end
+
+ context 'when project is created', :aggregate_failures do
+ it 'creates tags for the project' do
+ expect { subject }.to change { IncidentManagement::TimelineEventTag.count }.by(2)
+
+ expect(project.incident_management_timeline_event_tags.pluck_names).to match_array(
+ [
+ ::IncidentManagement::TimelineEventTag::START_TIME_TAG_NAME,
+ ::IncidentManagement::TimelineEventTag::END_TIME_TAG_NAME
+ ]
+ )
+ end
+
+ it 'raises error if record creation fails' do
+ allow_next_instance_of(IncidentManagement::TimelineEventTag) do |tag|
+ allow(tag).to receive(:valid?).and_return(false)
+ end
+
+ expect(Gitlab::ErrorTracking).to receive(:track_exception).with(an_instance_of(ActiveRecord::RecordInvalid), include(extra: { project_id: a_kind_of(Integer) })).twice
+ subject
+
+ expect(project.incident_management_timeline_event_tags).to be_empty
+ end
+ end
+ end
end
end
end
diff --git a/yarn.lock b/yarn.lock
index 406fde7c772..6c509cf9fe7 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3903,10 +3903,10 @@ core-js-pure@^3.0.0:
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.6.5.tgz#c79e75f5e38dbc85a662d91eea52b8256d53b813"
integrity sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA==
-core-js@^3.26.0:
- version "3.26.0"
- resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.26.0.tgz#a516db0ed0811be10eac5d94f3b8463d03faccfe"
- integrity sha512-+DkDrhoR4Y0PxDz6rurahuB+I45OsEUv8E1maPTB6OuHRohMMcznBq9TMpdpDMm/hUPob/mJJS3PqgbHpMTQgw==
+core-js@^3.26.1:
+ version "3.26.1"
+ resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.26.1.tgz#7a9816dabd9ee846c1c0fe0e8fcad68f3709134e"
+ integrity sha512-21491RRQVzUn0GGM9Z1Jrpr6PNPxPi+Za8OM9q4tksTSnlbXXGKK1nXNg/QvwFYettXvSX6zWKCtHHfjN4puyA==
core-util-is@~1.0.0:
version "1.0.3"