From b8fbfa9c705435090b9342efd47f2b27becb7819 Mon Sep 17 00:00:00 2001
From: GitLab Bot
Date: Thu, 6 Jul 2023 03:11:21 +0000
Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master
---
.rubocop_todo/layout/argument_alignment.yml | 1 -
.rubocop_todo/layout/line_length.yml | 1 -
.rubocop_todo/lint/unused_block_argument.yml | 1 -
.rubocop_todo/lint/unused_method_argument.yml | 1 -
.../naming/heredoc_delimiter_naming.yml | 1 -
.rubocop_todo/rspec/context_wording.yml | 1 -
.rubocop_todo/search/namespaced_class.yml | 5 +
.rubocop_todo/style/format_string.yml | 1 -
.rubocop_todo/style/string_concatenation.yml | 1 -
.../string_literals_in_interpolation.yml | 1 -
GITLAB_KAS_VERSION | 2 +-
.../components/pipeline_details_header.vue | 22 ++--
.../components/pipelines_list/time_ago.vue | 13 +--
app/models/namespaces/traversal/linear.rb | 9 +-
app/services/users/ban_service.rb | 7 ++
.../users/banned_user_base_service.rb | 4 +
app/views/admin/hooks/_form.html.haml | 4 +-
app/views/admin/hooks/edit.html.haml | 19 ++--
app/views/projects/hooks/edit.html.haml | 15 ++-
app/views/shared/hook_logs/_index.html.haml | 11 +-
...e_traversal_ids_for_self_and_hierarchy.yml | 8 --
.../ops/search_index_curation_epics.yml | 8 ++
...oject_management_issue_created_monthly.yml | 2 +-
...30_i_code_review_user_create_mr_weekly.yml | 2 +-
...roject_management_issue_created_weekly.yml | 2 +-
config/metrics/schema.json | 23 ++++
...val_index_deployments_on_project_id_sha.rb | 17 +++
db/schema_migrations/20230704042302 | 1 +
.../vulnerabilities/index.md | 10 +-
.../analytics/internal_events_generator.rb | 10 +-
.../test_batched_background_runner.rb | 16 ++-
lib/gitlab/internal_events.rb | 28 +++--
.../internal_events/event_definitions.rb | 13 ++-
lib/gitlab/usage/metric_definition.rb | 2 +-
.../issue_activity_unique_counter.rb | 6 +-
.../merge_request_activity_unique_counter.rb | 6 +-
locale/gitlab.pot | 6 +
.../projects/pipelines/pipeline_spec.rb | 4 +-
.../deploy_keys/components/app_spec.js | 104 ++++++++++--------
.../pipelines/pipeline_details_header_spec.js | 26 +++--
spec/frontend/pipelines/time_ago_spec.js | 13 +--
.../internal_events_generator_spec.rb | 14 +--
.../test_batched_background_runner_spec.rb | 19 ++++
.../internal_events/event_definitions_spec.rb | 32 ++++--
spec/lib/gitlab/internal_events_spec.rb | 45 +++++---
spec/models/namespace_spec.rb | 26 -----
spec/services/users/ban_service_spec.rb | 7 ++
.../database/migration_testing_helpers.rb | 6 +-
48 files changed, 345 insertions(+), 231 deletions(-)
delete mode 100644 config/feature_flags/development/use_traversal_ids_for_self_and_hierarchy.yml
create mode 100644 config/feature_flags/ops/search_index_curation_epics.yml
create mode 100644 db/post_migrate/20230704042302_prepare_removal_index_deployments_on_project_id_sha.rb
create mode 100644 db/schema_migrations/20230704042302
diff --git a/.rubocop_todo/layout/argument_alignment.yml b/.rubocop_todo/layout/argument_alignment.yml
index 99911f6e9a7..cfecc4756b9 100644
--- a/.rubocop_todo/layout/argument_alignment.yml
+++ b/.rubocop_todo/layout/argument_alignment.yml
@@ -1278,7 +1278,6 @@ Layout/ArgumentAlignment:
- 'ee/spec/services/vulnerabilities/user_notes_count_service_spec.rb'
- 'ee/spec/services/vulnerability_feedback/create_service_spec.rb'
- 'ee/spec/services/vulnerability_merge_request_links/create_service_spec.rb'
- - 'ee/spec/tasks/gitlab/elastic_rake_spec.rb'
- 'lib/api/access_requests.rb'
- 'lib/api/admin/plan_limits.rb'
- 'lib/api/alert_management_alerts.rb'
diff --git a/.rubocop_todo/layout/line_length.yml b/.rubocop_todo/layout/line_length.yml
index ed2245f39e0..72f43c7779e 100644
--- a/.rubocop_todo/layout/line_length.yml
+++ b/.rubocop_todo/layout/line_length.yml
@@ -1305,7 +1305,6 @@ Layout/LineLength:
- 'ee/lib/system_check/geo/geo_database_configured_check.rb'
- 'ee/lib/tasks/geo.rake'
- 'ee/lib/tasks/geo/git.rake'
- - 'ee/lib/tasks/gitlab/elastic.rake'
- 'ee/lib/tasks/gitlab/elastic/test.rake'
- 'ee/lib/tasks/gitlab/seed/metrics.rake'
- 'ee/lib/world.rb'
diff --git a/.rubocop_todo/lint/unused_block_argument.yml b/.rubocop_todo/lint/unused_block_argument.yml
index 0b4120a152c..01510a8443d 100644
--- a/.rubocop_todo/lint/unused_block_argument.yml
+++ b/.rubocop_todo/lint/unused_block_argument.yml
@@ -115,7 +115,6 @@ Lint/UnusedBlockArgument:
- 'ee/lib/gitlab/insights/reducers/count_per_label_reducer.rb'
- 'ee/lib/gitlab/proxy.rb'
- 'ee/lib/tasks/contracts/merge_requests.rake'
- - 'ee/lib/tasks/gitlab/elastic.rake'
- 'ee/lib/tasks/gitlab/indexer.rake'
- 'ee/lib/tasks/gitlab/seed/insights.rake'
- 'ee/spec/elastic/migrate/20220118150500_delete_orphaned_commits_spec.rb'
diff --git a/.rubocop_todo/lint/unused_method_argument.yml b/.rubocop_todo/lint/unused_method_argument.yml
index d1d626b68e0..086882b0f1b 100644
--- a/.rubocop_todo/lint/unused_method_argument.yml
+++ b/.rubocop_todo/lint/unused_method_argument.yml
@@ -316,7 +316,6 @@ Lint/UnusedMethodArgument:
- 'ee/lib/gitlab/package_metadata/connector/gcp.rb'
- 'ee/lib/gitlab/package_metadata/connector/offline.rb'
- 'ee/lib/gitlab/zoekt/search_results.rb'
- - 'ee/lib/tasks/gitlab/elastic.rake'
- 'ee/spec/features/boards/swimlanes/epics_swimlanes_filtering_spec.rb'
- 'ee/spec/features/groups/group_roadmap_spec.rb'
- 'ee/spec/graphql/ee/resolvers/namespace_projects_resolver_spec.rb'
diff --git a/.rubocop_todo/naming/heredoc_delimiter_naming.yml b/.rubocop_todo/naming/heredoc_delimiter_naming.yml
index a8265e86ca0..68129f910d1 100644
--- a/.rubocop_todo/naming/heredoc_delimiter_naming.yml
+++ b/.rubocop_todo/naming/heredoc_delimiter_naming.yml
@@ -25,7 +25,6 @@ Naming/HeredocDelimiterNaming:
- 'ee/spec/services/security/security_orchestration_policies/create_pipeline_service_spec.rb'
- 'ee/spec/services/security/security_orchestration_policies/policy_commit_service_spec.rb'
- 'ee/spec/support/helpers/ee/ldap_helpers.rb'
- - 'ee/spec/tasks/gitlab/elastic_rake_spec.rb'
- 'lib/api/metadata.rb'
- 'lib/backup/helper.rb'
- 'lib/feature/shared.rb'
diff --git a/.rubocop_todo/rspec/context_wording.yml b/.rubocop_todo/rspec/context_wording.yml
index ba82a9f7a1e..c1751ebed4c 100644
--- a/.rubocop_todo/rspec/context_wording.yml
+++ b/.rubocop_todo/rspec/context_wording.yml
@@ -872,7 +872,6 @@ RSpec/ContextWording:
- 'ee/spec/support/shared_examples/services/search_notes_shared_examples.rb'
- 'ee/spec/support/shared_examples/services/search_service_shared_examples.rb'
- 'ee/spec/support/shared_examples/services/update_issuable_health_status_shared_examples.rb'
- - 'ee/spec/tasks/gitlab/elastic_rake_spec.rb'
- 'ee/spec/tasks/gitlab/license_rake_spec.rb'
- 'ee/spec/views/admin/application_settings/_elasticsearch_form.html.haml_spec.rb'
- 'ee/spec/views/admin/users/show.html.haml_spec.rb'
diff --git a/.rubocop_todo/search/namespaced_class.yml b/.rubocop_todo/search/namespaced_class.yml
index 452b9388043..8074e90fc53 100644
--- a/.rubocop_todo/search/namespaced_class.yml
+++ b/.rubocop_todo/search/namespaced_class.yml
@@ -93,6 +93,9 @@ Search/NamespacedClass:
- 'ee/lib/elastic/latest/config.rb'
- 'ee/lib/elastic/latest/custom_language_analyzers.rb'
- 'ee/lib/elastic/latest/document_should_be_deleted_from_index_error.rb'
+ - 'ee/lib/elastic/latest/epic_class_proxy.rb'
+ - 'ee/lib/elastic/latest/epic_config.rb'
+ - 'ee/lib/elastic/latest/epic_instance_proxy.rb'
- 'ee/lib/elastic/latest/git_class_proxy.rb'
- 'ee/lib/elastic/latest/git_instance_proxy.rb'
- 'ee/lib/elastic/latest/issue_class_proxy.rb'
@@ -131,6 +134,8 @@ Search/NamespacedClass:
- 'ee/lib/elastic/v12p1/application_class_proxy.rb'
- 'ee/lib/elastic/v12p1/application_instance_proxy.rb'
- 'ee/lib/elastic/v12p1/config.rb'
+ - 'ee/lib/elastic/v12p1/epic_class_proxy.rb'
+ - 'ee/lib/elastic/v12p1/epic_instance_proxy.rb'
- 'ee/lib/elastic/v12p1/issue_class_proxy.rb'
- 'ee/lib/elastic/v12p1/issue_instance_proxy.rb'
- 'ee/lib/elastic/v12p1/merge_request_class_proxy.rb'
diff --git a/.rubocop_todo/style/format_string.yml b/.rubocop_todo/style/format_string.yml
index 9d202dcd7fb..d03718c0d51 100644
--- a/.rubocop_todo/style/format_string.yml
+++ b/.rubocop_todo/style/format_string.yml
@@ -237,7 +237,6 @@ Style/FormatString:
- 'ee/lib/gitlab/licenses/submit_license_usage_data_banner.rb'
- 'ee/lib/gitlab/manual_quarterly_co_term_banner.rb'
- 'ee/lib/gitlab/vulnerabilities/container_scanning_vulnerability.rb'
- - 'ee/lib/tasks/gitlab/elastic.rake'
- 'ee/spec/controllers/admin/licenses_controller_spec.rb'
- 'ee/spec/controllers/groups/security/policies_controller_spec.rb'
- 'ee/spec/features/admin/admin_settings_spec.rb'
diff --git a/.rubocop_todo/style/string_concatenation.yml b/.rubocop_todo/style/string_concatenation.yml
index 34e4549a987..a83c0f4d943 100644
--- a/.rubocop_todo/style/string_concatenation.yml
+++ b/.rubocop_todo/style/string_concatenation.yml
@@ -54,7 +54,6 @@ Style/StringConcatenation:
- 'ee/lib/gitlab/elastic/search_results.rb'
- 'ee/lib/gitlab/geo/git_ssh_proxy.rb'
- 'ee/lib/omni_auth/strategies/kerberos.rb'
- - 'ee/lib/tasks/gitlab/elastic.rake'
- 'ee/lib/tasks/gitlab/license.rake'
- 'ee/spec/features/boards/boards_spec.rb'
- 'ee/spec/features/projects/pipelines/pipeline_spec.rb'
diff --git a/.rubocop_todo/style/string_literals_in_interpolation.yml b/.rubocop_todo/style/string_literals_in_interpolation.yml
index ceb6a922270..30a649cb4fa 100644
--- a/.rubocop_todo/style/string_literals_in_interpolation.yml
+++ b/.rubocop_todo/style/string_literals_in_interpolation.yml
@@ -18,7 +18,6 @@ Style/StringLiteralsInInterpolation:
- 'ee/app/models/license.rb'
- 'ee/app/services/epics/tree_reorder_service.rb'
- 'ee/lib/ee/api/helpers/issues_helpers.rb'
- - 'ee/lib/tasks/gitlab/elastic.rake'
- 'ee/spec/features/admin/admin_settings_spec.rb'
- 'ee/spec/features/subscriptions/expiring_subscription_message_spec.rb'
- 'ee/spec/lib/gitlab/expiring_subscription_message_spec.rb'
diff --git a/GITLAB_KAS_VERSION b/GITLAB_KAS_VERSION
index e8233db7991..02ec429db93 100644
--- a/GITLAB_KAS_VERSION
+++ b/GITLAB_KAS_VERSION
@@ -1 +1 @@
-v16.1.3
+v16.2.0-rc1
diff --git a/app/assets/javascripts/pipelines/components/pipeline_details_header.vue b/app/assets/javascripts/pipelines/components/pipeline_details_header.vue
index fbd0fb7afbe..88534095f67 100644
--- a/app/assets/javascripts/pipelines/components/pipeline_details_header.vue
+++ b/app/assets/javascripts/pipelines/components/pipeline_details_header.vue
@@ -17,6 +17,7 @@ import { __, s__, sprintf, formatNumber } from '~/locale';
import { getIdFromGraphQLId } from '~/graphql_shared/utils';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
import CiBadgeLink from '~/vue_shared/components/ci_badge_link.vue';
+import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
import SafeHtml from '~/vue_shared/directives/safe_html';
import {
LOAD_FAILURE,
@@ -30,7 +31,6 @@ import cancelPipelineMutation from '../graphql/mutations/cancel_pipeline.mutatio
import deletePipelineMutation from '../graphql/mutations/delete_pipeline.mutation.graphql';
import retryPipelineMutation from '../graphql/mutations/retry_pipeline.mutation.graphql';
import getPipelineQuery from '../graphql/queries/get_pipeline_header_data.query.graphql';
-import TimeAgo from './pipelines_list/time_ago.vue';
import { getQueryHeaders } from './graph/utils';
const DELETE_MODAL_ID = 'pipeline-delete-modal';
@@ -54,7 +54,7 @@ export default {
GlLoadingIcon,
GlModal,
GlSprintf,
- TimeAgo,
+ TimeAgoTooltip,
},
directives: {
GlModal: GlModalDirective,
@@ -90,6 +90,8 @@ export default {
cancelPipelineText: __('Cancel pipeline'),
deletePipelineText: __('Delete'),
clipboardTooltip: __('Copy commit SHA'),
+ createdText: s__('Pipelines|created'),
+ finishedText: s__('Pipelines|finished'),
},
errorTexts: {
[LOAD_FAILURE]: __('We are currently unable to fetch data for the pipeline header.'),
@@ -441,14 +443,14 @@ export default {
:title="$options.i18n.clipboardTooltip"
size="small"
/>
-
+
+ {{ $options.i18n.createdText }}
+
+
+
+ {{ $options.i18n.finishedText }}
+
+
diff --git a/app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue b/app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue
index bdecbb88a58..70343544638 100644
--- a/app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue
+++ b/app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue
@@ -14,11 +14,6 @@ export default {
type: Object,
required: true,
},
- displayCalendarIcon: {
- type: Boolean,
- required: false,
- default: true,
- },
fontSize: {
type: String,
required: false,
@@ -50,13 +45,7 @@ export default {
-
+