summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-04-19 12:15:59 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-04-19 12:15:59 +0000
commit2017bc90a671eac669f0114b6ef508e151409c4f (patch)
tree79bbbedede417d3ce13ae2e13dd1ad3bb069c975
parent9450a63064cd1572f030628dbf155f5c047f28c7 (diff)
downloadgitlab-ce-2017bc90a671eac669f0114b6ef508e151409c4f.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--.eslintrc.yml1
-rw-r--r--.gitlab/CODEOWNERS13
-rw-r--r--.gitlab/ci/package-and-test/main.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/review-apps/qa.gitlab-ci.yml2
-rw-r--r--.rubocop_todo/style/empty_method.yml1
-rw-r--r--app/assets/javascripts/admin/users/components/user_actions.vue19
-rw-r--r--app/assets/javascripts/admin/users/components/users_table.vue2
-rw-r--r--app/assets/javascripts/diffs/components/diff_view.vue12
-rw-r--r--app/assets/javascripts/pipelines/components/pipelines_list/pipeline_operations.vue22
-rw-r--r--app/assets/javascripts/pipelines/components/pipelines_list/pipelines_manual_actions_legacy.vue112
-rw-r--r--app/assets/javascripts/search/sidebar/components/app.vue14
-rw-r--r--app/assets/javascripts/search/sidebar/components/scope_navigation.vue10
-rw-r--r--app/assets/javascripts/search/sidebar/components/scope_new_navigation.vue40
-rw-r--r--app/assets/javascripts/search/sidebar/constants/index.js2
-rw-r--r--app/assets/javascripts/super_sidebar/components/create_menu.vue29
-rw-r--r--app/assets/javascripts/super_sidebar/components/help_center.vue16
-rw-r--r--app/assets/javascripts/super_sidebar/components/nav_item.vue2
-rw-r--r--app/assets/javascripts/super_sidebar/components/pinned_section.vue2
-rw-r--r--app/assets/javascripts/super_sidebar/components/user_menu.vue17
-rw-r--r--app/assets/javascripts/super_sidebar/constants.js2
-rw-r--r--app/assets/javascripts/vue_merge_request_widget/components/approvals/approvals.vue53
-rw-r--r--app/assets/javascripts/vue_shared/components/markdown/header.vue7
-rw-r--r--app/assets/stylesheets/framework/super_sidebar.scss5
-rw-r--r--app/controllers/clusters/base_controller.rb2
-rw-r--r--app/controllers/google_api/authorizations_controller.rb2
-rw-r--r--app/controllers/projects/blame_controller.rb17
-rw-r--r--app/controllers/projects/cluster_agents_controller.rb2
-rw-r--r--app/controllers/projects/merge_requests_controller.rb1
-rw-r--r--app/controllers/projects/pipelines_controller.rb7
-rw-r--r--app/experiments/security_actions_continuous_onboarding_experiment.rb9
-rw-r--r--app/models/onboarding/completion.rb23
-rw-r--r--app/services/issues/create_service.rb1
-rw-r--r--app/services/issues/update_service.rb1
-rw-r--r--app/services/merge_requests/handle_assignees_change_service.rb1
-rw-r--r--app/workers/all_queues.yml34
-rw-r--r--app/workers/concerns/cluster_agent_queue.rb2
-rw-r--r--app/workers/concerns/cluster_queue.rb2
-rw-r--r--config/feature_categories.yml3
-rw-r--r--config/feature_flags/development/lazy_load_pipeline_dropdown_actions.yml8
-rw-r--r--config/feature_flags/development/record_issue_and_mr_assignee_events.yml (renamed from config/feature_flags/development/ci_simplify_dag_status_calculation_for_processing.yml)8
-rw-r--r--config/feature_flags/development/refactor_code_quality_inline_findings.yml8
-rw-r--r--config/feature_flags/experiment/security_actions_continuous_onboarding.yml8
-rw-r--r--config/metrics/counts_28d/20210216175405_clusters_applications_cert_managers.yml1
-rw-r--r--config/metrics/counts_28d/20210216175407_clusters_applications_helm.yml1
-rw-r--r--config/metrics/counts_28d/20210216175409_clusters_applications_ingress.yml1
-rw-r--r--config/metrics/counts_28d/20210216175411_clusters_applications_knative.yml1
-rw-r--r--config/metrics/counts_28d/20210216175413_clusters_management_project.yml1
-rw-r--r--config/metrics/counts_28d/20210216175415_clusters_disabled.yml1
-rw-r--r--config/metrics/counts_28d/20210216175417_clusters_enabled.yml1
-rw-r--r--config/metrics/counts_28d/20210216175419_clusters_platforms_gke.yml1
-rw-r--r--config/metrics/counts_28d/20210216175420_clusters_platforms_eks.yml1
-rw-r--r--config/metrics/counts_28d/20210216175422_clusters_platforms_user.yml1
-rw-r--r--config/metrics/counts_28d/20210216175424_instance_clusters_disabled.yml1
-rw-r--r--config/metrics/counts_28d/20210216175426_instance_clusters_enabled.yml1
-rw-r--r--config/metrics/counts_28d/20210216175428_group_clusters_disabled.yml1
-rw-r--r--config/metrics/counts_28d/20210216175430_group_clusters_enabled.yml1
-rw-r--r--config/metrics/counts_28d/20210216175432_project_clusters_disabled.yml1
-rw-r--r--config/metrics/counts_28d/20210216175434_project_clusters_enabled.yml1
-rw-r--r--config/metrics/counts_28d/20220729001651_agent_users_using_ci_tunnel_monthly.yml1
-rw-r--r--config/metrics/counts_all/20210216175232_clusters.yml1
-rw-r--r--config/metrics/counts_all/20210216175234_clusters_enabled.yml1
-rw-r--r--config/metrics/counts_all/20210216175236_project_clusters_enabled.yml1
-rw-r--r--config/metrics/counts_all/20210216175238_group_clusters_enabled.yml1
-rw-r--r--config/metrics/counts_all/20210216175240_instance_clusters_enabled.yml1
-rw-r--r--config/metrics/counts_all/20210216175242_clusters_disabled.yml1
-rw-r--r--config/metrics/counts_all/20210216175244_project_clusters_disabled.yml1
-rw-r--r--config/metrics/counts_all/20210216175246_group_clusters_disabled.yml1
-rw-r--r--config/metrics/counts_all/20210216175248_instance_clusters_disabled.yml1
-rw-r--r--config/metrics/counts_all/20210216175250_clusters_platforms_eks.yml1
-rw-r--r--config/metrics/counts_all/20210216175251_clusters_platforms_gke.yml1
-rw-r--r--config/metrics/counts_all/20210216175253_clusters_platforms_user.yml1
-rw-r--r--config/metrics/counts_all/20210216175255_clusters_applications_helm.yml1
-rw-r--r--config/metrics/counts_all/20210216175257_clusters_applications_ingress.yml1
-rw-r--r--config/metrics/counts_all/20210216175259_clusters_applications_cert_managers.yml1
-rw-r--r--config/metrics/counts_all/20210216175301_clusters_applications_crossplane.yml1
-rw-r--r--config/metrics/counts_all/20210216175303_clusters_applications_prometheus.yml1
-rw-r--r--config/metrics/counts_all/20210216175305_clusters_applications_runner.yml1
-rw-r--r--config/metrics/counts_all/20210216175307_clusters_applications_knative.yml1
-rw-r--r--config/metrics/counts_all/20210216175309_clusters_applications_elastic_stack.yml1
-rw-r--r--config/metrics/counts_all/20210216175310_clusters_applications_jupyter.yml1
-rw-r--r--config/metrics/counts_all/20210216175312_clusters_applications_cilium.yml1
-rw-r--r--config/metrics/counts_all/20210216175314_clusters_management_project.yml1
-rw-r--r--config/metrics/counts_all/20210216175316_kubernetes_agents.yml1
-rw-r--r--config/metrics/counts_all/20210216175318_kubernetes_agents_with_token.yml1
-rw-r--r--config/metrics/counts_all/20210216175329_clusters_applications_cert_managers.yml1
-rw-r--r--config/metrics/counts_all/20210216175331_clusters_applications_helm.yml1
-rw-r--r--config/metrics/counts_all/20210216175333_clusters_applications_ingress.yml1
-rw-r--r--config/metrics/counts_all/20210216175335_clusters_applications_knative.yml1
-rw-r--r--config/metrics/counts_all/20210216175337_clusters_management_project.yml1
-rw-r--r--config/metrics/counts_all/20210216175339_clusters_disabled.yml1
-rw-r--r--config/metrics/counts_all/20210216175341_clusters_enabled.yml1
-rw-r--r--config/metrics/counts_all/20210216175343_clusters_platforms_gke.yml1
-rw-r--r--config/metrics/counts_all/20210216175345_clusters_platforms_eks.yml1
-rw-r--r--config/metrics/counts_all/20210216175346_clusters_platforms_user.yml1
-rw-r--r--config/metrics/counts_all/20210216175348_instance_clusters_disabled.yml1
-rw-r--r--config/metrics/counts_all/20210216175350_instance_clusters_enabled.yml1
-rw-r--r--config/metrics/counts_all/20210216175352_group_clusters_disabled.yml1
-rw-r--r--config/metrics/counts_all/20210216175354_group_clusters_enabled.yml1
-rw-r--r--config/metrics/counts_all/20210216175356_project_clusters_disabled.yml1
-rw-r--r--config/metrics/counts_all/20210216175358_project_clusters_enabled.yml1
-rw-r--r--config/metrics/counts_all/20210216175403_projects_with_prometheus_alerts.yml1
-rw-r--r--config/metrics/counts_all/20210216181949_clusters_applications_runner.yml1
-rw-r--r--config/metrics/counts_all/20210505015532_kubernetes_agent_k8s_api_proxy_request.yml1
-rw-r--r--config/metrics/counts_all/20210916200930_clusters_integrations_prometheus.yml1
-rw-r--r--config/metrics/counts_all/20210916200931_clusters_integrations_elastic_stack.yml1
-rw-r--r--danger/database/Dangerfile2
-rw-r--r--danger/datateam/Dangerfile2
-rw-r--r--danger/product_intelligence/Dangerfile2
-rw-r--r--danger/roulette/Dangerfile3
-rw-r--r--db/docs/agent_activity_events.yml2
-rw-r--r--db/docs/agent_group_authorizations.yml2
-rw-r--r--db/docs/agent_project_authorizations.yml2
-rw-r--r--db/docs/agent_user_access_group_authorizations.yml2
-rw-r--r--db/docs/agent_user_access_project_authorizations.yml2
-rw-r--r--db/docs/aws_roles.yml2
-rw-r--r--db/docs/cluster_agent_tokens.yml2
-rw-r--r--db/docs/cluster_agents.yml2
-rw-r--r--db/docs/cluster_enabled_grants.yml2
-rw-r--r--db/docs/cluster_groups.yml2
-rw-r--r--db/docs/cluster_platforms_kubernetes.yml2
-rw-r--r--db/docs/cluster_projects.yml2
-rw-r--r--db/docs/cluster_providers_aws.yml2
-rw-r--r--db/docs/cluster_providers_gcp.yml2
-rw-r--r--db/docs/clusters.yml2
-rw-r--r--db/docs/clusters_applications_cert_managers.yml2
-rw-r--r--db/docs/clusters_applications_crossplane.yml2
-rw-r--r--db/docs/clusters_applications_helm.yml2
-rw-r--r--db/docs/clusters_applications_ingress.yml2
-rw-r--r--db/docs/clusters_applications_jupyter.yml2
-rw-r--r--db/docs/clusters_applications_knative.yml2
-rw-r--r--db/docs/clusters_applications_prometheus.yml2
-rw-r--r--db/docs/clusters_applications_runners.yml2
-rw-r--r--db/docs/clusters_kubernetes_namespaces.yml2
-rw-r--r--db/docs/deployment_clusters.yml2
-rw-r--r--db/docs/serverless_domain_cluster.yml2
-rw-r--r--db/post_migrate/20230403221928_resync_scan_result_policies_for_namespaces.rb77
-rw-r--r--db/schema_migrations/202304032219281
-rw-r--r--doc/administration/audit_events.md1
-rw-r--r--doc/integration/jira/connect-app.md84
-rw-r--r--doc/integration/jira/img/jira-upload-app-success_v13_11.pngbin11440 -> 0 bytes
-rw-r--r--doc/integration/jira/img/jira-upload-app_v13_11.pngbin20667 -> 0 bytes
-rw-r--r--doc/integration/jira/img/jira_dev_panel_setup_com_1.pngbin15392 -> 0 bytes
-rw-r--r--doc/integration/jira/img/jira_dev_panel_setup_com_2.pngbin22370 -> 0 bytes
-rw-r--r--doc/integration/jira/img/jira_dev_panel_setup_com_3_v13_9.pngbin28042 -> 0 bytes
-rw-r--r--doc/integration/jira/img/jira_dev_panel_setup_com_4_v13_9.pngbin23360 -> 0 bytes
-rw-r--r--doc/user/analytics/value_streams_dashboard.md32
-rw-r--r--lib/api/admin/instance_clusters.rb2
-rw-r--r--lib/api/ci/jobs.rb2
-rw-r--r--lib/api/clusters/agent_tokens.rb2
-rw-r--r--lib/api/clusters/agents.rb2
-rw-r--r--lib/api/group_clusters.rb2
-rw-r--r--lib/api/internal/kubernetes.rb10
-rw-r--r--lib/api/project_clusters.rb2
-rw-r--r--lib/gitlab/ci/status/composite.rb5
-rw-r--r--lib/gitlab/resource_events/assignment_event_recorder.rb61
-rw-r--r--lib/tasks/gitlab/tw/codeowners.rake2
-rw-r--r--locale/gitlab.pot64
-rw-r--r--qa/Gemfile2
-rw-r--r--qa/Gemfile.lock4
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/pages/new_static_page_spec.rb3
-rw-r--r--spec/controllers/admin/clusters_controller_spec.rb2
-rw-r--r--spec/controllers/concerns/kas_cookie_spec.rb2
-rw-r--r--spec/controllers/groups/clusters_controller_spec.rb2
-rw-r--r--spec/controllers/projects/blame_controller_spec.rb40
-rw-r--r--spec/controllers/projects/clusters_controller_spec.rb2
-rw-r--r--spec/controllers/projects/pipelines_controller_spec.rb16
-rw-r--r--spec/features/clusters/cluster_detail_page_spec.rb2
-rw-r--r--spec/features/clusters/cluster_health_dashboard_spec.rb2
-rw-r--r--spec/features/clusters/create_agent_spec.rb2
-rw-r--r--spec/features/dashboard/issues_filter_spec.rb2
-rw-r--r--spec/features/groups/issues_spec.rb18
-rw-r--r--spec/features/issues/rss_spec.rb10
-rw-r--r--spec/features/projects/clusters/gcp_spec.rb2
-rw-r--r--spec/features/projects/clusters/user_spec.rb2
-rw-r--r--spec/finders/clusters/agents/authorizations/ci_access/finder_spec.rb2
-rw-r--r--spec/frontend/__helpers__/wait_for_text.js2
-rw-r--r--spec/frontend/ci/ci_variable_list/components/ci_variable_shared_spec.js2
-rw-r--r--spec/frontend/ci/runner/components/registration/registration_instructions_spec.js2
-rw-r--r--spec/frontend/design_management/components/design_notes/design_reply_form_spec.js8
-rw-r--r--spec/frontend/diffs/components/diff_view_spec.js19
-rw-r--r--spec/frontend/pipelines/pipeline_operations_spec.js26
-rw-r--r--spec/frontend/pipelines/pipelines_manual_actions_legacy_spec.js168
-rw-r--r--spec/frontend/repository/components/fork_info_spec.js2
-rw-r--r--spec/frontend/repository/components/table/row_spec.js22
-rw-r--r--spec/frontend/search/sidebar/components/scope_new_navigation_spec.js83
-rw-r--r--spec/frontend/super_sidebar/components/create_menu_spec.js24
-rw-r--r--spec/frontend/super_sidebar/components/help_center_spec.js6
-rw-r--r--spec/frontend/super_sidebar/components/user_menu_spec.js11
-rw-r--r--spec/frontend/tags/components/delete_tag_modal_spec.js2
-rw-r--r--spec/frontend/vue_merge_request_widget/components/mr_widget_rebase_spec.js343
-rw-r--r--spec/frontend_integration/content_editor/content_editor_integration_spec.js2
-rw-r--r--spec/frontend_integration/ide/user_opens_ide_spec.js4
-rw-r--r--spec/frontend_integration/snippets/snippets_notes_spec.js2
-rw-r--r--spec/lib/api/entities/clusters/agents/authorizations/ci_access_spec.rb2
-rw-r--r--spec/lib/gitlab/kas/user_access_spec.rb2
-rw-r--r--spec/lib/gitlab/resource_events/assignment_event_recorder_spec.rb91
-rw-r--r--spec/lib/gitlab/utils/strong_memoize_spec.rb20
-rw-r--r--spec/migrations/bulk_insert_cluster_enabled_grants_spec.rb2
-rw-r--r--spec/models/clusters/agents/authorizations/ci_access/group_authorization_spec.rb2
-rw-r--r--spec/models/clusters/agents/authorizations/ci_access/implicit_authorization_spec.rb2
-rw-r--r--spec/models/clusters/agents/authorizations/ci_access/project_authorization_spec.rb2
-rw-r--r--spec/models/clusters/agents/authorizations/user_access/group_authorization_spec.rb2
-rw-r--r--spec/models/clusters/agents/authorizations/user_access/project_authorization_spec.rb2
-rw-r--r--spec/models/clusters/cluster_spec.rb2
-rw-r--r--spec/models/concerns/clusters/agents/authorizations/ci_access/config_scopes_spec.rb2
-rw-r--r--spec/models/onboarding/completion_spec.rb30
-rw-r--r--spec/models/onboarding/progress_spec.rb6
-rw-r--r--spec/requests/api/admin/instance_clusters_spec.rb2
-rw-r--r--spec/requests/api/clusters/agent_tokens_spec.rb2
-rw-r--r--spec/requests/api/clusters/agents_spec.rb2
-rw-r--r--spec/requests/api/graphql/mutations/clusters/agent_tokens/agent_tokens/create_spec.rb2
-rw-r--r--spec/requests/api/graphql/mutations/clusters/agents/create_spec.rb2
-rw-r--r--spec/requests/api/graphql/mutations/clusters/agents/delete_spec.rb2
-rw-r--r--spec/requests/api/graphql/project/cluster_agents_spec.rb2
-rw-r--r--spec/requests/api/group_clusters_spec.rb2
-rw-r--r--spec/requests/api/internal/kubernetes_spec.rb2
-rw-r--r--spec/requests/api/project_clusters_spec.rb2
-rw-r--r--spec/requests/projects/cluster_agents_controller_spec.rb2
-rw-r--r--spec/requests/projects/google_cloud/configuration_controller_spec.rb2
-rw-r--r--spec/requests/projects/google_cloud/databases_controller_spec.rb2
-rw-r--r--spec/requests/projects/google_cloud/deployments_controller_spec.rb2
-rw-r--r--spec/requests/projects/google_cloud/gcp_regions_controller_spec.rb2
-rw-r--r--spec/requests/projects/google_cloud/revoke_oauth_controller_spec.rb2
-rw-r--r--spec/requests/projects/google_cloud/service_accounts_controller_spec.rb2
-rw-r--r--spec/rubocop/cop/rspec/invalid_feature_category_spec.rb14
-rw-r--r--spec/services/ci/generate_kubeconfig_service_spec.rb2
-rw-r--r--spec/services/ci/pipeline_processing/atomic_processing_service_spec.rb19
-rw-r--r--spec/services/clusters/agent_tokens/create_service_spec.rb2
-rw-r--r--spec/services/clusters/agent_tokens/revoke_service_spec.rb2
-rw-r--r--spec/services/clusters/agent_tokens/track_usage_service_spec.rb2
-rw-r--r--spec/services/clusters/agents/authorizations/ci_access/refresh_service_spec.rb2
-rw-r--r--spec/services/clusters/agents/authorizations/user_access/refresh_service_spec.rb2
-rw-r--r--spec/services/clusters/agents/authorize_proxy_user_service_spec.rb2
-rw-r--r--spec/services/clusters/agents/create_activity_event_service_spec.rb2
-rw-r--r--spec/services/clusters/agents/create_service_spec.rb2
-rw-r--r--spec/services/clusters/agents/delete_expired_events_service_spec.rb2
-rw-r--r--spec/services/clusters/agents/delete_service_spec.rb2
-rw-r--r--spec/services/clusters/build_kubernetes_namespace_service_spec.rb2
-rw-r--r--spec/services/clusters/build_service_spec.rb2
-rw-r--r--spec/services/clusters/cleanup/project_namespace_service_spec.rb2
-rw-r--r--spec/services/clusters/cleanup/service_account_service_spec.rb2
-rw-r--r--spec/services/clusters/create_service_spec.rb2
-rw-r--r--spec/services/clusters/destroy_service_spec.rb2
-rw-r--r--spec/services/clusters/integrations/create_service_spec.rb2
-rw-r--r--spec/services/clusters/integrations/prometheus_health_check_service_spec.rb2
-rw-r--r--spec/services/clusters/kubernetes/create_or_update_namespace_service_spec.rb2
-rw-r--r--spec/services/clusters/kubernetes/create_or_update_service_account_service_spec.rb2
-rw-r--r--spec/services/clusters/kubernetes/fetch_kubernetes_token_service_spec.rb2
-rw-r--r--spec/services/clusters/kubernetes_spec.rb2
-rw-r--r--spec/services/clusters/management/validate_management_project_permissions_service_spec.rb2
-rw-r--r--spec/services/clusters/update_service_spec.rb2
-rw-r--r--spec/services/issues/create_service_spec.rb7
-rw-r--r--spec/services/issues/update_service_spec.rb33
-rw-r--r--spec/services/merge_requests/create_service_spec.rb10
-rw-r--r--spec/services/merge_requests/update_service_spec.rb21
-rw-r--r--spec/services/spam/spam_verdict_service_spec.rb10
-rw-r--r--spec/support/shared_examples/features/rss_shared_examples.rb13
-rw-r--r--spec/tooling/danger/stable_branch_spec.rb22
-rw-r--r--spec/workers/clusters/agents/delete_expired_events_worker_spec.rb2
-rw-r--r--spec/workers/clusters/applications/activate_integration_worker_spec.rb2
-rw-r--r--spec/workers/clusters/applications/deactivate_integration_worker_spec.rb2
-rw-r--r--spec/workers/clusters/cleanup/project_namespace_worker_spec.rb2
-rw-r--r--spec/workers/clusters/cleanup/service_account_worker_spec.rb2
-rw-r--r--spec/workers/concerns/cluster_agent_queue_spec.rb4
-rw-r--r--tooling/danger/stable_branch.rb4
265 files changed, 1254 insertions, 1004 deletions
diff --git a/.eslintrc.yml b/.eslintrc.yml
index fc46ef3a064..0b242e4cb94 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -135,6 +135,7 @@ overrides:
rules:
'@gitlab/require-i18n-strings': off
'@gitlab/no-runtime-template-compiler': off
+ 'require-await': error
'import/no-dynamic-require': off
'no-import-assign': off
'no-restricted-syntax':
diff --git a/.gitlab/CODEOWNERS b/.gitlab/CODEOWNERS
index c3aef06d737..80ce947db8c 100644
--- a/.gitlab/CODEOWNERS
+++ b/.gitlab/CODEOWNERS
@@ -751,7 +751,7 @@ lib/gitlab/checks/** @proglottis @toon
/doc/development/policies.md @jglassman1
/doc/development/project_templates.md @aqualls
/doc/development/prometheus_metrics.md @msedlakjakubowski
-/doc/development/real_time.md @msedlakjakubowski
+/doc/development/real_time.md @jglassman1
/doc/development/rubocop_development_guide.md @sselhorn
/doc/development/search/ @ashrafkhamis
/doc/development/sec/ @rdickenson
@@ -817,7 +817,7 @@ lib/gitlab/checks/** @proglottis @toon
/doc/tutorials/ @kpaizee
/doc/tutorials/create_compliance_pipeline.md @eread
/doc/tutorials/fuzz_testing_tutorial.md @rdickenson
-/doc/tutorials/scan_result_policy.md @dianalogan
+/doc/tutorials/scan_result_policy.md @rdickenson
/doc/update/ @axil
/doc/update/background_migrations.md @aqualls
/doc/user/admin_area/analytics/ @lciutacu
@@ -834,7 +834,7 @@ lib/gitlab/checks/** @proglottis @toon
/doc/user/admin_area/monitoring/ @msedlakjakubowski
/doc/user/admin_area/reporting/git_abuse_rate_limit.md @phillipwells
/doc/user/admin_area/reporting/spamcheck.md @axil
-/doc/user/admin_area/review_abuse_reports.md @jglassman1
+/doc/user/admin_area/review_abuse_reports.md @phillipwells
/doc/user/admin_area/settings/account_and_limit_settings.md @aqualls
/doc/user/admin_area/settings/continuous_integration.md @drcatherinepope
/doc/user/admin_area/settings/deprecated_api_rate_limits.md @aqualls
@@ -864,17 +864,12 @@ lib/gitlab/checks/** @proglottis @toon
/doc/user/analytics/ @lciutacu
/doc/user/analytics/ci_cd_analytics.md @phillipwells
/doc/user/application_security/ @rdickenson
-/doc/user/application_security/policies/ @dianalogan
/doc/user/asciidoc.md @aqualls
/doc/user/award_emojis.md @msedlakjakubowski
/doc/user/clusters/ @phillipwells
+/doc/user/compliance/ @rdickenson
/doc/user/compliance/compliance_report/ @eread
/doc/user/compliance/index.md @eread
-/doc/user/compliance/license_approval_policies.md @dianalogan
-/doc/user/compliance/license_check_rules.md @dianalogan
-/doc/user/compliance/license_compliance/ @rdickenson
-/doc/user/compliance/license_list.md @rdickenson
-/doc/user/compliance/license_scanning_of_cyclonedx_files/ @rdickenson
/doc/user/crm/ @msedlakjakubowski
/doc/user/discussions/ @aqualls
/doc/user/enterprise_user/ @jglassman1
diff --git a/.gitlab/ci/package-and-test/main.gitlab-ci.yml b/.gitlab/ci/package-and-test/main.gitlab-ci.yml
index 879b8579e2d..5adf6d25eb1 100644
--- a/.gitlab/ci/package-and-test/main.gitlab-ci.yml
+++ b/.gitlab/ci/package-and-test/main.gitlab-ci.yml
@@ -11,7 +11,7 @@ include:
- local: .gitlab/ci/package-and-test/rules.gitlab-ci.yml
- local: .gitlab/ci/package-and-test/variables.gitlab-ci.yml
- project: gitlab-org/quality/pipeline-common
- ref: 3.1.0
+ ref: 3.1.2
file:
- /ci/base.gitlab-ci.yml
- /ci/allure-report.yml
diff --git a/.gitlab/ci/review-apps/qa.gitlab-ci.yml b/.gitlab/ci/review-apps/qa.gitlab-ci.yml
index 4e794d972dc..13623a576d5 100644
--- a/.gitlab/ci/review-apps/qa.gitlab-ci.yml
+++ b/.gitlab/ci/review-apps/qa.gitlab-ci.yml
@@ -1,6 +1,6 @@
include:
- project: gitlab-org/quality/pipeline-common
- ref: 3.1.0
+ ref: 3.1.2
file:
- /ci/base.gitlab-ci.yml
- /ci/allure-report.yml
diff --git a/.rubocop_todo/style/empty_method.yml b/.rubocop_todo/style/empty_method.yml
index 6e46ec9a3ca..dd55c4f45cd 100644
--- a/.rubocop_todo/style/empty_method.yml
+++ b/.rubocop_todo/style/empty_method.yml
@@ -49,7 +49,6 @@ Style/EmptyMethod:
- 'app/controllers/projects/triggers_controller.rb'
- 'app/controllers/pwa_controller.rb'
- 'app/controllers/search_controller.rb'
- - 'app/experiments/security_actions_continuous_onboarding_experiment.rb'
- 'app/graphql/resolvers/concerns/caching_array_resolver.rb'
- 'app/helpers/subscribable_banner_helper.rb'
- 'app/helpers/users/callouts_helper.rb'
diff --git a/app/assets/javascripts/admin/users/components/user_actions.vue b/app/assets/javascripts/admin/users/components/user_actions.vue
index e21bb58cb4e..38c7d3f9b90 100644
--- a/app/assets/javascripts/admin/users/components/user_actions.vue
+++ b/app/assets/javascripts/admin/users/components/user_actions.vue
@@ -61,6 +61,9 @@ export default {
hasEditAction() {
return this.userActions.includes('edit');
},
+ hasEditActionOnly() {
+ return this.hasEditAction === true && this.hasDeleteActions === false;
+ },
userPaths() {
return generateUserPaths(this.paths, this.user.username);
},
@@ -91,10 +94,13 @@ export default {
class="gl-display-flex gl-justify-content-end gl-my-n2 gl-mx-n2"
:data-testid="`user-actions-${user.id}`"
>
- <div v-if="hasEditAction" class="gl-p-2">
- <gl-button v-if="showButtonLabels" v-bind="editButtonAttrs" icon="pencil-square">{{
- $options.i18n.edit
- }}</gl-button>
+ <div v-if="hasEditAction" class="gl-p-2" :class="{ 'gl-mr-3': hasEditActionOnly }">
+ <gl-button
+ v-if="showButtonLabels"
+ v-bind="editButtonAttrs"
+ :class="{ 'gl-mr-7': hasEditActionOnly }"
+ >{{ $options.i18n.edit }}</gl-button
+ >
<gl-button
v-else
v-gl-tooltip="$options.i18n.edit"
@@ -106,11 +112,14 @@ export default {
<div v-if="hasDropdownActions" class="gl-p-2">
<gl-disclosure-dropdown
+ icon="ellipsis_v"
+ category="tertiary"
:toggle-text="$options.i18n.userAdministration"
+ text-sr-only
data-testid="dropdown-toggle"
data-qa-selector="user_actions_dropdown_toggle"
:data-qa-username="user.username"
- placement="left"
+ no-caret
>
<template v-for="action in dropdownSafeActions">
<component
diff --git a/app/assets/javascripts/admin/users/components/users_table.vue b/app/assets/javascripts/admin/users/components/users_table.vue
index e55622d40ba..2d2c598f953 100644
--- a/app/assets/javascripts/admin/users/components/users_table.vue
+++ b/app/assets/javascripts/admin/users/components/users_table.vue
@@ -135,7 +135,7 @@ export default {
</template>
<template #cell(settings)="{ item: user }">
- <user-actions :user="user" :paths="paths" />
+ <user-actions :user="user" :paths="paths" :show-button-labels="true" />
</template>
</gl-table>
</div>
diff --git a/app/assets/javascripts/diffs/components/diff_view.vue b/app/assets/javascripts/diffs/components/diff_view.vue
index a2e052e0f93..348d6d1d78d 100644
--- a/app/assets/javascripts/diffs/components/diff_view.vue
+++ b/app/assets/javascripts/diffs/components/diff_view.vue
@@ -1,7 +1,6 @@
<script>
import { mapGetters, mapState, mapActions } from 'vuex';
import { IdState } from 'vendor/vue-virtual-scroller';
-import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import DraftNote from '~/batch_comments/components/draft_note.vue';
import draftCommentsMixin from '~/diffs/mixins/draft_comments';
import { getCommentedLines } from '~/notes/components/multiline_comment_utils';
@@ -21,11 +20,7 @@ export default {
DiffCommentCell,
DraftNote,
},
- mixins: [
- draftCommentsMixin,
- IdState({ idProp: (vm) => vm.diffFile.file_hash }),
- glFeatureFlagsMixin(),
- ],
+ mixins: [draftCommentsMixin, IdState({ idProp: (vm) => vm.diffFile.file_hash })],
props: {
diffFile: {
type: Object,
@@ -265,10 +260,7 @@ export default {
@stopdragging="onStopDragging"
/>
<diff-line
- v-if="
- glFeatures.refactorCodeQualityInlineFindings &&
- codeQualityExpandedLines.includes(getCodeQualityLine(line))
- "
+ v-if="codeQualityExpandedLines.includes(getCodeQualityLine(line))"
:key="line.line_code"
:line="line"
@hideCodeQualityFindings="hideCodeQualityFindings"
diff --git a/app/assets/javascripts/pipelines/components/pipelines_list/pipeline_operations.vue b/app/assets/javascripts/pipelines/components/pipelines_list/pipeline_operations.vue
index ffb8c0eb88c..caeee7edefe 100644
--- a/app/assets/javascripts/pipelines/components/pipelines_list/pipeline_operations.vue
+++ b/app/assets/javascripts/pipelines/components/pipelines_list/pipeline_operations.vue
@@ -1,12 +1,10 @@
<script>
import { GlButton, GlTooltipDirective, GlModalDirective } from '@gitlab/ui';
import Tracking from '~/tracking';
-import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import eventHub from '../../event_hub';
import { BUTTON_TOOLTIP_RETRY, BUTTON_TOOLTIP_CANCEL, TRACKING_CATEGORIES } from '../../constants';
import PipelineMultiActions from './pipeline_multi_actions.vue';
import PipelinesManualActions from './pipelines_manual_actions.vue';
-import PipelinesManualActionsLegacy from './pipelines_manual_actions_legacy.vue';
export default {
BUTTON_TOOLTIP_RETRY,
@@ -19,9 +17,8 @@ export default {
GlButton,
PipelineMultiActions,
PipelinesManualActions,
- PipelinesManualActionsLegacy,
},
- mixins: [Tracking.mixin(), glFeatureFlagsMixin()],
+ mixins: [Tracking.mixin()],
props: {
pipeline: {
type: Object,
@@ -39,21 +36,11 @@ export default {
};
},
computed: {
- shouldLazyLoadActions() {
- return this.glFeatures.lazyLoadPipelineDropdownActions;
- },
hasActions() {
return (
this.pipeline?.details?.has_manual_actions || this.pipeline?.details?.has_scheduled_actions
);
},
- actions() {
- if (!this.pipeline || !this.pipeline.details) {
- return [];
- }
- const { details } = this.pipeline;
- return [...(details.manual_actions || []), ...(details.scheduled_actions || [])];
- },
isCancelling() {
return this.cancelingPipeline === this.pipeline.id;
},
@@ -86,12 +73,7 @@ export default {
<template>
<div class="gl-text-right">
<div class="btn-group">
- <pipelines-manual-actions v-if="hasActions && shouldLazyLoadActions" :iid="pipeline.iid" />
-
- <pipelines-manual-actions-legacy
- v-if="actions.length > 0 && !shouldLazyLoadActions"
- :actions="actions"
- />
+ <pipelines-manual-actions v-if="hasActions" :iid="pipeline.iid" />
<gl-button
v-if="pipeline.flags.retryable"
diff --git a/app/assets/javascripts/pipelines/components/pipelines_list/pipelines_manual_actions_legacy.vue b/app/assets/javascripts/pipelines/components/pipelines_list/pipelines_manual_actions_legacy.vue
deleted file mode 100644
index b08eb4153ce..00000000000
--- a/app/assets/javascripts/pipelines/components/pipelines_list/pipelines_manual_actions_legacy.vue
+++ /dev/null
@@ -1,112 +0,0 @@
-<script>
-import { GlDropdown, GlDropdownItem, GlIcon, GlTooltipDirective } from '@gitlab/ui';
-import { createAlert } from '~/alert';
-import axios from '~/lib/utils/axios_utils';
-import { confirmAction } from '~/lib/utils/confirm_via_gl_modal/confirm_via_gl_modal';
-import { s__, __, sprintf } from '~/locale';
-import Tracking from '~/tracking';
-import GlCountdown from '~/vue_shared/components/gl_countdown.vue';
-import eventHub from '../../event_hub';
-import { TRACKING_CATEGORIES } from '../../constants';
-
-export default {
- name: 'PipelinesManualActionsLegacy',
- directives: {
- GlTooltip: GlTooltipDirective,
- },
- components: {
- GlCountdown,
- GlDropdown,
- GlDropdownItem,
- GlIcon,
- },
- mixins: [Tracking.mixin()],
- props: {
- actions: {
- type: Array,
- required: true,
- },
- },
- data() {
- return {
- isLoading: false,
- };
- },
- methods: {
- async onClickAction(action) {
- if (action.scheduled_at) {
- const confirmationMessage = sprintf(
- s__(
- 'DelayedJobs|Are you sure you want to run %{jobName} immediately? Otherwise this job will run automatically after its timer finishes.',
- ),
- { jobName: action.name },
- );
-
- const confirmed = await confirmAction(confirmationMessage);
-
- if (!confirmed) {
- return;
- }
- }
-
- this.isLoading = true;
-
- /**
- * Ideally, the component would not make an api call directly.
- * However, in order to use the eventhub and know when to
- * toggle back the `isLoading` property we'd need an ID
- * to track the request with a wacther - since this component
- * is rendered at least 20 times in the same page, moving the
- * api call directly here is the most performant solution
- */
- axios
- .post(`${action.path}.json`)
- .then(() => {
- this.isLoading = false;
- eventHub.$emit('updateTable');
- })
- .catch(() => {
- this.isLoading = false;
- createAlert({ message: __('An error occurred while making the request.') });
- });
- },
- isActionDisabled(action) {
- if (action.playable === undefined) {
- return false;
- }
-
- return !action.playable;
- },
- trackClick() {
- this.track('click_manual_actions', { label: TRACKING_CATEGORIES.table });
- },
- },
-};
-</script>
-<template>
- <gl-dropdown
- v-gl-tooltip
- :title="__('Run manual or delayed jobs')"
- :loading="isLoading"
- data-testid="pipelines-manual-actions-dropdown"
- right
- lazy
- icon="play"
- @shown="trackClick"
- >
- <gl-dropdown-item
- v-for="action in actions"
- :key="action.path"
- :disabled="isActionDisabled(action)"
- @click="onClickAction(action)"
- >
- <div class="gl-display-flex gl-justify-content-space-between gl-flex-wrap">
- {{ action.name }}
- <span v-if="action.scheduled_at">
- <gl-icon name="clock" />
- <gl-countdown :end-date-string="action.scheduled_at" />
- </span>
- </div>
- </gl-dropdown-item>
- </gl-dropdown>
-</template>
diff --git a/app/assets/javascripts/search/sidebar/components/app.vue b/app/assets/javascripts/search/sidebar/components/app.vue
index ca5a9b70b34..81a57e96b3c 100644
--- a/app/assets/javascripts/search/sidebar/components/app.vue
+++ b/app/assets/javascripts/search/sidebar/components/app.vue
@@ -1,6 +1,8 @@
<script>
import { mapState, mapGetters } from 'vuex';
import ScopeNavigation from '~/search/sidebar/components/scope_navigation.vue';
+import ScopeNewNavigation from '~/search/sidebar/components/scope_new_navigation.vue';
+import SidebarPortal from '~/super_sidebar/components/sidebar_portal.vue';
import { SCOPE_ISSUES, SCOPE_MERGE_REQUESTS, SCOPE_BLOB } from '../constants';
import ResultsFilters from './results_filters.vue';
import LanguageFilter from './language_filter/index.vue';
@@ -10,10 +12,12 @@ export default {
components: {
ResultsFilters,
ScopeNavigation,
+ ScopeNewNavigation,
LanguageFilter,
+ SidebarPortal,
},
computed: {
- ...mapState(['urlQuery']),
+ ...mapState(['urlQuery', 'useNewNavigation']),
...mapGetters(['currentScope']),
showIssueAndMergeFilters() {
return this.currentScope === SCOPE_ISSUES || this.currentScope === SCOPE_MERGE_REQUESTS;
@@ -26,7 +30,15 @@ export default {
</script>
<template>
+ <section v-if="useNewNavigation">
+ <sidebar-portal>
+ <scope-new-navigation />
+ <results-filters v-if="showIssueAndMergeFilters" />
+ <language-filter v-if="showBlobFilter" />
+ </sidebar-portal>
+ </section>
<section
+ v-else
class="search-sidebar gl-display-flex gl-flex-direction-column gl-md-mr-5 gl-mb-6 gl-mt-5"
>
<scope-navigation />
diff --git a/app/assets/javascripts/search/sidebar/components/scope_navigation.vue b/app/assets/javascripts/search/sidebar/components/scope_navigation.vue
index 1c81f652387..fc41baee831 100644
--- a/app/assets/javascripts/search/sidebar/components/scope_navigation.vue
+++ b/app/assets/javascripts/search/sidebar/components/scope_navigation.vue
@@ -3,8 +3,8 @@ import { GlNav, GlNavItem, GlIcon } from '@gitlab/ui';
import { mapActions, mapState } from 'vuex';
import { s__ } from '~/locale';
import Tracking from '~/tracking';
+import { formatSearchResultCount, addCountOverLimit } from '~/search/store/utils';
import { NAV_LINK_DEFAULT_CLASSES, NAV_LINK_COUNT_DEFAULT_CLASSES } from '../constants';
-import { formatSearchResultCount } from '../../store/utils';
import { slugifyWithUnderscore } from '../../../lib/utils/text_utility';
export default {
@@ -28,11 +28,11 @@ export default {
},
methods: {
...mapActions(['fetchSidebarCount']),
- showFormatedCount(count) {
- return formatSearchResultCount(count);
+ showFormatedCount(countString) {
+ return formatSearchResultCount(countString);
},
- isCountOverLimit(count) {
- return count.includes('+');
+ isCountOverLimit(countString) {
+ return Boolean(addCountOverLimit(countString));
},
handleClick(scope) {
this.track('click_menu_item', { label: `vertical_navigation_${scope}` });
diff --git a/app/assets/javascripts/search/sidebar/components/scope_new_navigation.vue b/app/assets/javascripts/search/sidebar/components/scope_new_navigation.vue
new file mode 100644
index 00000000000..86b7cc577a6
--- /dev/null
+++ b/app/assets/javascripts/search/sidebar/components/scope_new_navigation.vue
@@ -0,0 +1,40 @@
+<script>
+import { mapActions, mapState, mapGetters } from 'vuex';
+import { s__ } from '~/locale';
+import Tracking from '~/tracking';
+import NavItem from '~/super_sidebar/components/nav_item.vue';
+import { NAV_LINK_DEFAULT_CLASSES, NAV_LINK_COUNT_DEFAULT_CLASSES } from '../constants';
+
+export default {
+ name: 'ScopeNewNavigation',
+ i18n: {
+ countOverLimitLabel: s__('GlobalSearch|Result count is over limit.'),
+ },
+ components: {
+ NavItem,
+ },
+ mixins: [Tracking.mixin()],
+ computed: {
+ ...mapState(['navigation', 'urlQuery']),
+ ...mapGetters(['navigationItems']),
+ },
+ created() {
+ if (this.urlQuery?.search) {
+ this.fetchSidebarCount();
+ }
+ },
+ methods: {
+ ...mapActions(['fetchSidebarCount']),
+ },
+ NAV_LINK_DEFAULT_CLASSES,
+ NAV_LINK_COUNT_DEFAULT_CLASSES,
+};
+</script>
+
+<template>
+ <nav data-testid="search-filter" class="gl-py-2 gl-relative">
+ <ul class="gl-px-2 gl-list-style-none">
+ <nav-item v-for="item in navigationItems" :key="`menu-${item.title}`" :item="item" />
+ </ul>
+ </nav>
+</template>
diff --git a/app/assets/javascripts/search/sidebar/constants/index.js b/app/assets/javascripts/search/sidebar/constants/index.js
index 9cd366a87fd..9519154a571 100644
--- a/app/assets/javascripts/search/sidebar/constants/index.js
+++ b/app/assets/javascripts/search/sidebar/constants/index.js
@@ -12,7 +12,7 @@ export const NAV_LINK_DEFAULT_CLASSES = [
'gl-justify-content-space-between',
];
export const NAV_LINK_COUNT_DEFAULT_CLASSES = ['gl-font-sm', 'gl-font-weight-normal'];
-export const HR_DEFAULT_CLASSES = ['gl-m-5', 'gl-border-gray-100'];
+export const HR_DEFAULT_CLASSES = ['gl-my-5', 'gl-mx-5', 'gl-border-gray-100'];
export const ONLY_SHOW_MD = ['gl-display-none', 'gl-md-display-block'];
export const TRACKING_LABEL_CHECKBOX = 'Checkbox';
diff --git a/app/assets/javascripts/super_sidebar/components/create_menu.vue b/app/assets/javascripts/super_sidebar/components/create_menu.vue
index d3bb31a69fa..4cff4642cf7 100644
--- a/app/assets/javascripts/super_sidebar/components/create_menu.vue
+++ b/app/assets/javascripts/super_sidebar/components/create_menu.vue
@@ -1,6 +1,10 @@
<script>
import { GlDisclosureDropdown, GlTooltip } from '@gitlab/ui';
import { __ } from '~/locale';
+import { DROPDOWN_Y_OFFSET } from '../constants';
+
+// Left offset required for the dropdown to be aligned with the super sidebar
+const DROPDOWN_X_OFFSET = -147;
export default {
components: {
@@ -16,7 +20,22 @@ export default {
required: true,
},
},
+ data() {
+ return {
+ dropdownOpen: false,
+ };
+ },
toggleId: 'create-menu-toggle',
+ popperOptions: {
+ modifiers: [
+ {
+ name: 'offset',
+ options: {
+ offset: [DROPDOWN_X_OFFSET, DROPDOWN_Y_OFFSET],
+ },
+ },
+ ],
+ },
};
</script>
@@ -30,9 +49,17 @@ export default {
text-sr-only
:toggle-text="$options.i18n.createNew"
:toggle-id="$options.toggleId"
+ :popper-options="$options.popperOptions"
data-qa-selector="new_menu_toggle"
+ @shown="dropdownOpen = true"
+ @hidden="dropdownOpen = false"
/>
- <gl-tooltip :target="`#${$options.toggleId}`" placement="bottom" container="#super-sidebar">
+ <gl-tooltip
+ v-if="!dropdownOpen"
+ :target="`#${$options.toggleId}`"
+ placement="bottom"
+ container="#super-sidebar"
+ >
{{ $options.i18n.createNew }}
</gl-tooltip>
</div>
diff --git a/app/assets/javascripts/super_sidebar/components/help_center.vue b/app/assets/javascripts/super_sidebar/components/help_center.vue
index 32836ecb4e6..01b214f4b2b 100644
--- a/app/assets/javascripts/super_sidebar/components/help_center.vue
+++ b/app/assets/javascripts/super_sidebar/components/help_center.vue
@@ -6,7 +6,10 @@ import { PROMO_URL } from 'jh_else_ce/lib/utils/url_utility';
import { __ } from '~/locale';
import { STORAGE_KEY } from '~/whats_new/utils/notification';
import Tracking from '~/tracking';
-import { HELP_MENU_TRACKING_DEFAULTS } from '../constants';
+import { DROPDOWN_Y_OFFSET, HELP_MENU_TRACKING_DEFAULTS } from '../constants';
+
+// Left offset required for the dropdown to be aligned with the super sidebar
+const DROPDOWN_X_OFFSET = -4;
export default {
components: {
@@ -185,12 +188,23 @@ export default {
});
},
},
+ popperOptions: {
+ modifiers: [
+ {
+ name: 'offset',
+ options: {
+ offset: [DROPDOWN_X_OFFSET, DROPDOWN_Y_OFFSET],
+ },
+ },
+ ],
+ },
};
</script>
<template>
<gl-disclosure-dropdown
ref="dropdown"
+ :popper-options="$options.popperOptions"
@shown="trackDropdownToggle(true)"
@hidden="trackDropdownToggle(false)"
>
diff --git a/app/assets/javascripts/super_sidebar/components/nav_item.vue b/app/assets/javascripts/super_sidebar/components/nav_item.vue
index 53698a808a7..223fbe6d078 100644
--- a/app/assets/javascripts/super_sidebar/components/nav_item.vue
+++ b/app/assets/javascripts/super_sidebar/components/nav_item.vue
@@ -160,7 +160,7 @@ export default {
></div>
<div class="gl-flex-shrink-0 gl-w-6 gl-mx-3">
<slot name="icon">
- <gl-icon v-if="item.icon" :name="item.icon" class="gl-ml-2" />
+ <gl-icon v-if="item.icon" :name="item.icon" class="gl-ml-2 item-icon" />
<gl-icon
v-else-if="draggable"
name="grip"
diff --git a/app/assets/javascripts/super_sidebar/components/pinned_section.vue b/app/assets/javascripts/super_sidebar/components/pinned_section.vue
index 3c12e193d80..9595bdfb632 100644
--- a/app/assets/javascripts/super_sidebar/components/pinned_section.vue
+++ b/app/assets/javascripts/super_sidebar/components/pinned_section.vue
@@ -71,7 +71,7 @@ export default {
@click.prevent="expanded = !expanded"
>
<div class="gl-flex-shrink-0 gl-w-6 gl-mx-3">
- <gl-icon name="thumbtack" class="gl-ml-2" />
+ <gl-icon name="thumbtack" class="gl-ml-2 item-icon" />
</div>
<span class="gl-font-weight-bold gl-font-sm gl-flex-grow-1">{{ $options.i18n.pinned }}</span>
diff --git a/app/assets/javascripts/super_sidebar/components/user_menu.vue b/app/assets/javascripts/super_sidebar/components/user_menu.vue
index d8452900e34..c90d1ad9c3e 100644
--- a/app/assets/javascripts/super_sidebar/components/user_menu.vue
+++ b/app/assets/javascripts/super_sidebar/components/user_menu.vue
@@ -11,9 +11,12 @@ import { s__, __, sprintf } from '~/locale';
import NewNavToggle from '~/nav/components/new_nav_toggle.vue';
import Tracking from '~/tracking';
import PersistentUserCallout from '~/persistent_user_callout';
-import { USER_MENU_TRACKING_DEFAULTS } from '../constants';
+import { USER_MENU_TRACKING_DEFAULTS, DROPDOWN_Y_OFFSET } from '../constants';
import UserNameGroup from './user_name_group.vue';
+// Left offset required for the dropdown to be aligned with the super sidebar
+const DROPDOWN_X_OFFSET = -211;
+
export default {
feedbackUrl: 'https://gitlab.com/gitlab-org/gitlab/-/issues/403059',
i18n: {
@@ -216,6 +219,16 @@ export default {
});
},
},
+ popperOptions: {
+ modifiers: [
+ {
+ name: 'offset',
+ options: {
+ offset: [DROPDOWN_X_OFFSET, DROPDOWN_Y_OFFSET],
+ },
+ },
+ ],
+ },
};
</script>
@@ -223,7 +236,7 @@ export default {
<div>
<gl-disclosure-dropdown
ref="userDropdown"
- placement="right"
+ :popper-options="$options.popperOptions"
data-testid="user-dropdown"
data-qa-selector="user_menu"
@shown="onShow"
diff --git a/app/assets/javascripts/super_sidebar/constants.js b/app/assets/javascripts/super_sidebar/constants.js
index 3dbd12b4ff7..5c4a6a9dfc1 100644
--- a/app/assets/javascripts/super_sidebar/constants.js
+++ b/app/assets/javascripts/super_sidebar/constants.js
@@ -33,3 +33,5 @@ export const HELP_MENU_TRACKING_DEFAULTS = {
export const SIDEBAR_PINS_EXPANDED_COOKIE = 'sidebar_pinned_section_expanded';
export const SIDEBAR_COOKIE_EXPIRATION = 365 * 10;
+
+export const DROPDOWN_Y_OFFSET = 4;
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/approvals/approvals.vue b/app/assets/javascripts/vue_merge_request_widget/components/approvals/approvals.vue
index c19dfe663f4..25cf5335fb5 100644
--- a/app/assets/javascripts/vue_merge_request_widget/components/approvals/approvals.vue
+++ b/app/assets/javascripts/vue_merge_request_widget/components/approvals/approvals.vue
@@ -5,7 +5,7 @@ import { STATUS_MERGED } from '~/issues/constants';
import { BV_SHOW_MODAL } from '~/lib/utils/constants';
import { HTTP_STATUS_UNAUTHORIZED } from '~/lib/utils/http_status';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
-import { s__, __ } from '~/locale';
+import { s__, __, sprintf } from '~/locale';
import { getIdFromGraphQLId } from '~/graphql_shared/utils';
import eventHub from '../../event_hub';
import approvalsMixin from '../../mixins/approvals';
@@ -84,13 +84,22 @@ export default {
return Boolean(this.action);
},
invalidRules() {
- return this.approvals.approvalState?.invalidApproversRules || [];
+ return this.approvals.approvalState?.rules?.filter((rule) => rule.invalid) || [];
+ },
+ invalidApprovedRules() {
+ return this.invalidRules.filter((rule) => rule.allowMergeWhenInvalid);
+ },
+ invalidFailedRules() {
+ return this.invalidRules.filter((rule) => !rule.allowMergeWhenInvalid);
},
hasInvalidRules() {
return this.mr.mergeRequestApproversAvailable && this.invalidRules.length;
},
- invalidRulesText() {
- return this.invalidRules.length;
+ hasInvalidApprovedRules() {
+ return this.mr.mergeRequestApproversAvailable && this.invalidApprovedRules.length;
+ },
+ hasInvalidFailedRules() {
+ return this.mr.mergeRequestApproversAvailable && this.invalidFailedRules.length;
},
approvedBy() {
return this.approvals.approvedBy?.nodes || [];
@@ -133,11 +142,29 @@ export default {
return null;
},
- pluralizedRuleText() {
- return this.invalidRules.length > 1
+ pluralizedApprovedRuleText() {
+ return this.invalidApprovedRules.length > 1
? this.$options.i18n.invalidRulesPlural
: this.$options.i18n.invalidRuleSingular;
},
+ pluralizedFailedRuleText() {
+ return this.invalidFailedRules.length > 1
+ ? this.$options.i18n.invalidFailedRulesPlural
+ : this.$options.i18n.invalidFailedRuleSingular;
+ },
+ pluralizedRuleText() {
+ return [
+ this.hasInvalidFailedRules
+ ? sprintf(this.pluralizedFailedRuleText, { rules: this.invalidFailedRules.length })
+ : null,
+ this.hasInvalidApprovedRules
+ ? sprintf(this.pluralizedApprovedRuleText, { rules: this.invalidApprovedRules.length })
+ : null,
+ ]
+ .filter((text) => Boolean(text))
+ .join(', ')
+ .concat('.');
+ },
},
methods: {
approve() {
@@ -205,11 +232,13 @@ export default {
FETCH_LOADING,
linkToInvalidRules: INVALID_RULES_DOCS_PATH,
i18n: {
- invalidRuleSingular: s__(
- 'mrWidget|%{rules} invalid rule has been approved automatically, as no one can approve it.',
+ invalidRuleSingular: s__('mrWidget|%{rules} invalid rule has been approved automatically'),
+ invalidRulesPlural: s__('mrWidget|%{rules} invalid rules have been approved automatically'),
+ invalidFailedRuleSingular: s__(
+ "mrWidget|%{dangerStart}%{rules} rule can't be approved%{dangerEnd}",
),
- invalidRulesPlural: s__(
- 'mrWidget|%{rules} invalid rules have been approved automatically, as no one can approve them.',
+ invalidFailedRulesPlural: s__(
+ "mrWidget|%{dangerStart}%{rules} rules can't be approved%{dangerEnd}",
),
learnMore: __('Learn more.'),
},
@@ -255,7 +284,9 @@ export default {
</div>
<div v-if="hasInvalidRules" class="gl-text-gray-400 gl-mt-2" data-testid="invalid-rules">
<gl-sprintf :message="pluralizedRuleText">
- <template #rules>{{ invalidRulesText }}</template>
+ <template #danger="{ content }">
+ <span class="gl-font-weight-bold text-danger">{{ content }}</span>
+ </template>
</gl-sprintf>
</div>
</div>
diff --git a/app/assets/javascripts/vue_shared/components/markdown/header.vue b/app/assets/javascripts/vue_shared/components/markdown/header.vue
index 4e827d71126..3486f231b39 100644
--- a/app/assets/javascripts/vue_shared/components/markdown/header.vue
+++ b/app/assets/javascripts/vue_shared/components/markdown/header.vue
@@ -122,12 +122,7 @@ export default {
return [`<details><summary>${expandText}</summary>`, `{text}`, '</details>'].join('\n');
},
showAiActions() {
- return (
- this.resourceGlobalId &&
- this.glFeatures.openaiExperimentation &&
- this.glFeatures.summarizeNotes &&
- this.glFeatures.summarizeComments
- );
+ return this.resourceGlobalId && this.glFeatures.summarizeComments;
},
},
watch: {
diff --git a/app/assets/stylesheets/framework/super_sidebar.scss b/app/assets/stylesheets/framework/super_sidebar.scss
index ba98e3b54c9..045ad4a8298 100644
--- a/app/assets/stylesheets/framework/super_sidebar.scss
+++ b/app/assets/stylesheets/framework/super_sidebar.scss
@@ -78,8 +78,9 @@
}
}
- .counter .gl-icon {
- color: var(--gray-500, $gray-500);
+ .counter .gl-icon,
+ .item-icon {
+ color: var(--gray-600, $gray-500);
}
.counter:hover,
diff --git a/app/controllers/clusters/base_controller.rb b/app/controllers/clusters/base_controller.rb
index 2401d8b1044..dd5be596ad1 100644
--- a/app/controllers/clusters/base_controller.rb
+++ b/app/controllers/clusters/base_controller.rb
@@ -8,7 +8,7 @@ class Clusters::BaseController < ApplicationController
helper_method :clusterable
- feature_category :kubernetes_management
+ feature_category :deployment_management
urgency :low, [
:index, :show, :environments, :cluster_status, :prometheus_proxy,
:destroy, :new_cluster_docs, :connect, :new, :create_user
diff --git a/app/controllers/google_api/authorizations_controller.rb b/app/controllers/google_api/authorizations_controller.rb
index 536c5e347e7..8a3183ba615 100644
--- a/app/controllers/google_api/authorizations_controller.rb
+++ b/app/controllers/google_api/authorizations_controller.rb
@@ -6,7 +6,7 @@ module GoogleApi
before_action :validate_session_key!
- feature_category :kubernetes_management
+ feature_category :deployment_management
urgency :low
##
diff --git a/app/controllers/projects/blame_controller.rb b/app/controllers/projects/blame_controller.rb
index cc0d3818e33..dbc82f5b314 100644
--- a/app/controllers/projects/blame_controller.rb
+++ b/app/controllers/projects/blame_controller.rb
@@ -8,24 +8,17 @@ class Projects::BlameController < Projects::ApplicationController
before_action :require_non_empty_project
before_action :assign_ref_vars
before_action :authorize_read_code!
+ before_action :load_blob
feature_category :source_code_management
urgency :low, [:show]
def show
- @blob = @repository.blob_at(@commit.id, @path)
-
- unless @blob
- return redirect_to_tree_root_for_missing_path(@project, @ref, @path)
- end
-
load_environment
load_blame
end
def page
- @blob = @repository.blob_at(@commit.id, @path)
-
load_environment
load_blame
@@ -34,6 +27,14 @@ class Projects::BlameController < Projects::ApplicationController
private
+ def load_blob
+ @blob = @repository.blob_at(@commit.id, @path)
+
+ return if @blob
+
+ redirect_to_tree_root_for_missing_path(@project, @ref, @path)
+ end
+
def load_environment
environment_params = @repository.branch_exists?(@ref) ? { ref: @ref } : { commit: @commit }
environment_params[:find_latest] = true
diff --git a/app/controllers/projects/cluster_agents_controller.rb b/app/controllers/projects/cluster_agents_controller.rb
index 9bc03640811..bd58bd3e470 100644
--- a/app/controllers/projects/cluster_agents_controller.rb
+++ b/app/controllers/projects/cluster_agents_controller.rb
@@ -6,7 +6,7 @@ class Projects::ClusterAgentsController < Projects::ApplicationController
before_action :authorize_read_cluster_agent!
before_action :set_kas_cookie, only: [:show], if: -> { current_user }
- feature_category :kubernetes_management
+ feature_category :deployment_management
urgency :low
def show
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb
index 73b8ca6aafb..a9e0b2d7a98 100644
--- a/app/controllers/projects/merge_requests_controller.rb
+++ b/app/controllers/projects/merge_requests_controller.rb
@@ -39,7 +39,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
push_frontend_feature_flag(:issue_assignees_widget, @project)
push_frontend_feature_flag(:refactor_security_extension, @project)
push_frontend_feature_flag(:deprecate_vulnerabilities_feedback, @project)
- push_frontend_feature_flag(:refactor_code_quality_inline_findings, project)
push_frontend_feature_flag(:moved_mr_sidebar, project)
push_frontend_feature_flag(:single_file_file_by_file, project)
push_frontend_feature_flag(:mr_experience_survey, project)
diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb
index 4f3369d5bd0..ea7bb51c1e6 100644
--- a/app/controllers/projects/pipelines_controller.rb
+++ b/app/controllers/projects/pipelines_controller.rb
@@ -22,7 +22,6 @@ class Projects::PipelinesController < Projects::ApplicationController
before_action :authorize_update_pipeline!, only: [:retry, :cancel]
before_action :ensure_pipeline, only: [:show, :downloadable_artifacts]
before_action :reject_if_build_artifacts_size_refreshing!, only: [:destroy]
- before_action :push_frontend_feature_flags, only: [:index]
# Will be removed with https://gitlab.com/gitlab-org/gitlab/-/issues/225596
before_action :redirect_for_legacy_scope_filter, only: [:index], if: -> { request.format.html? }
@@ -234,7 +233,7 @@ class Projects::PipelinesController < Projects::ApplicationController
@pipelines,
disable_coverage: true,
preload: true,
- disable_manual_and_scheduled_actions: Feature.enabled?(:lazy_load_pipeline_dropdown_actions, @project)
+ disable_manual_and_scheduled_actions: true
)
end
@@ -358,10 +357,6 @@ class Projects::PipelinesController < Projects::ApplicationController
def tracking_project_source
project
end
-
- def push_frontend_feature_flags
- push_frontend_feature_flag(:lazy_load_pipeline_dropdown_actions, @project)
- end
end
Projects::PipelinesController.prepend_mod_with('Projects::PipelinesController')
diff --git a/app/experiments/security_actions_continuous_onboarding_experiment.rb b/app/experiments/security_actions_continuous_onboarding_experiment.rb
deleted file mode 100644
index 6adfbedc744..00000000000
--- a/app/experiments/security_actions_continuous_onboarding_experiment.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-# frozen_string_literal: true
-
-class SecurityActionsContinuousOnboardingExperiment < ApplicationExperiment
- def control_behavior
- end
-
- def candidate_behavior
- end
-end
diff --git a/app/models/onboarding/completion.rb b/app/models/onboarding/completion.rb
index 0966a9f2912..afbd671f82e 100644
--- a/app/models/onboarding/completion.rb
+++ b/app/models/onboarding/completion.rb
@@ -13,7 +13,10 @@ module Onboarding
:issue_created,
:git_write,
:merge_request_created,
- :user_added
+ :user_added,
+ :license_scanning_run,
+ :secure_dependency_scanning_run,
+ :secure_dast_run
].freeze
def initialize(project, current_user = nil)
@@ -58,26 +61,10 @@ module Onboarding
def action_columns
[:code_added] +
- tracked_actions.map { |action_key| ::Onboarding::Progress.column_name(action_key) }
+ ACTION_PATHS.map { |action_key| ::Onboarding::Progress.column_name(action_key) }
end
strong_memoize_attr :action_columns
- def tracked_actions
- ACTION_PATHS + deploy_section_tracked_actions
- end
-
- def deploy_section_tracked_actions
- experiment(
- :security_actions_continuous_onboarding,
- namespace: namespace,
- user: current_user,
- sticky_to: current_user
- ) do |e|
- e.control { [:security_scan_enabled] }
- e.candidate { [:license_scanning_run, :secure_dependency_scanning_run, :secure_dast_run] }
- end.run
- end
-
attr_reader :project, :namespace, :current_user
end
end
diff --git a/app/services/issues/create_service.rb b/app/services/issues/create_service.rb
index 06977dec04b..2a3f0abf4cb 100644
--- a/app/services/issues/create_service.rb
+++ b/app/services/issues/create_service.rb
@@ -93,6 +93,7 @@ module Issues
return if issue.assignees == old_assignees
create_assignee_note(issue, old_assignees)
+ Gitlab::ResourceEvents::AssignmentEventRecorder.new(parent: issue, old_assignees: old_assignees).record
end
def resolve_discussions_with_issue(issue)
diff --git a/app/services/issues/update_service.rb b/app/services/issues/update_service.rb
index 877f0a73c82..4dd4e2978c0 100644
--- a/app/services/issues/update_service.rb
+++ b/app/services/issues/update_service.rb
@@ -75,6 +75,7 @@ module Issues
return if issue.assignees == old_assignees
create_assignee_note(issue, old_assignees)
+ Gitlab::ResourceEvents::AssignmentEventRecorder.new(parent: issue, old_assignees: old_assignees).record
notification_service.async.reassigned_issue(issue, current_user, old_assignees)
todo_service.reassigned_assignable(issue, current_user, old_assignees)
track_incident_action(current_user, issue, :incident_assigned)
diff --git a/app/services/merge_requests/handle_assignees_change_service.rb b/app/services/merge_requests/handle_assignees_change_service.rb
index 51be4690af4..835d56a7070 100644
--- a/app/services/merge_requests/handle_assignees_change_service.rb
+++ b/app/services/merge_requests/handle_assignees_change_service.rb
@@ -15,6 +15,7 @@ module MergeRequests
def execute(merge_request, old_assignees, options = {})
create_assignee_note(merge_request, old_assignees)
notification_service.async.reassigned_merge_request(merge_request, current_user, old_assignees.to_a)
+ Gitlab::ResourceEvents::AssignmentEventRecorder.new(parent: merge_request, old_assignees: old_assignees).record
todo_service.reassigned_assignable(merge_request, current_user, old_assignees)
new_assignees = merge_request.assignees - old_assignees
diff --git a/app/workers/all_queues.yml b/app/workers/all_queues.yml
index 6c3b4990023..0418bef3c1c 100644
--- a/app/workers/all_queues.yml
+++ b/app/workers/all_queues.yml
@@ -131,7 +131,7 @@
:tags: []
- :name: cluster_agent:clusters_agents_delete_expired_events
:worker_name: Clusters::Agents::DeleteExpiredEventsWorker
- :feature_category: :kubernetes_management
+ :feature_category: :deployment_management
:has_external_dependencies: false
:urgency: :low
:resource_boundary: :unknown
@@ -950,7 +950,7 @@
:tags: []
- :name: gcp_cluster:cluster_configure_istio
:worker_name: ClusterConfigureIstioWorker
- :feature_category: :kubernetes_management
+ :feature_category: :deployment_management
:has_external_dependencies: true
:urgency: :low
:resource_boundary: :unknown
@@ -959,7 +959,7 @@
:tags: []
- :name: gcp_cluster:cluster_install_app
:worker_name: ClusterInstallAppWorker
- :feature_category: :kubernetes_management
+ :feature_category: :deployment_management
:has_external_dependencies: true
:urgency: :low
:resource_boundary: :unknown
@@ -968,7 +968,7 @@
:tags: []
- :name: gcp_cluster:cluster_patch_app
:worker_name: ClusterPatchAppWorker
- :feature_category: :kubernetes_management
+ :feature_category: :deployment_management
:has_external_dependencies: true
:urgency: :low
:resource_boundary: :unknown
@@ -977,7 +977,7 @@
:tags: []
- :name: gcp_cluster:cluster_provision
:worker_name: ClusterProvisionWorker
- :feature_category: :kubernetes_management
+ :feature_category: :deployment_management
:has_external_dependencies: false
:urgency: :low
:resource_boundary: :unknown
@@ -986,7 +986,7 @@
:tags: []
- :name: gcp_cluster:cluster_update_app
:worker_name: ClusterUpdateAppWorker
- :feature_category: :kubernetes_management
+ :feature_category: :deployment_management
:has_external_dependencies: false
:urgency: :low
:resource_boundary: :unknown
@@ -995,7 +995,7 @@
:tags: []
- :name: gcp_cluster:cluster_upgrade_app
:worker_name: ClusterUpgradeAppWorker
- :feature_category: :kubernetes_management
+ :feature_category: :deployment_management
:has_external_dependencies: true
:urgency: :low
:resource_boundary: :unknown
@@ -1004,7 +1004,7 @@
:tags: []
- :name: gcp_cluster:cluster_wait_for_app_installation
:worker_name: ClusterWaitForAppInstallationWorker
- :feature_category: :kubernetes_management
+ :feature_category: :deployment_management
:has_external_dependencies: true
:urgency: :low
:resource_boundary: :cpu
@@ -1013,7 +1013,7 @@
:tags: []
- :name: gcp_cluster:cluster_wait_for_app_update
:worker_name: ClusterWaitForAppUpdateWorker
- :feature_category: :kubernetes_management
+ :feature_category: :deployment_management
:has_external_dependencies: false
:urgency: :low
:resource_boundary: :unknown
@@ -1022,7 +1022,7 @@
:tags: []
- :name: gcp_cluster:cluster_wait_for_ingress_ip_address
:worker_name: ClusterWaitForIngressIpAddressWorker
- :feature_category: :kubernetes_management
+ :feature_category: :deployment_management
:has_external_dependencies: true
:urgency: :low
:resource_boundary: :unknown
@@ -1031,7 +1031,7 @@
:tags: []
- :name: gcp_cluster:clusters_applications_activate_integration
:worker_name: Clusters::Applications::ActivateIntegrationWorker
- :feature_category: :kubernetes_management
+ :feature_category: :deployment_management
:has_external_dependencies: false
:urgency: :low
:resource_boundary: :unknown
@@ -1040,7 +1040,7 @@
:tags: []
- :name: gcp_cluster:clusters_applications_deactivate_integration
:worker_name: Clusters::Applications::DeactivateIntegrationWorker
- :feature_category: :kubernetes_management
+ :feature_category: :deployment_management
:has_external_dependencies: false
:urgency: :low
:resource_boundary: :unknown
@@ -1049,7 +1049,7 @@
:tags: []
- :name: gcp_cluster:clusters_applications_uninstall
:worker_name: Clusters::Applications::UninstallWorker
- :feature_category: :kubernetes_management
+ :feature_category: :deployment_management
:has_external_dependencies: true
:urgency: :low
:resource_boundary: :unknown
@@ -1058,7 +1058,7 @@
:tags: []
- :name: gcp_cluster:clusters_applications_wait_for_uninstall_app
:worker_name: Clusters::Applications::WaitForUninstallAppWorker
- :feature_category: :kubernetes_management
+ :feature_category: :deployment_management
:has_external_dependencies: true
:urgency: :low
:resource_boundary: :cpu
@@ -1067,7 +1067,7 @@
:tags: []
- :name: gcp_cluster:clusters_cleanup_project_namespace
:worker_name: Clusters::Cleanup::ProjectNamespaceWorker
- :feature_category: :kubernetes_management
+ :feature_category: :deployment_management
:has_external_dependencies: true
:urgency: :low
:resource_boundary: :unknown
@@ -1076,7 +1076,7 @@
:tags: []
- :name: gcp_cluster:clusters_cleanup_service_account
:worker_name: Clusters::Cleanup::ServiceAccountWorker
- :feature_category: :kubernetes_management
+ :feature_category: :deployment_management
:has_external_dependencies: true
:urgency: :low
:resource_boundary: :unknown
@@ -1085,7 +1085,7 @@
:tags: []
- :name: gcp_cluster:wait_for_cluster_creation
:worker_name: WaitForClusterCreationWorker
- :feature_category: :kubernetes_management
+ :feature_category: :deployment_management
:has_external_dependencies: false
:urgency: :low
:resource_boundary: :unknown
diff --git a/app/workers/concerns/cluster_agent_queue.rb b/app/workers/concerns/cluster_agent_queue.rb
index 68de7cca135..8fdfba11111 100644
--- a/app/workers/concerns/cluster_agent_queue.rb
+++ b/app/workers/concerns/cluster_agent_queue.rb
@@ -5,6 +5,6 @@ module ClusterAgentQueue
included do
queue_namespace :cluster_agent
- feature_category :kubernetes_management
+ feature_category :deployment_management
end
end
diff --git a/app/workers/concerns/cluster_queue.rb b/app/workers/concerns/cluster_queue.rb
index 60ba8785347..5f1a90a99d0 100644
--- a/app/workers/concerns/cluster_queue.rb
+++ b/app/workers/concerns/cluster_queue.rb
@@ -8,6 +8,6 @@ module ClusterQueue
included do
queue_namespace :gcp_cluster
- feature_category :kubernetes_management
+ feature_category :deployment_management
end
end
diff --git a/config/feature_categories.yml b/config/feature_categories.yml
index 296fb69b83f..33044cfff8e 100644
--- a/config/feature_categories.yml
+++ b/config/feature_categories.yml
@@ -7,7 +7,6 @@
# PLEASE DO NOT EDIT THIS FILE MANUALLY.
#
---
-- advanced_deployments
- advisory_database
- api
- api_security
@@ -22,6 +21,7 @@
- build_artifacts
- capacity_planning
- cell
+- ci-cd_visibility
- cloud_native_installation
- code_quality
- code_review_workflow
@@ -78,7 +78,6 @@
- intel_code_security
- interactive_application_security_testing
- internationalization
-- kubernetes_management
- logging
- merge_trains
- metrics
diff --git a/config/feature_flags/development/lazy_load_pipeline_dropdown_actions.yml b/config/feature_flags/development/lazy_load_pipeline_dropdown_actions.yml
deleted file mode 100644
index 136cb9a3615..00000000000
--- a/config/feature_flags/development/lazy_load_pipeline_dropdown_actions.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-name: lazy_load_pipeline_dropdown_actions
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114490
-rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/393846
-milestone: '15.10'
-type: development
-group: group::pipeline execution
-default_enabled: false
diff --git a/config/feature_flags/development/ci_simplify_dag_status_calculation_for_processing.yml b/config/feature_flags/development/record_issue_and_mr_assignee_events.yml
index bde5bce548f..4d63f1bf4d4 100644
--- a/config/feature_flags/development/ci_simplify_dag_status_calculation_for_processing.yml
+++ b/config/feature_flags/development/record_issue_and_mr_assignee_events.yml
@@ -1,8 +1,8 @@
---
-name: ci_simplify_dag_status_calculation_for_processing
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/115684
-rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/403005
+name: record_issue_and_mr_assignee_events
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/117545
+rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/397050
milestone: '15.11'
type: development
-group: group::pipeline authoring
+group: group::optimize
default_enabled: false
diff --git a/config/feature_flags/development/refactor_code_quality_inline_findings.yml b/config/feature_flags/development/refactor_code_quality_inline_findings.yml
deleted file mode 100644
index 98e2a307a50..00000000000
--- a/config/feature_flags/development/refactor_code_quality_inline_findings.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-name: refactor_code_quality_inline_findings
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/88576
-rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/364198
-milestone: '15.1'
-type: development
-group: group::static analysis
-default_enabled: true
diff --git a/config/feature_flags/experiment/security_actions_continuous_onboarding.yml b/config/feature_flags/experiment/security_actions_continuous_onboarding.yml
deleted file mode 100644
index ce7124cf0c8..00000000000
--- a/config/feature_flags/experiment/security_actions_continuous_onboarding.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-name: security_actions_continuous_onboarding
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/82274
-rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/345176
-milestone: '15.2'
-type: experiment
-group: group::acquisition
-default_enabled: false
diff --git a/config/metrics/counts_28d/20210216175405_clusters_applications_cert_managers.yml b/config/metrics/counts_28d/20210216175405_clusters_applications_cert_managers.yml
index 98a18d054a5..41383bbed2b 100644
--- a/config/metrics/counts_28d/20210216175405_clusters_applications_cert_managers.yml
+++ b/config/metrics/counts_28d/20210216175405_clusters_applications_cert_managers.yml
@@ -5,6 +5,7 @@ description: Count user ids from GitLab Managed clusters with Cert Manager enabl
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: removed
time_frame: 28d
diff --git a/config/metrics/counts_28d/20210216175407_clusters_applications_helm.yml b/config/metrics/counts_28d/20210216175407_clusters_applications_helm.yml
index 1e33c81d2c2..24e70eddbe5 100644
--- a/config/metrics/counts_28d/20210216175407_clusters_applications_helm.yml
+++ b/config/metrics/counts_28d/20210216175407_clusters_applications_helm.yml
@@ -5,6 +5,7 @@ description: Count user ids from GitLab Managed clusters with Helm enabled
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: removed
time_frame: 28d
diff --git a/config/metrics/counts_28d/20210216175409_clusters_applications_ingress.yml b/config/metrics/counts_28d/20210216175409_clusters_applications_ingress.yml
index a6e6e92d5bd..3a846b8016a 100644
--- a/config/metrics/counts_28d/20210216175409_clusters_applications_ingress.yml
+++ b/config/metrics/counts_28d/20210216175409_clusters_applications_ingress.yml
@@ -5,6 +5,7 @@ description: Count user ids from GitLab Managed clusters with Ingress enabled
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: removed
time_frame: 28d
diff --git a/config/metrics/counts_28d/20210216175411_clusters_applications_knative.yml b/config/metrics/counts_28d/20210216175411_clusters_applications_knative.yml
index 77a4e5c2d07..75e14e36b4d 100644
--- a/config/metrics/counts_28d/20210216175411_clusters_applications_knative.yml
+++ b/config/metrics/counts_28d/20210216175411_clusters_applications_knative.yml
@@ -5,6 +5,7 @@ description: Count user ids from GitLab Managed clusters with Knative enabled
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: removed
time_frame: 28d
diff --git a/config/metrics/counts_28d/20210216175413_clusters_management_project.yml b/config/metrics/counts_28d/20210216175413_clusters_management_project.yml
index 4902ca400bf..8ea669437ff 100644
--- a/config/metrics/counts_28d/20210216175413_clusters_management_project.yml
+++ b/config/metrics/counts_28d/20210216175413_clusters_management_project.yml
@@ -7,6 +7,7 @@ description: Number of Kubernetes clusters with clusters management project bein
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: 28d
diff --git a/config/metrics/counts_28d/20210216175415_clusters_disabled.yml b/config/metrics/counts_28d/20210216175415_clusters_disabled.yml
index ffc64495a14..39f8bf477c5 100644
--- a/config/metrics/counts_28d/20210216175415_clusters_disabled.yml
+++ b/config/metrics/counts_28d/20210216175415_clusters_disabled.yml
@@ -5,6 +5,7 @@ description: Number of user ids from GitLab Managed disabled clusters
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: 28d
diff --git a/config/metrics/counts_28d/20210216175417_clusters_enabled.yml b/config/metrics/counts_28d/20210216175417_clusters_enabled.yml
index 5c0d5dd9ae5..50e38523ade 100644
--- a/config/metrics/counts_28d/20210216175417_clusters_enabled.yml
+++ b/config/metrics/counts_28d/20210216175417_clusters_enabled.yml
@@ -5,6 +5,7 @@ description: Number of distict user ids from GitLab Managed clusters currently e
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: 28d
diff --git a/config/metrics/counts_28d/20210216175419_clusters_platforms_gke.yml b/config/metrics/counts_28d/20210216175419_clusters_platforms_gke.yml
index f6ce65bd31f..f9f7e4137c9 100644
--- a/config/metrics/counts_28d/20210216175419_clusters_platforms_gke.yml
+++ b/config/metrics/counts_28d/20210216175419_clusters_platforms_gke.yml
@@ -5,6 +5,7 @@ description: Number of user ids from GitLab Managed clusters provisioned with Gi
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: 28d
diff --git a/config/metrics/counts_28d/20210216175420_clusters_platforms_eks.yml b/config/metrics/counts_28d/20210216175420_clusters_platforms_eks.yml
index c3d6e83ae34..855b5f12fac 100644
--- a/config/metrics/counts_28d/20210216175420_clusters_platforms_eks.yml
+++ b/config/metrics/counts_28d/20210216175420_clusters_platforms_eks.yml
@@ -5,6 +5,7 @@ description: Number of user ids from GitLab Managed clusters provisioned with Gi
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: 28d
diff --git a/config/metrics/counts_28d/20210216175422_clusters_platforms_user.yml b/config/metrics/counts_28d/20210216175422_clusters_platforms_user.yml
index 57d0fc54df4..7c0560448e7 100644
--- a/config/metrics/counts_28d/20210216175422_clusters_platforms_user.yml
+++ b/config/metrics/counts_28d/20210216175422_clusters_platforms_user.yml
@@ -5,6 +5,7 @@ description: Number of user ids from GitLab Managed clusters that are user provi
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: 28d
diff --git a/config/metrics/counts_28d/20210216175424_instance_clusters_disabled.yml b/config/metrics/counts_28d/20210216175424_instance_clusters_disabled.yml
index d57a1e629e4..1946b6cc1a6 100644
--- a/config/metrics/counts_28d/20210216175424_instance_clusters_disabled.yml
+++ b/config/metrics/counts_28d/20210216175424_instance_clusters_disabled.yml
@@ -5,6 +5,7 @@ description: Number of users from GitLab Managed disabled clusters attached to t
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: 28d
diff --git a/config/metrics/counts_28d/20210216175426_instance_clusters_enabled.yml b/config/metrics/counts_28d/20210216175426_instance_clusters_enabled.yml
index ae9ab5f3b19..139ca314e17 100644
--- a/config/metrics/counts_28d/20210216175426_instance_clusters_enabled.yml
+++ b/config/metrics/counts_28d/20210216175426_instance_clusters_enabled.yml
@@ -5,6 +5,7 @@ description: Number of user ids from GitLab Managed enabled clusters attached to
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: 28d
diff --git a/config/metrics/counts_28d/20210216175428_group_clusters_disabled.yml b/config/metrics/counts_28d/20210216175428_group_clusters_disabled.yml
index 271359080eb..284d0ebd945 100644
--- a/config/metrics/counts_28d/20210216175428_group_clusters_disabled.yml
+++ b/config/metrics/counts_28d/20210216175428_group_clusters_disabled.yml
@@ -5,6 +5,7 @@ description: Number of user ids GitLab Managed disabled clusters attached to gro
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: 28d
diff --git a/config/metrics/counts_28d/20210216175430_group_clusters_enabled.yml b/config/metrics/counts_28d/20210216175430_group_clusters_enabled.yml
index 958e91f3c8d..8898c54989e 100644
--- a/config/metrics/counts_28d/20210216175430_group_clusters_enabled.yml
+++ b/config/metrics/counts_28d/20210216175430_group_clusters_enabled.yml
@@ -5,6 +5,7 @@ description: Count disctinct user ids from GitLab Managed enabled clusters attac
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: 28d
diff --git a/config/metrics/counts_28d/20210216175432_project_clusters_disabled.yml b/config/metrics/counts_28d/20210216175432_project_clusters_disabled.yml
index d5c9ae6c36b..b0b2c0e76a5 100644
--- a/config/metrics/counts_28d/20210216175432_project_clusters_disabled.yml
+++ b/config/metrics/counts_28d/20210216175432_project_clusters_disabled.yml
@@ -5,6 +5,7 @@ description: Number of user ids from GitLab Managed disabled clusters attached t
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: 28d
diff --git a/config/metrics/counts_28d/20210216175434_project_clusters_enabled.yml b/config/metrics/counts_28d/20210216175434_project_clusters_enabled.yml
index 4c49cb7a9e8..9000f412607 100644
--- a/config/metrics/counts_28d/20210216175434_project_clusters_enabled.yml
+++ b/config/metrics/counts_28d/20210216175434_project_clusters_enabled.yml
@@ -5,6 +5,7 @@ description: Number of user ids from GitLab Managed enabled clusters attached to
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: 28d
diff --git a/config/metrics/counts_28d/20220729001651_agent_users_using_ci_tunnel_monthly.yml b/config/metrics/counts_28d/20220729001651_agent_users_using_ci_tunnel_monthly.yml
index 1051dd92307..683fd308b0c 100644
--- a/config/metrics/counts_28d/20220729001651_agent_users_using_ci_tunnel_monthly.yml
+++ b/config/metrics/counts_28d/20220729001651_agent_users_using_ci_tunnel_monthly.yml
@@ -4,6 +4,7 @@ description: MAU of the Agent for Kubernetes CI/CD Tunnel
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
milestone: "15.3"
diff --git a/config/metrics/counts_all/20210216175232_clusters.yml b/config/metrics/counts_all/20210216175232_clusters.yml
index d829444f44b..ff1174d0c26 100644
--- a/config/metrics/counts_all/20210216175232_clusters.yml
+++ b/config/metrics/counts_all/20210216175232_clusters.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters both enabled and disabled
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175234_clusters_enabled.yml b/config/metrics/counts_all/20210216175234_clusters_enabled.yml
index 61b414ff244..2fc86649c4b 100644
--- a/config/metrics/counts_all/20210216175234_clusters_enabled.yml
+++ b/config/metrics/counts_all/20210216175234_clusters_enabled.yml
@@ -5,6 +5,7 @@ description: Number of Kubernetes clusters attached to GitLab currently enabled
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175236_project_clusters_enabled.yml b/config/metrics/counts_all/20210216175236_project_clusters_enabled.yml
index 622a64538b9..d6d5228d0fe 100644
--- a/config/metrics/counts_all/20210216175236_project_clusters_enabled.yml
+++ b/config/metrics/counts_all/20210216175236_project_clusters_enabled.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters attached to projects
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175238_group_clusters_enabled.yml b/config/metrics/counts_all/20210216175238_group_clusters_enabled.yml
index 583773986a1..6c818d48782 100644
--- a/config/metrics/counts_all/20210216175238_group_clusters_enabled.yml
+++ b/config/metrics/counts_all/20210216175238_group_clusters_enabled.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters attached to groups
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175240_instance_clusters_enabled.yml b/config/metrics/counts_all/20210216175240_instance_clusters_enabled.yml
index 796957a7440..804e25da11c 100644
--- a/config/metrics/counts_all/20210216175240_instance_clusters_enabled.yml
+++ b/config/metrics/counts_all/20210216175240_instance_clusters_enabled.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters attached to the instance
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175242_clusters_disabled.yml b/config/metrics/counts_all/20210216175242_clusters_disabled.yml
index bb0380ae7e8..c4d4f14fc2c 100644
--- a/config/metrics/counts_all/20210216175242_clusters_disabled.yml
+++ b/config/metrics/counts_all/20210216175242_clusters_disabled.yml
@@ -5,6 +5,7 @@ description: Number of Kubernetes clusters attached to GitLab currently disabled
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175244_project_clusters_disabled.yml b/config/metrics/counts_all/20210216175244_project_clusters_disabled.yml
index 058b23842d4..8ebcf09d7a2 100644
--- a/config/metrics/counts_all/20210216175244_project_clusters_disabled.yml
+++ b/config/metrics/counts_all/20210216175244_project_clusters_disabled.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed disabled clusters previously attached to proje
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175246_group_clusters_disabled.yml b/config/metrics/counts_all/20210216175246_group_clusters_disabled.yml
index e65c8abdd96..59b42f1cabe 100644
--- a/config/metrics/counts_all/20210216175246_group_clusters_disabled.yml
+++ b/config/metrics/counts_all/20210216175246_group_clusters_disabled.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed disabled clusters previously attached to group
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175248_instance_clusters_disabled.yml b/config/metrics/counts_all/20210216175248_instance_clusters_disabled.yml
index 1e57c37f13e..c9afefabf6c 100644
--- a/config/metrics/counts_all/20210216175248_instance_clusters_disabled.yml
+++ b/config/metrics/counts_all/20210216175248_instance_clusters_disabled.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed disabled clusters previously attached to the i
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175250_clusters_platforms_eks.yml b/config/metrics/counts_all/20210216175250_clusters_platforms_eks.yml
index 1e1438af907..6e9c86ea00f 100644
--- a/config/metrics/counts_all/20210216175250_clusters_platforms_eks.yml
+++ b/config/metrics/counts_all/20210216175250_clusters_platforms_eks.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters provisioned with GitLab on AWS EKS
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175251_clusters_platforms_gke.yml b/config/metrics/counts_all/20210216175251_clusters_platforms_gke.yml
index 3b1f5b5ee7c..9d909701fe8 100644
--- a/config/metrics/counts_all/20210216175251_clusters_platforms_gke.yml
+++ b/config/metrics/counts_all/20210216175251_clusters_platforms_gke.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters provisioned with GitLab on GCE GKE
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175253_clusters_platforms_user.yml b/config/metrics/counts_all/20210216175253_clusters_platforms_user.yml
index 0d9628454a5..4c073d61844 100644
--- a/config/metrics/counts_all/20210216175253_clusters_platforms_user.yml
+++ b/config/metrics/counts_all/20210216175253_clusters_platforms_user.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters that are user provisioned
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175255_clusters_applications_helm.yml b/config/metrics/counts_all/20210216175255_clusters_applications_helm.yml
index 6a976e22817..075cddb387e 100644
--- a/config/metrics/counts_all/20210216175255_clusters_applications_helm.yml
+++ b/config/metrics/counts_all/20210216175255_clusters_applications_helm.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters with GitLab Managed App:Helm enabled
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: removed
time_frame: all
diff --git a/config/metrics/counts_all/20210216175257_clusters_applications_ingress.yml b/config/metrics/counts_all/20210216175257_clusters_applications_ingress.yml
index abf975a0ccc..cb308890bd4 100644
--- a/config/metrics/counts_all/20210216175257_clusters_applications_ingress.yml
+++ b/config/metrics/counts_all/20210216175257_clusters_applications_ingress.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters with GitLab Managed App:Ingress insta
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: removed
time_frame: all
diff --git a/config/metrics/counts_all/20210216175259_clusters_applications_cert_managers.yml b/config/metrics/counts_all/20210216175259_clusters_applications_cert_managers.yml
index 69582bfbf19..cad1d25e732 100644
--- a/config/metrics/counts_all/20210216175259_clusters_applications_cert_managers.yml
+++ b/config/metrics/counts_all/20210216175259_clusters_applications_cert_managers.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters with GitLab Managed App:Cert Manager
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: removed
time_frame: all
diff --git a/config/metrics/counts_all/20210216175301_clusters_applications_crossplane.yml b/config/metrics/counts_all/20210216175301_clusters_applications_crossplane.yml
index d7e93b59ee9..e7ab1a3f950 100644
--- a/config/metrics/counts_all/20210216175301_clusters_applications_crossplane.yml
+++ b/config/metrics/counts_all/20210216175301_clusters_applications_crossplane.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters with GitLab Managed App:Crossplane in
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: removed
time_frame: all
diff --git a/config/metrics/counts_all/20210216175303_clusters_applications_prometheus.yml b/config/metrics/counts_all/20210216175303_clusters_applications_prometheus.yml
index 201c31ee9cb..033d912d880 100644
--- a/config/metrics/counts_all/20210216175303_clusters_applications_prometheus.yml
+++ b/config/metrics/counts_all/20210216175303_clusters_applications_prometheus.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters with GitLab Managed App:Prometheus in
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: removed
time_frame: all
diff --git a/config/metrics/counts_all/20210216175305_clusters_applications_runner.yml b/config/metrics/counts_all/20210216175305_clusters_applications_runner.yml
index 669b9b8f903..a460b40ed81 100644
--- a/config/metrics/counts_all/20210216175305_clusters_applications_runner.yml
+++ b/config/metrics/counts_all/20210216175305_clusters_applications_runner.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters with GitLab Managed App:Runner instal
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: removed
time_frame: all
diff --git a/config/metrics/counts_all/20210216175307_clusters_applications_knative.yml b/config/metrics/counts_all/20210216175307_clusters_applications_knative.yml
index 6f6ef1e5dfa..bc142676e6a 100644
--- a/config/metrics/counts_all/20210216175307_clusters_applications_knative.yml
+++ b/config/metrics/counts_all/20210216175307_clusters_applications_knative.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters with GitLab Managed App:Knative insta
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: removed
time_frame: all
diff --git a/config/metrics/counts_all/20210216175309_clusters_applications_elastic_stack.yml b/config/metrics/counts_all/20210216175309_clusters_applications_elastic_stack.yml
index 46dfd58f5ff..54c96b5bea7 100644
--- a/config/metrics/counts_all/20210216175309_clusters_applications_elastic_stack.yml
+++ b/config/metrics/counts_all/20210216175309_clusters_applications_elastic_stack.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters with GitLab Managed App:Elastic Stack
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: removed
time_frame: all
diff --git a/config/metrics/counts_all/20210216175310_clusters_applications_jupyter.yml b/config/metrics/counts_all/20210216175310_clusters_applications_jupyter.yml
index 63747b1fe74..b7d202d4c33 100644
--- a/config/metrics/counts_all/20210216175310_clusters_applications_jupyter.yml
+++ b/config/metrics/counts_all/20210216175310_clusters_applications_jupyter.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters with GitLab Managed App:Jupyter insta
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: removed
time_frame: all
diff --git a/config/metrics/counts_all/20210216175312_clusters_applications_cilium.yml b/config/metrics/counts_all/20210216175312_clusters_applications_cilium.yml
index ece69b8f339..bd067804cbb 100644
--- a/config/metrics/counts_all/20210216175312_clusters_applications_cilium.yml
+++ b/config/metrics/counts_all/20210216175312_clusters_applications_cilium.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters with GitLab Managed App:Cilium instal
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: removed
time_frame: all
diff --git a/config/metrics/counts_all/20210216175314_clusters_management_project.yml b/config/metrics/counts_all/20210216175314_clusters_management_project.yml
index 09f358a956f..3e4a4c6a7af 100644
--- a/config/metrics/counts_all/20210216175314_clusters_management_project.yml
+++ b/config/metrics/counts_all/20210216175314_clusters_management_project.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters with defined cluster management proje
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175316_kubernetes_agents.yml b/config/metrics/counts_all/20210216175316_kubernetes_agents.yml
index def6e0ef296..537d29f11fa 100644
--- a/config/metrics/counts_all/20210216175316_kubernetes_agents.yml
+++ b/config/metrics/counts_all/20210216175316_kubernetes_agents.yml
@@ -5,6 +5,7 @@ description: Count of Kubernetes registered agents
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175318_kubernetes_agents_with_token.yml b/config/metrics/counts_all/20210216175318_kubernetes_agents_with_token.yml
index 65e3f88565b..143ebaa5b0d 100644
--- a/config/metrics/counts_all/20210216175318_kubernetes_agents_with_token.yml
+++ b/config/metrics/counts_all/20210216175318_kubernetes_agents_with_token.yml
@@ -5,6 +5,7 @@ description: Count of Kubernetes agents with at least one token
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175329_clusters_applications_cert_managers.yml b/config/metrics/counts_all/20210216175329_clusters_applications_cert_managers.yml
index 8937c8a82a9..82bfacffaf3 100644
--- a/config/metrics/counts_all/20210216175329_clusters_applications_cert_managers.yml
+++ b/config/metrics/counts_all/20210216175329_clusters_applications_cert_managers.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters with GitLab Managed App:Cert Manager
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: removed
time_frame: all
diff --git a/config/metrics/counts_all/20210216175331_clusters_applications_helm.yml b/config/metrics/counts_all/20210216175331_clusters_applications_helm.yml
index 18952db9b68..52c023961f9 100644
--- a/config/metrics/counts_all/20210216175331_clusters_applications_helm.yml
+++ b/config/metrics/counts_all/20210216175331_clusters_applications_helm.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters with GitLab Managed App:Helm enabled
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: removed
time_frame: all
diff --git a/config/metrics/counts_all/20210216175333_clusters_applications_ingress.yml b/config/metrics/counts_all/20210216175333_clusters_applications_ingress.yml
index 593c86b6bf1..8d9897318a4 100644
--- a/config/metrics/counts_all/20210216175333_clusters_applications_ingress.yml
+++ b/config/metrics/counts_all/20210216175333_clusters_applications_ingress.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters with GitLab Managed App:Ingress insta
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: removed
time_frame: all
diff --git a/config/metrics/counts_all/20210216175335_clusters_applications_knative.yml b/config/metrics/counts_all/20210216175335_clusters_applications_knative.yml
index 78073455d01..1cab6eeee45 100644
--- a/config/metrics/counts_all/20210216175335_clusters_applications_knative.yml
+++ b/config/metrics/counts_all/20210216175335_clusters_applications_knative.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters with GitLab Managed App:Knative insta
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: removed
time_frame: all
diff --git a/config/metrics/counts_all/20210216175337_clusters_management_project.yml b/config/metrics/counts_all/20210216175337_clusters_management_project.yml
index 4e127321fca..0a8899be1a3 100644
--- a/config/metrics/counts_all/20210216175337_clusters_management_project.yml
+++ b/config/metrics/counts_all/20210216175337_clusters_management_project.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters with defined cluster management proje
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175339_clusters_disabled.yml b/config/metrics/counts_all/20210216175339_clusters_disabled.yml
index 696e7a15888..510b66c02a2 100644
--- a/config/metrics/counts_all/20210216175339_clusters_disabled.yml
+++ b/config/metrics/counts_all/20210216175339_clusters_disabled.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed disabled clusters
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175341_clusters_enabled.yml b/config/metrics/counts_all/20210216175341_clusters_enabled.yml
index 9271203b1a7..be4ca306eff 100644
--- a/config/metrics/counts_all/20210216175341_clusters_enabled.yml
+++ b/config/metrics/counts_all/20210216175341_clusters_enabled.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters currently enabled
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175343_clusters_platforms_gke.yml b/config/metrics/counts_all/20210216175343_clusters_platforms_gke.yml
index 4e016aee66f..41a546f73ab 100644
--- a/config/metrics/counts_all/20210216175343_clusters_platforms_gke.yml
+++ b/config/metrics/counts_all/20210216175343_clusters_platforms_gke.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters provisioned with GitLab on GCE GKE
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175345_clusters_platforms_eks.yml b/config/metrics/counts_all/20210216175345_clusters_platforms_eks.yml
index ed5981a9919..1711589636d 100644
--- a/config/metrics/counts_all/20210216175345_clusters_platforms_eks.yml
+++ b/config/metrics/counts_all/20210216175345_clusters_platforms_eks.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters provisioned with GitLab on AWS EKS
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175346_clusters_platforms_user.yml b/config/metrics/counts_all/20210216175346_clusters_platforms_user.yml
index bbdb2ac0892..ed86490ef9c 100644
--- a/config/metrics/counts_all/20210216175346_clusters_platforms_user.yml
+++ b/config/metrics/counts_all/20210216175346_clusters_platforms_user.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed clusters that are user provisioned
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175348_instance_clusters_disabled.yml b/config/metrics/counts_all/20210216175348_instance_clusters_disabled.yml
index 28e9355c88a..8007b2fc277 100644
--- a/config/metrics/counts_all/20210216175348_instance_clusters_disabled.yml
+++ b/config/metrics/counts_all/20210216175348_instance_clusters_disabled.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed disabled clusters attached to the instance
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175350_instance_clusters_enabled.yml b/config/metrics/counts_all/20210216175350_instance_clusters_enabled.yml
index d28bf04239a..bfe2a41c6ef 100644
--- a/config/metrics/counts_all/20210216175350_instance_clusters_enabled.yml
+++ b/config/metrics/counts_all/20210216175350_instance_clusters_enabled.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed enabled clusters attached to the instance
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175352_group_clusters_disabled.yml b/config/metrics/counts_all/20210216175352_group_clusters_disabled.yml
index cec667ac9c9..92e39a8aa36 100644
--- a/config/metrics/counts_all/20210216175352_group_clusters_disabled.yml
+++ b/config/metrics/counts_all/20210216175352_group_clusters_disabled.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed disabled clusters attached to groups
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175354_group_clusters_enabled.yml b/config/metrics/counts_all/20210216175354_group_clusters_enabled.yml
index 7fd97fd388d..263102b5a3b 100644
--- a/config/metrics/counts_all/20210216175354_group_clusters_enabled.yml
+++ b/config/metrics/counts_all/20210216175354_group_clusters_enabled.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed enabled clusters attached to groups
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175356_project_clusters_disabled.yml b/config/metrics/counts_all/20210216175356_project_clusters_disabled.yml
index 417ba5eb9a9..741036b7cd3 100644
--- a/config/metrics/counts_all/20210216175356_project_clusters_disabled.yml
+++ b/config/metrics/counts_all/20210216175356_project_clusters_disabled.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed disabled clusters attached to projects
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175358_project_clusters_enabled.yml b/config/metrics/counts_all/20210216175358_project_clusters_enabled.yml
index 4e9be0d170b..7afa52d0aa5 100644
--- a/config/metrics/counts_all/20210216175358_project_clusters_enabled.yml
+++ b/config/metrics/counts_all/20210216175358_project_clusters_enabled.yml
@@ -5,6 +5,7 @@ description: Total GitLab Managed enabled clusters attached to projects
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216175403_projects_with_prometheus_alerts.yml b/config/metrics/counts_all/20210216175403_projects_with_prometheus_alerts.yml
index 286733c87d7..4192eb5c3f8 100644
--- a/config/metrics/counts_all/20210216175403_projects_with_prometheus_alerts.yml
+++ b/config/metrics/counts_all/20210216175403_projects_with_prometheus_alerts.yml
@@ -5,6 +5,7 @@ description: Projects with Prometheus alerting enabled
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: removed
milestone_removed: '14.0'
diff --git a/config/metrics/counts_all/20210216181949_clusters_applications_runner.yml b/config/metrics/counts_all/20210216181949_clusters_applications_runner.yml
index 47290bf39ba..8e5acdf5ce3 100644
--- a/config/metrics/counts_all/20210216181949_clusters_applications_runner.yml
+++ b/config/metrics/counts_all/20210216181949_clusters_applications_runner.yml
@@ -5,6 +5,7 @@ description: Count of users creating managed clusters with Runner enabled
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: removed
time_frame: all
diff --git a/config/metrics/counts_all/20210505015532_kubernetes_agent_k8s_api_proxy_request.yml b/config/metrics/counts_all/20210505015532_kubernetes_agent_k8s_api_proxy_request.yml
index 67edbe13656..b1d5688c9a5 100644
--- a/config/metrics/counts_all/20210505015532_kubernetes_agent_k8s_api_proxy_request.yml
+++ b/config/metrics/counts_all/20210505015532_kubernetes_agent_k8s_api_proxy_request.yml
@@ -5,6 +5,7 @@ description: Count of Kubernetes API proxy requests
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
milestone: '13.12'
diff --git a/config/metrics/counts_all/20210916200930_clusters_integrations_prometheus.yml b/config/metrics/counts_all/20210916200930_clusters_integrations_prometheus.yml
index a535a7bca44..296e218d7b6 100644
--- a/config/metrics/counts_all/20210916200930_clusters_integrations_prometheus.yml
+++ b/config/metrics/counts_all/20210916200930_clusters_integrations_prometheus.yml
@@ -5,6 +5,7 @@ description: Total clusters with Clusters::Integrations::Prometheus enabled
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210916200931_clusters_integrations_elastic_stack.yml b/config/metrics/counts_all/20210916200931_clusters_integrations_elastic_stack.yml
index 594138d4c17..0e8b04ad660 100644
--- a/config/metrics/counts_all/20210916200931_clusters_integrations_elastic_stack.yml
+++ b/config/metrics/counts_all/20210916200931_clusters_integrations_elastic_stack.yml
@@ -5,6 +5,7 @@ description: Total clusters with Clusters::Integrations::ElasticStack enabled
product_section: ops
product_stage: configure
product_group: configure
+product_category: deployment_management
value_type: number
status: removed
time_frame: all
diff --git a/danger/database/Dangerfile b/danger/database/Dangerfile
index df6ffab7c94..96134ea66a6 100644
--- a/danger/database/Dangerfile
+++ b/danger/database/Dangerfile
@@ -45,6 +45,8 @@ geo_migration_created = !git.added_files.grep(%r{\Aee/db/geo/(post_)?migrate/}).
format_str = helper.ci? ? SCHEMA_NOT_UPDATED_MESSAGE_FULL : SCHEMA_NOT_UPDATED_MESSAGE_SHORT
+return if stable_branch.valid_stable_branch?
+
if non_geo_migration_created && !non_geo_db_schema_updated
warn format(format_str, migrations: 'migrations', schema: helper.html_link("db/structure.sql"))
end
diff --git a/danger/datateam/Dangerfile b/danger/datateam/Dangerfile
index ed2703f31e6..3cd0578a068 100644
--- a/danger/datateam/Dangerfile
+++ b/danger/datateam/Dangerfile
@@ -1,3 +1,5 @@
# frozen_string_literal: true
+return if stable_branch.valid_stable_branch?
+
markdown(datateam.build_message) if datateam.impacted?
diff --git a/danger/product_intelligence/Dangerfile b/danger/product_intelligence/Dangerfile
index 86888fe542e..b20c56a7b7c 100644
--- a/danger/product_intelligence/Dangerfile
+++ b/danger/product_intelligence/Dangerfile
@@ -1,5 +1,7 @@
# frozen_string_literal: true
+return if stable_branch.valid_stable_branch?
+
product_intelligence.check!
product_intelligence.check_affected_scopes!
diff --git a/danger/roulette/Dangerfile b/danger/roulette/Dangerfile
index 32899c4d74f..3256ff25bbf 100644
--- a/danger/roulette/Dangerfile
+++ b/danger/roulette/Dangerfile
@@ -104,6 +104,9 @@ categories << :product_intelligence if helper.mr_labels.include?("product intell
# Skip Product intelligence reviews for growth experiment MRs
categories.delete(:product_intelligence) if helper.mr_labels.include?("growth experiment")
+# Skip specialty reviews for stable branch MRs since they have already been merged to the default branch
+categories.subtract([:database, :ux, :product_intelligence]) if stable_branch.valid_stable_branch?
+
if changes.any?
random_roulette_spins = roulette.spin(nil, categories, timezone_experiment: false)
diff --git a/db/docs/agent_activity_events.yml b/db/docs/agent_activity_events.yml
index 9fd906d5352..d014ef1f114 100644
--- a/db/docs/agent_activity_events.yml
+++ b/db/docs/agent_activity_events.yml
@@ -3,7 +3,7 @@ table_name: agent_activity_events
classes:
- Clusters::Agents::ActivityEvent
feature_categories:
-- kubernetes_management
+- deployment_management
description: Historical timeline events belonging to a cluster agent
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/74577
milestone: '14.6'
diff --git a/db/docs/agent_group_authorizations.yml b/db/docs/agent_group_authorizations.yml
index c300ed3ba08..f0d45dbdc3d 100644
--- a/db/docs/agent_group_authorizations.yml
+++ b/db/docs/agent_group_authorizations.yml
@@ -3,7 +3,7 @@ table_name: agent_group_authorizations
classes:
- Clusters::Agents::Authorizations::CiAccess::GroupAuthorization
feature_categories:
-- kubernetes_management
+- deployment_management
description: Configuration for a group that is authorized to use a particular cluster agent
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68023
milestone: '14.3'
diff --git a/db/docs/agent_project_authorizations.yml b/db/docs/agent_project_authorizations.yml
index 98a74b9f9b7..77c26571c28 100644
--- a/db/docs/agent_project_authorizations.yml
+++ b/db/docs/agent_project_authorizations.yml
@@ -3,7 +3,7 @@ table_name: agent_project_authorizations
classes:
- Clusters::Agents::Authorizations::CiAccess::ProjectAuthorization
feature_categories:
-- kubernetes_management
+- deployment_management
description: Configuration for a project that is authorized to use a particular cluster agent
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67295
milestone: '14.3'
diff --git a/db/docs/agent_user_access_group_authorizations.yml b/db/docs/agent_user_access_group_authorizations.yml
index 659b36bd61f..cd4df56d5a0 100644
--- a/db/docs/agent_user_access_group_authorizations.yml
+++ b/db/docs/agent_user_access_group_authorizations.yml
@@ -3,7 +3,7 @@ table_name: agent_user_access_group_authorizations
classes:
- Clusters::Agents::Authorizations::UserAccess::GroupAuthorization
feature_categories:
-- kubernetes_management
+- deployment_management
description: Configuration for a group that is authorized to use a particular cluster agent through user_access keyword
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/116901
milestone: '15.11'
diff --git a/db/docs/agent_user_access_project_authorizations.yml b/db/docs/agent_user_access_project_authorizations.yml
index 0f0953da630..f0629af6ec2 100644
--- a/db/docs/agent_user_access_project_authorizations.yml
+++ b/db/docs/agent_user_access_project_authorizations.yml
@@ -3,7 +3,7 @@ table_name: agent_user_access_project_authorizations
classes:
- Clusters::Agents::Authorizations::UserAccess::ProjectAuthorization
feature_categories:
-- kubernetes_management
+- deployment_management
description: Configuration for a project that is authorized to use a particular cluster agent through user_access keyword
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/116901
milestone: '15.11'
diff --git a/db/docs/aws_roles.yml b/db/docs/aws_roles.yml
index 902d6a97b62..0d5c9a6acb2 100644
--- a/db/docs/aws_roles.yml
+++ b/db/docs/aws_roles.yml
@@ -3,7 +3,7 @@ table_name: aws_roles
classes:
- Aws::Role
feature_categories:
-- kubernetes_management
+- deployment_management
description: (Deprecated) AWS IAM role for creating EKS clusters via GitLab
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/17057
milestone: '12.4'
diff --git a/db/docs/cluster_agent_tokens.yml b/db/docs/cluster_agent_tokens.yml
index 24b093c948c..36e843406b0 100644
--- a/db/docs/cluster_agent_tokens.yml
+++ b/db/docs/cluster_agent_tokens.yml
@@ -3,7 +3,7 @@ table_name: cluster_agent_tokens
classes:
- Clusters::AgentToken
feature_categories:
-- kubernetes_management
+- deployment_management
description: Tokens used by cluster agents to connect to GitLab
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/33228
milestone: '13.3'
diff --git a/db/docs/cluster_agents.yml b/db/docs/cluster_agents.yml
index 14574fb82f4..237d8d23bfd 100644
--- a/db/docs/cluster_agents.yml
+++ b/db/docs/cluster_agents.yml
@@ -3,7 +3,7 @@ table_name: cluster_agents
classes:
- Clusters::Agent
feature_categories:
-- kubernetes_management
+- deployment_management
description: Represents a GitLab Agent for Kubernetes installed in a Kubernetes cluster
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/33228
milestone: '13.3'
diff --git a/db/docs/cluster_enabled_grants.yml b/db/docs/cluster_enabled_grants.yml
index 873bbb4b7b5..4c6bef3db0e 100644
--- a/db/docs/cluster_enabled_grants.yml
+++ b/db/docs/cluster_enabled_grants.yml
@@ -3,7 +3,7 @@ table_name: cluster_enabled_grants
classes:
- Clusters::ClusterEnabledGrant
feature_categories:
-- kubernetes_management
+- deployment_management
description: Persists information about namespaces which got an extended life for certificate based clusters
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/87149
milestone: '15.1'
diff --git a/db/docs/cluster_groups.yml b/db/docs/cluster_groups.yml
index ff5c3d890fd..70c11431acf 100644
--- a/db/docs/cluster_groups.yml
+++ b/db/docs/cluster_groups.yml
@@ -3,7 +3,7 @@ table_name: cluster_groups
classes:
- Clusters::Group
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) Join table between 'clusters' and 'namespaces'"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/0e15eec86d83cbdfefe17966bf5c02e4d419a34d
milestone: '11.5'
diff --git a/db/docs/cluster_platforms_kubernetes.yml b/db/docs/cluster_platforms_kubernetes.yml
index c92705b7c46..961eb37e366 100644
--- a/db/docs/cluster_platforms_kubernetes.yml
+++ b/db/docs/cluster_platforms_kubernetes.yml
@@ -3,7 +3,7 @@ table_name: cluster_platforms_kubernetes
classes:
- Clusters::Platforms::Kubernetes
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) Kubernetes specific details for a cluster integration"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/d0cff7f5855f91b5479f9fdaa39d8d95ec691a9e
milestone: '10.2'
diff --git a/db/docs/cluster_projects.yml b/db/docs/cluster_projects.yml
index 89bcd726e1f..152b60ea87b 100644
--- a/db/docs/cluster_projects.yml
+++ b/db/docs/cluster_projects.yml
@@ -3,7 +3,7 @@ table_name: cluster_projects
classes:
- Clusters::Project
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) Join table between 'clusters' and 'projects'"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/d0cff7f5855f91b5479f9fdaa39d8d95ec691a9e
milestone: '10.2'
diff --git a/db/docs/cluster_providers_aws.yml b/db/docs/cluster_providers_aws.yml
index 7c32b9291d1..ed9937b9a66 100644
--- a/db/docs/cluster_providers_aws.yml
+++ b/db/docs/cluster_providers_aws.yml
@@ -3,7 +3,7 @@ table_name: cluster_providers_aws
classes:
- Clusters::Providers::Aws
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) AWS specific details for an EKS cluster integration"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/17057
milestone: '12.4'
diff --git a/db/docs/cluster_providers_gcp.yml b/db/docs/cluster_providers_gcp.yml
index cc89320d346..a16e07d9fd3 100644
--- a/db/docs/cluster_providers_gcp.yml
+++ b/db/docs/cluster_providers_gcp.yml
@@ -3,7 +3,7 @@ table_name: cluster_providers_gcp
classes:
- Clusters::Providers::Gcp
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) GCP specific details for a GKE cluster integration"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/d0cff7f5855f91b5479f9fdaa39d8d95ec691a9e
milestone: '10.2'
diff --git a/db/docs/clusters.yml b/db/docs/clusters.yml
index f791c84bfa2..309bdd426b6 100644
--- a/db/docs/clusters.yml
+++ b/db/docs/clusters.yml
@@ -3,7 +3,7 @@ table_name: clusters
classes:
- Clusters::Cluster
feature_categories:
-- kubernetes_management
+- deployment_management
description: Persists information about GitLab managed clusters
introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14879
milestone: '10.1'
diff --git a/db/docs/clusters_applications_cert_managers.yml b/db/docs/clusters_applications_cert_managers.yml
index 78ef851a2c0..0285b786f9f 100644
--- a/db/docs/clusters_applications_cert_managers.yml
+++ b/db/docs/clusters_applications_cert_managers.yml
@@ -1,7 +1,7 @@
---
table_name: clusters_applications_cert_managers
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) A GitLab managed cert-manager installation in a Kubernetes cluster"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/8837519445c319a699e0f3ced1c6912c839f3389
milestone: '11.6'
diff --git a/db/docs/clusters_applications_crossplane.yml b/db/docs/clusters_applications_crossplane.yml
index c440eb2487b..a993468d7b8 100644
--- a/db/docs/clusters_applications_crossplane.yml
+++ b/db/docs/clusters_applications_crossplane.yml
@@ -1,7 +1,7 @@
---
table_name: clusters_applications_crossplane
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) A GitLab managed Crossplane installation in a Kubernetes cluster"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/18797
milestone: '12.5'
diff --git a/db/docs/clusters_applications_helm.yml b/db/docs/clusters_applications_helm.yml
index 648557c8494..58dbe04b1d5 100644
--- a/db/docs/clusters_applications_helm.yml
+++ b/db/docs/clusters_applications_helm.yml
@@ -1,7 +1,7 @@
---
table_name: clusters_applications_helm
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) A GitLab managed Helm installation in a Kubernetes cluster"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/64be8d70ae20928df351e495a3442bb6036bc3e7
milestone: '10.2'
diff --git a/db/docs/clusters_applications_ingress.yml b/db/docs/clusters_applications_ingress.yml
index 7970448369e..b03d63f1cc6 100644
--- a/db/docs/clusters_applications_ingress.yml
+++ b/db/docs/clusters_applications_ingress.yml
@@ -1,7 +1,7 @@
---
table_name: clusters_applications_ingress
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) A GitLab managed Ingress installation in a Kubernetes cluster"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/d8223468ae2ae061020cc26336c51dc93cc75571
milestone: '10.2'
diff --git a/db/docs/clusters_applications_jupyter.yml b/db/docs/clusters_applications_jupyter.yml
index 59a28cd0469..4955e8fe217 100644
--- a/db/docs/clusters_applications_jupyter.yml
+++ b/db/docs/clusters_applications_jupyter.yml
@@ -1,7 +1,7 @@
---
table_name: clusters_applications_jupyter
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) A GitLab managed Jupyter installation in a Kubernetes cluster"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/db9f765852d9fef464e69c0bf47a382f2ab7219d
milestone: '11.0'
diff --git a/db/docs/clusters_applications_knative.yml b/db/docs/clusters_applications_knative.yml
index fca2493cdcc..5cad3c342b0 100644
--- a/db/docs/clusters_applications_knative.yml
+++ b/db/docs/clusters_applications_knative.yml
@@ -1,7 +1,7 @@
---
table_name: clusters_applications_knative
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) A GitLab managed Knative installation in a Kubernetes cluster"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/b5155b90ee233e2824c168fbb06b3ce5d3aeb194
milestone: '11.5'
diff --git a/db/docs/clusters_applications_prometheus.yml b/db/docs/clusters_applications_prometheus.yml
index 3c36d953726..f80b676ae4a 100644
--- a/db/docs/clusters_applications_prometheus.yml
+++ b/db/docs/clusters_applications_prometheus.yml
@@ -1,7 +1,7 @@
---
table_name: clusters_applications_prometheus
feature_categories:
-- kubernetes_management
+- deployment_management
description: Information about installed instance of Prometheus in the cluster
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/0d4548026f3060ca0a8f7aa8d8fc89838bc66130
milestone: '10.4'
diff --git a/db/docs/clusters_applications_runners.yml b/db/docs/clusters_applications_runners.yml
index 4e1e07db30d..8844c6647cd 100644
--- a/db/docs/clusters_applications_runners.yml
+++ b/db/docs/clusters_applications_runners.yml
@@ -1,7 +1,7 @@
---
table_name: clusters_applications_runners
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) A GitLab managed Runner installation in a Kubernetes cluster"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/c607008ee55e35465e04a938a341f2f24cb6761f
milestone: '10.6'
diff --git a/db/docs/clusters_kubernetes_namespaces.yml b/db/docs/clusters_kubernetes_namespaces.yml
index 3572cfa4f2c..1c272eea497 100644
--- a/db/docs/clusters_kubernetes_namespaces.yml
+++ b/db/docs/clusters_kubernetes_namespaces.yml
@@ -3,7 +3,7 @@ table_name: clusters_kubernetes_namespaces
classes:
- Clusters::KubernetesNamespace
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) A Kubernetes namespace in a GitLab managed Kubernetes cluster"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/e3ca493876ab71ed29817a0af436fc563f564bbe
milestone: '11.5'
diff --git a/db/docs/deployment_clusters.yml b/db/docs/deployment_clusters.yml
index eea538a83d2..011c5252593 100644
--- a/db/docs/deployment_clusters.yml
+++ b/db/docs/deployment_clusters.yml
@@ -3,7 +3,7 @@ table_name: deployment_clusters
classes:
- DeploymentCluster
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) Join table between `deployments` and `clusters`"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24235
milestone: '12.8'
diff --git a/db/docs/serverless_domain_cluster.yml b/db/docs/serverless_domain_cluster.yml
index 72b231171ba..f035c992d37 100644
--- a/db/docs/serverless_domain_cluster.yml
+++ b/db/docs/serverless_domain_cluster.yml
@@ -1,7 +1,7 @@
---
table_name: serverless_domain_cluster
feature_categories:
-- kubernetes_management
+- deployment_management
description: "(Deprecated) A custom domain for a GitLab managed Knative installation"
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/19835
milestone: '12.6'
diff --git a/db/post_migrate/20230403221928_resync_scan_result_policies_for_namespaces.rb b/db/post_migrate/20230403221928_resync_scan_result_policies_for_namespaces.rb
new file mode 100644
index 00000000000..34ab8ea3873
--- /dev/null
+++ b/db/post_migrate/20230403221928_resync_scan_result_policies_for_namespaces.rb
@@ -0,0 +1,77 @@
+# frozen_string_literal: true
+
+class ResyncScanResultPoliciesForNamespaces < Gitlab::Database::Migration[2.1]
+ disable_ddl_transaction!
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ BATCH_SIZE = 50
+
+ class Group < MigrationRecord
+ self.inheritance_column = :_type_disabled
+ self.table_name = 'namespaces'
+
+ def self.as_ids
+ select(Arel.sql('namespaces.traversal_ids[array_length(namespaces.traversal_ids, 1)]').as('id'))
+ end
+
+ def self_and_descendant_ids
+ self.class.where("traversal_ids @> ('{?}')", id).as_ids
+ end
+ end
+
+ class Project < MigrationRecord
+ self.table_name = 'projects'
+ end
+
+ class OrchestrationPolicyConfiguration < MigrationRecord
+ include EachBatch
+ self.table_name = 'security_orchestration_policy_configurations'
+ end
+
+ def up
+ return unless Gitlab.ee?
+ return unless process_scan_result_policy_worker
+
+ OrchestrationPolicyConfiguration
+ .where.not(namespace_id: nil)
+ .each_batch(column: :namespace_id, of: BATCH_SIZE) do |policy_configurations|
+ policy_configurations.each do |policy_configuration|
+ for_each_project(policy_configuration) do |project|
+ process_scan_result_policy_worker.perform_async(project.id, policy_configuration.id)
+ end
+ end
+ end
+ end
+
+ def down
+ # no-op
+ end
+
+ private
+
+ def for_each_project(policy_configuration)
+ scope = Project.order(:id)
+ array_scope = Group.find(policy_configuration.namespace_id).self_and_descendant_ids
+ array_mapping_scope = ->(id_expression) do
+ Project.where(Project.arel_table[:namespace_id].eq(id_expression)).select(:id)
+ end
+
+ query_builder = Gitlab::Pagination::Keyset::InOperatorOptimization::QueryBuilder.new(
+ scope: scope,
+ array_scope: array_scope,
+ array_mapping_scope: array_mapping_scope
+ )
+
+ query_builder.execute.limit(BATCH_SIZE).each do |project|
+ yield(project) if block_given?
+ end
+ end
+
+ def process_scan_result_policy_worker
+ unless defined?(@process_scan_result_policy_worker)
+ @process_scan_result_policy_worker = 'Security::ProcessScanResultPolicyWorker'.safe_constantize
+ end
+
+ @process_scan_result_policy_worker
+ end
+end
diff --git a/db/schema_migrations/20230403221928 b/db/schema_migrations/20230403221928
new file mode 100644
index 00000000000..42fd52b4415
--- /dev/null
+++ b/db/schema_migrations/20230403221928
@@ -0,0 +1 @@
+458b23ebbf780535b3eec467bad2edbf3bcca3804569d892572c6e6fac2f2019 \ No newline at end of file
diff --git a/doc/administration/audit_events.md b/doc/administration/audit_events.md
index 53630e915bb..92bd73d1a75 100644
--- a/doc/administration/audit_events.md
+++ b/doc/administration/audit_events.md
@@ -389,6 +389,7 @@ Some events are not tracked in audit events. The following epics and issues prop
- [Group settings and activity](https://gitlab.com/groups/gitlab-org/-/epics/475).
- [Instance-level settings and activity](https://gitlab.com/groups/gitlab-org/-/epics/476).
- [Deployment Approval activity](https://gitlab.com/gitlab-org/gitlab/-/issues/354782).
+- [Approval rules processing by a non GitLab user](https://gitlab.com/gitlab-org/gitlab/-/issues/407384).
If you don't see the event you want in any of the epics, you can either:
diff --git a/doc/integration/jira/connect-app.md b/doc/integration/jira/connect-app.md
index fd527bc184a..fa7d48ba44d 100644
--- a/doc/integration/jira/connect-app.md
+++ b/doc/integration/jira/connect-app.md
@@ -9,25 +9,15 @@ info: To determine the technical writer assigned to the Stage/Group associated w
With the [GitLab for Jira Cloud](https://marketplace.atlassian.com/apps/1221011/gitlab-com-for-jira-cloud) app,
you can integrate GitLab and Jira Cloud.
-Only Jira users with administrator access can install or configure
-the GitLab for Jira Cloud app.
-
-## Install the GitLab for Jira Cloud app **(FREE SAAS)**
-
If you use GitLab.com and Jira Cloud, you can install the GitLab for Jira Cloud app.
-If you do not use both of these environments, use the [Jira DVCS Connector](dvcs/index.md) or
-[install the GitLab for Jira Cloud app manually](#install-the-gitlab-for-jira-cloud-app-manually).
-You should use the GitLab for Jira Cloud app because data is
-synchronized in real time. The DVCS connector updates data only once per hour.
-
-To configure the GitLab for Jira Cloud app, you must have
-at least the Maintainer role in the GitLab.com namespace.
+If you do not use both of these environments, use the [Jira DVCS Connector](dvcs/index.md) instead
+or [install the GitLab for Jira Cloud app manually](#install-the-gitlab-for-jira-cloud-app-manually).
+You should use the GitLab for Jira Cloud app because data is synchronized
+in real time. The Jira DVCS connector updates data only once per hour.
This integration method supports [Smart Commits](dvcs/index.md#smart-commits).
-<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
-For an overview, see
-[Configure the GitLab for Jira Cloud app from the Atlassian Marketplace](https://youtu.be/SwR-g1s1zTo).
+## Install the GitLab for Jira Cloud app **(FREE SAAS)**
Prerequisites:
@@ -36,36 +26,27 @@ Prerequisites:
To install the GitLab for Jira Cloud app:
-1. In Jira, go to **Jira Settings > Apps > Find new apps**, then search for GitLab.
-1. Select **GitLab for Jira Cloud**, then select **Get it now**, or go to the
- [App in the marketplace directly](https://marketplace.atlassian.com/apps/1221011/gitlab-com-for-jira-cloud).
+1. In Jira, select **Jira Settings > Apps > Find new apps**, and search for GitLab.
+1. Select **GitLab for Jira Cloud**, and select **Get it now**.
- ![Install GitLab.com app on Jira Cloud](img/jira_dev_panel_setup_com_1.png)
-1. After installing, to go to the configurations page, select **Get started**.
- This page is always available under **Jira Settings > Apps > Manage apps**.
+ Alternatively, [get the app directly from the Atlassian Marketplace](https://marketplace.atlassian.com/apps/1221011/gitlab-com-for-jira-cloud).
- ![Start GitLab.com app configuration on Jira Cloud](img/jira_dev_panel_setup_com_2.png)
-1. To add namespaces, ensure you're signed in to GitLab.com
- as a user with at least the Maintainer role.
-
- ![Sign in to GitLab.com in GitLab for Jira Cloud app](img/jira_dev_panel_setup_com_3_v13_9.png)
+1. To go to the configurations page, select **Get started**.
+ You can always access this page in **Jira Settings > Apps > Manage apps**.
1. To open the list of available namespaces, select **Add namespace**.
+1. To link to a namespace, select **Link**.
-1. Identify the namespace you want to link, and select **Link**.
-
- ![Link namespace in GitLab for Jira Cloud app](img/jira_dev_panel_setup_com_4_v13_9.png)
-
-NOTE:
-The GitLab.com user only needs access when adding a new namespace. For syncing with
-Jira, we do not depend on the user's token.
+<i class="fa fa-youtube-play youtube" aria-hidden="true"></i>
+For an overview, see
+[Configure the GitLab for Jira Cloud app from the Atlassian Marketplace](https://youtu.be/SwR-g1s1zTo).
After a namespace is added:
-- All future commits, branches, and merge requests of all projects under that namespace
+- All future commits, branches, and merge requests of all projects in that namespace
are synced to Jira.
-- In GitLab 13.8 and later, past merge request data is synced to Jira.
+- In GitLab 13.8 and later, existing merge request data is synced to Jira.
-For more information about syncing past branch and commit data, see [issue 263240](https://gitlab.com/gitlab-org/gitlab/-/issues/263240).
+For more information about syncing existing branch and commit data, see [issue 263240](https://gitlab.com/gitlab-org/gitlab/-/issues/263240).
## Update the GitLab for Jira Cloud app
@@ -152,13 +133,6 @@ To link your self-managed instance to the GitLab for Jira Cloud app:
If your GitLab instance is self-managed and you don't want to use the official marketplace listing,
you can install the app manually.
-### Prerequisites
-
-- The instance must be publicly available.
-- You must set up [OAuth authentication](#set-up-oauth-authentication-for-self-managed-instances).
-
-### Set up your Jira app
-
Each Jira Cloud application must be installed from a single location. Jira fetches
a [manifest file](https://developer.atlassian.com/cloud/jira/platform/connect-app-descriptor/)
from the location you provide. The manifest file describes the application to the system. To support
@@ -167,7 +141,12 @@ self-managed GitLab instances with Jira Cloud, you can do one of the following:
- [Install the application in development mode](#install-the-application-in-development-mode).
- [Create a Marketplace listing](#create-a-marketplace-listing).
-#### Install the application in development mode
+### Prerequisites
+
+- The instance must be publicly available.
+- You must set up [OAuth authentication](#set-up-oauth-authentication-for-self-managed-instances).
+
+### Install the application in development mode
See [prerequisites](#prerequisites-1).
@@ -178,21 +157,14 @@ from outside the Marketplace:
1. Place your Jira instance into
[development mode](https://developer.atlassian.com/cloud/jira/platform/getting-started-with-connect/#step-2--enable-development-mode).
1. Sign in to your GitLab application as a user with administrator access.
-1. Install the GitLab application from your Jira instance, as
- described in the [Atlassian developer guides](https://developer.atlassian.com/cloud/jira/platform/getting-started-with-connect/#step-3--install-and-test-your-app):
+1. Install the GitLab application from your Jira instance as
+ described in the [Atlassian developer guide](https://developer.atlassian.com/cloud/jira/platform/getting-started-with-connect/#step-3--install-and-test-your-app):
1. In your Jira instance, go to **Apps > Manage Apps** and select **Upload app**:
-
- ![Button labeled "upload app"](img/jira-upload-app_v13_11.png)
-
- 1. For **App descriptor URL**, provide the full URL to your manifest file, based
+ 1. For **App descriptor URL**, provide the full URL to your manifest file based
on your instance configuration. By default, your manifest file is located at `/-/jira_connect/app_descriptor.json`. For example, if your GitLab self-managed instance domain is `app.pet-store.cloud`, your manifest file is located at `https://app.pet-store.cloud/-/jira_connect/app_descriptor.json`.
1. Select **Upload**. Jira fetches the content of your `app_descriptor` file and installs
it.
- 1. If the upload is successful, Jira displays a modal panel: **Installed and ready to go!**
- To configure the integration, select **Get started**.
-
- ![Success modal](img/jira-upload-app-success_v13_11.png)
-
+ 1. To configure the integration, select **Get started**.
1. Disable [development mode](https://developer.atlassian.com/cloud/jira/platform/getting-started-with-connect/#step-2--enable-development-mode) on your Jira instance.
The **GitLab for Jira Cloud** app now displays under **Manage apps**. You can also
@@ -202,7 +174,7 @@ NOTE:
If a GitLab update makes changes to the application descriptor, you must uninstall,
then reinstall the application.
-#### Create a Marketplace listing
+### Create a Marketplace listing
If you don't want to use development mode on your Jira instance, you can create
your own Marketplace listing. This way, your application
diff --git a/doc/integration/jira/img/jira-upload-app-success_v13_11.png b/doc/integration/jira/img/jira-upload-app-success_v13_11.png
deleted file mode 100644
index c0d4c9744b6..00000000000
--- a/doc/integration/jira/img/jira-upload-app-success_v13_11.png
+++ /dev/null
Binary files differ
diff --git a/doc/integration/jira/img/jira-upload-app_v13_11.png b/doc/integration/jira/img/jira-upload-app_v13_11.png
deleted file mode 100644
index 88d1573f778..00000000000
--- a/doc/integration/jira/img/jira-upload-app_v13_11.png
+++ /dev/null
Binary files differ
diff --git a/doc/integration/jira/img/jira_dev_panel_setup_com_1.png b/doc/integration/jira/img/jira_dev_panel_setup_com_1.png
deleted file mode 100644
index 18f0d5da043..00000000000
--- a/doc/integration/jira/img/jira_dev_panel_setup_com_1.png
+++ /dev/null
Binary files differ
diff --git a/doc/integration/jira/img/jira_dev_panel_setup_com_2.png b/doc/integration/jira/img/jira_dev_panel_setup_com_2.png
deleted file mode 100644
index 31dc13e1271..00000000000
--- a/doc/integration/jira/img/jira_dev_panel_setup_com_2.png
+++ /dev/null
Binary files differ
diff --git a/doc/integration/jira/img/jira_dev_panel_setup_com_3_v13_9.png b/doc/integration/jira/img/jira_dev_panel_setup_com_3_v13_9.png
deleted file mode 100644
index fe791637d31..00000000000
--- a/doc/integration/jira/img/jira_dev_panel_setup_com_3_v13_9.png
+++ /dev/null
Binary files differ
diff --git a/doc/integration/jira/img/jira_dev_panel_setup_com_4_v13_9.png b/doc/integration/jira/img/jira_dev_panel_setup_com_4_v13_9.png
deleted file mode 100644
index 08787f12b67..00000000000
--- a/doc/integration/jira/img/jira_dev_panel_setup_com_4_v13_9.png
+++ /dev/null
Binary files differ
diff --git a/doc/user/analytics/value_streams_dashboard.md b/doc/user/analytics/value_streams_dashboard.md
index 7d1b3f88826..a8c0ad0a7aa 100644
--- a/doc/user/analytics/value_streams_dashboard.md
+++ b/doc/user/analytics/value_streams_dashboard.md
@@ -19,22 +19,6 @@ The Value Streams Dashboard is a customizable dashboard that enables decision-ma
This page is a work in progress, and we're updating the information as we add more features.
For more information, see the [Value Stream Management category direction page](https://about.gitlab.com/direction/plan/value_stream_management/).
-## View the value streams dashboard
-
-Prerequisite:
-
-- To view the value streams dashboard for a group, you must have at least the Reporter role for the group.
-
-To view the value streams dashboard:
-
-1. On the top bar, select **Main menu**, and:
- - For a project, select **Projects** and find your project.
- - For a group, select **Groups** and find your group.
-1. On the left sidebar, select **Analytics > Value stream**.
-1. Below the **Filter results** text box, in the **Key metrics** row, select **Value Streams Dashboard | DORA**.
-1. Optional. To open the new page, append this path `/analytics/dashboards/value_streams_dashboard` to the group URL
-(for example, `https://gitlab.com/groups/gitlab-org/-/analytics/dashboards/value_streams_dashboard`).
-
## Initial use case
Our initial use case is focused on providing the ability to compare software delivery metrics.
@@ -65,6 +49,22 @@ that are the largest value contributors, overperforming, or underperforming.
You can also drill down the metrics for further analysis.
When you hover over a metric, a tooltip displays an explanation of the metric and a link to the related documentation page.
+## View the value streams dashboard
+
+Prerequisite:
+
+- To view the value streams dashboard for a group, you must have at least the Reporter role for the group.
+
+To view the value streams dashboard:
+
+1. On the top bar, select **Main menu**, and:
+ - For a project, select **Projects** and find your project.
+ - For a group, select **Groups** and find your group.
+1. On the left sidebar, select **Analytics > Value stream**.
+1. Below the **Filter results** text box, in the **Key metrics** row, select **Value Streams Dashboard | DORA**.
+1. Optional. To open the new page, append this path `/analytics/dashboards/value_streams_dashboard` to the group URL
+(for example, `https://gitlab.com/groups/gitlab-org/-/analytics/dashboards/value_streams_dashboard`).
+
## Customize the dashboard panels
You can customize the Value Streams Dashboard and configure what subgroups and projects to include in the page.
diff --git a/lib/api/admin/instance_clusters.rb b/lib/api/admin/instance_clusters.rb
index f848103d9a0..bca991542ed 100644
--- a/lib/api/admin/instance_clusters.rb
+++ b/lib/api/admin/instance_clusters.rb
@@ -5,7 +5,7 @@ module API
class InstanceClusters < ::API::Base
include PaginationParams
- feature_category :kubernetes_management
+ feature_category :deployment_management
urgency :low
before do
diff --git a/lib/api/ci/jobs.rb b/lib/api/ci/jobs.rb
index 2e377f41b66..b4b03664916 100644
--- a/lib/api/ci/jobs.rb
+++ b/lib/api/ci/jobs.rb
@@ -250,7 +250,7 @@ module API
]
end
route_setting :authentication, job_token_allowed: true
- get '/allowed_agents', urgency: :low, feature_category: :kubernetes_management do
+ get '/allowed_agents', urgency: :low, feature_category: :deployment_management do
validate_current_authenticated_job
status 200
diff --git a/lib/api/clusters/agent_tokens.rb b/lib/api/clusters/agent_tokens.rb
index f0eb7ce2cd6..50bb32fbeaa 100644
--- a/lib/api/clusters/agent_tokens.rb
+++ b/lib/api/clusters/agent_tokens.rb
@@ -7,7 +7,7 @@ module API
before { authenticate! }
- feature_category :kubernetes_management
+ feature_category :deployment_management
params do
requires :id, types: [String, Integer], desc: 'The ID or URL-encoded path of the project'
diff --git a/lib/api/clusters/agents.rb b/lib/api/clusters/agents.rb
index c5ddecc8e93..02469fbad21 100644
--- a/lib/api/clusters/agents.rb
+++ b/lib/api/clusters/agents.rb
@@ -7,7 +7,7 @@ module API
before { authenticate! }
- feature_category :kubernetes_management
+ feature_category :deployment_management
urgency :low
params do
diff --git a/lib/api/group_clusters.rb b/lib/api/group_clusters.rb
index de5ca0f86ae..9cc7d0b8bf8 100644
--- a/lib/api/group_clusters.rb
+++ b/lib/api/group_clusters.rb
@@ -9,7 +9,7 @@ module API
ensure_feature_enabled!
end
- feature_category :kubernetes_management
+ feature_category :deployment_management
urgency :low
params do
diff --git a/lib/api/internal/kubernetes.rb b/lib/api/internal/kubernetes.rb
index 3bf36239af8..22a26a725e9 100644
--- a/lib/api/internal/kubernetes.rb
+++ b/lib/api/internal/kubernetes.rb
@@ -85,7 +85,7 @@ module API
detail 'Retrieves agent info for the given token'
end
route_setting :authentication, cluster_agent_token_allowed: true
- get '/agent_info', feature_category: :kubernetes_management, urgency: :low do
+ get '/agent_info', feature_category: :deployment_management, urgency: :low do
project = agent.project
status 200
@@ -103,7 +103,7 @@ module API
detail 'Retrieves project info (if authorized)'
end
route_setting :authentication, cluster_agent_token_allowed: true
- get '/project_info', feature_category: :kubernetes_management, urgency: :low do
+ get '/project_info', feature_category: :deployment_management, urgency: :low do
project = find_project(params[:id])
not_found! unless agent_has_access_to_project?(project)
@@ -126,7 +126,7 @@ module API
requires :agent_id, type: Integer, desc: 'ID of the configured Agent'
requires :agent_config, type: JSON, desc: 'Configuration for the Agent'
end
- post '/', feature_category: :kubernetes_management, urgency: :low do
+ post '/', feature_category: :deployment_management, urgency: :low do
agent = ::Clusters::Agent.find(params[:agent_id])
::Clusters::Agents::Authorizations::CiAccess::RefreshService.new(agent, config: params[:agent_config]).execute
@@ -146,7 +146,7 @@ module API
requires :csrf_token, type: String, allow_blank: false, desc: 'CSRF token that must be checked when access_type is "session_cookie", to ensure the request originates from a GitLab browsing session.'
end
end
- post '/', feature_category: :kubernetes_management do
+ post '/', feature_category: :deployment_management do
# Load session
public_session_id_string =
begin
@@ -193,7 +193,7 @@ module API
optional :agent_users_using_ci_tunnel, type: Array[Integer], desc: 'An array of user ids that have interacted with CI Tunnel'
end
end
- post '/', feature_category: :kubernetes_management do
+ post '/', feature_category: :deployment_management do
increment_count_events
increment_unique_events
diff --git a/lib/api/project_clusters.rb b/lib/api/project_clusters.rb
index 21f1ee69613..8e5b089434a 100644
--- a/lib/api/project_clusters.rb
+++ b/lib/api/project_clusters.rb
@@ -9,7 +9,7 @@ module API
ensure_feature_enabled!
end
- feature_category :kubernetes_management
+ feature_category :deployment_management
urgency :low
params do
diff --git a/lib/gitlab/ci/status/composite.rb b/lib/gitlab/ci/status/composite.rb
index 8e55b414364..1ba78b357e5 100644
--- a/lib/gitlab/ci/status/composite.rb
+++ b/lib/gitlab/ci/status/composite.rb
@@ -45,11 +45,6 @@ module Gitlab
if @dag && any_skipped_or_ignored?
# The DAG job is skipped if one of the needs does not run at all.
'skipped'
- elsif ::Feature.disabled?(:ci_simplify_dag_status_calculation_for_processing, @project) &&
- @dag &&
- !only_of?(:success, :failed, :canceled, :skipped, :success_with_warnings)
- # DAG is blocked from executing if a dependent is not "complete"
- 'pending'
elsif only_of?(:skipped, :ignored)
'skipped'
elsif only_of?(:success, :skipped, :success_with_warnings, :ignored)
diff --git a/lib/gitlab/resource_events/assignment_event_recorder.rb b/lib/gitlab/resource_events/assignment_event_recorder.rb
new file mode 100644
index 00000000000..94bd05a17ba
--- /dev/null
+++ b/lib/gitlab/resource_events/assignment_event_recorder.rb
@@ -0,0 +1,61 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module ResourceEvents
+ class AssignmentEventRecorder
+ BATCH_SIZE = 100
+
+ def initialize(parent:, old_assignees:)
+ @parent = parent
+ @old_assignees = old_assignees
+ end
+
+ def record
+ return if Feature.disabled?(:record_issue_and_mr_assignee_events, parent.project)
+
+ case parent
+ when Issue
+ record_for_parent(
+ ::ResourceEvents::IssueAssignmentEvent,
+ :issue_id,
+ parent,
+ old_assignees
+ )
+ when MergeRequest
+ record_for_parent(
+ ::ResourceEvents::MergeRequestAssignmentEvent,
+ :merge_request_id,
+ parent,
+ old_assignees
+ )
+ end
+ end
+
+ private
+
+ attr_reader :parent, :old_assignees
+
+ def record_for_parent(resource_klass, foreign_key, parent, old_assignees)
+ removed_events = (old_assignees - parent.assignees).map do |unassigned_user|
+ {
+ foreign_key => parent.id,
+ user_id: unassigned_user.id,
+ action: :remove
+ }
+ end.to_set
+
+ added_events = (parent.assignees.to_a - old_assignees).map do |added_user|
+ {
+ foreign_key => parent.id,
+ user_id: added_user.id,
+ action: :add
+ }
+ end.to_set
+
+ (removed_events + added_events).each_slice(BATCH_SIZE) do |events|
+ resource_klass.insert_all(events)
+ end
+ end
+ end
+ end
+end
diff --git a/lib/tasks/gitlab/tw/codeowners.rake b/lib/tasks/gitlab/tw/codeowners.rake
index 77e833d2058..4d43dd2dd85 100644
--- a/lib/tasks/gitlab/tw/codeowners.rake
+++ b/lib/tasks/gitlab/tw/codeowners.rake
@@ -71,7 +71,7 @@ namespace :tw do
CodeOwnerRule.new('Respond', '@msedlakjakubowski'),
CodeOwnerRule.new('Runner', '@fneill'),
CodeOwnerRule.new('Runner SaaS', '@fneill'),
- CodeOwnerRule.new('Security Policies', '@dianalogan'),
+ CodeOwnerRule.new('Security Policies', '@rdickenson'),
CodeOwnerRule.new('Source Code', '@aqualls'),
CodeOwnerRule.new('Static Analysis', '@rdickenson'),
CodeOwnerRule.new('Style Guide', '@sselhorn'),
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 270987706e6..7204dddcb1b 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -859,9 +859,6 @@ msgstr ""
msgid "%{linkStart} Learn more%{linkEnd}."
msgstr ""
-msgid "%{linkStart}Approval settings%{linkEnd} prevent approvals by its eligible approvers."
-msgstr ""
-
msgid "%{listToShow}, and %{awardsListLength} more"
msgstr ""
@@ -5496,9 +5493,39 @@ msgstr ""
msgid "Approvals required"
msgstr ""
+msgid "Approvals|%{count} of %{total}"
+msgstr ""
+
+msgid "Approvals|Action required"
+msgstr ""
+
+msgid "Approvals|Auto approved"
+msgstr ""
+
+msgid "Approvals|It looks like there was a conflict between the rules for approving this Merge Request and the users who were eligible to approve it. As a result, the system has automatically approved it to keep things moving."
+msgstr ""
+
+msgid "Approvals|Rule automatically approved"
+msgstr ""
+
+msgid "Approvals|Rule cannot be approved"
+msgstr ""
+
msgid "Approvals|Section: %section"
msgstr ""
+msgid "Approvals|The number of people who need to approve this is more than those who are allowed to. Please ask the project owner to update %{securityPolicy}."
+msgstr ""
+
+msgid "Approvals|Verify the number of %{linkStart}eligible security approvers%{linkEnd} matches the required approvers for the security policy."
+msgstr ""
+
+msgid "Approvals|Verify your %{eligibleApproverLinkStart}eligible approvers%{eligibleApproverLinkEnd} and %{approvalSettingsLinkStart}approval settings%{approvalSettingsLinkEnd} agree with each other."
+msgstr ""
+
+msgid "Approvals|Verify your %{linkStart}approval settings%{linkEnd} do not conflict with this rule."
+msgstr ""
+
msgid "Approve"
msgstr ""
@@ -23734,9 +23761,6 @@ msgstr ""
msgid "Introducing Your DevOps Reports"
msgstr ""
-msgid "Invalid"
-msgstr ""
-
msgid "Invalid Insights config file detected"
msgstr ""
@@ -23800,9 +23824,6 @@ msgstr ""
msgid "Invalid repository path"
msgstr ""
-msgid "Invalid rules are automatically approved to unblock the merge request."
-msgstr ""
-
msgid "Invalid server response"
msgstr ""
@@ -24435,9 +24456,6 @@ msgstr ""
msgid "Issue|Title"
msgstr ""
-msgid "It doesn't have any %{linkStart}eligible approvers%{linkEnd}."
-msgstr ""
-
msgid "It looks like you're attempting to activate your subscription. Use %{a_start}the Subscription page%{a_end} instead."
msgstr ""
@@ -25834,9 +25852,6 @@ msgstr ""
msgid "LearnGitLab|Route code reviews to the right reviewers, every time."
msgstr ""
-msgid "LearnGitLab|Run a Security scan using CI/CD"
-msgstr ""
-
msgid "LearnGitLab|Save time by automating your integration and deployment tasks."
msgstr ""
@@ -25846,9 +25861,6 @@ msgstr ""
msgid "LearnGitLab|Scan dependencies for vulnerabilities"
msgstr ""
-msgid "LearnGitLab|Scan your code to uncover vulnerabilities before deploying."
-msgstr ""
-
msgid "LearnGitLab|Set up CI/CD"
msgstr ""
@@ -45641,9 +45653,6 @@ msgstr ""
msgid "This repository was last checked %{last_check_timestamp}. The check passed."
msgstr ""
-msgid "This rule is invalid because no one can approve it for one or more of these reasons:"
-msgstr ""
-
msgid "This runner will only run on pipelines triggered on protected branches"
msgstr ""
@@ -49865,9 +49874,6 @@ msgstr ""
msgid "Why can't I approve?"
msgstr ""
-msgid "Why is this rule invalid?"
-msgstr ""
-
msgid "Wiki"
msgstr ""
@@ -52916,6 +52922,12 @@ msgstr ""
msgid "mrWidget|%{boldStart}Ready to be merged automatically.%{boldEnd} Ask someone with write access to this repository to merge this request."
msgstr ""
+msgid "mrWidget|%{dangerStart}%{rules} rule can't be approved%{dangerEnd}"
+msgstr ""
+
+msgid "mrWidget|%{dangerStart}%{rules} rules can't be approved%{dangerEnd}"
+msgstr ""
+
msgid "mrWidget|%{mergeError}."
msgstr ""
@@ -52931,10 +52943,10 @@ msgstr ""
msgid "mrWidget|%{metricsLinkStart} Memory %{metricsLinkEnd} usage is %{emphasisStart} unchanged %{emphasisEnd} at %{memoryFrom}MB"
msgstr ""
-msgid "mrWidget|%{rules} invalid rule has been approved automatically, as no one can approve it."
+msgid "mrWidget|%{rules} invalid rule has been approved automatically"
msgstr ""
-msgid "mrWidget|%{rules} invalid rules have been approved automatically, as no one can approve them."
+msgid "mrWidget|%{rules} invalid rules have been approved automatically"
msgstr ""
msgid "mrWidget|A merge train is a queued list of merge requests waiting to be merged into the target branch. The changes in each merge request are combined with the changes in earlier merge requests and tested before merge."
diff --git a/qa/Gemfile b/qa/Gemfile
index 4f138efd06c..abb654b4a96 100644
--- a/qa/Gemfile
+++ b/qa/Gemfile
@@ -2,7 +2,7 @@
source 'https://rubygems.org'
-gem 'gitlab-qa', '~> 10', '>= 10.2.1', require: 'gitlab/qa'
+gem 'gitlab-qa', '~> 10', '>= 10.3.0', require: 'gitlab/qa'
gem 'activesupport', '~> 6.1.7.2' # This should stay in sync with the root's Gemfile
gem 'allure-rspec', '~> 2.20.0'
gem 'capybara', '~> 3.39.0'
diff --git a/qa/Gemfile.lock b/qa/Gemfile.lock
index ce37fee0ad4..e86a5526fc8 100644
--- a/qa/Gemfile.lock
+++ b/qa/Gemfile.lock
@@ -102,7 +102,7 @@ GEM
gitlab (4.18.0)
httparty (~> 0.18)
terminal-table (>= 1.5.1)
- gitlab-qa (10.2.1)
+ gitlab-qa (10.3.0)
activesupport (~> 6.1)
gitlab (~> 4.18.0)
http (~> 5.0)
@@ -318,7 +318,7 @@ DEPENDENCIES
faraday-retry (~> 2.1)
fog-core (= 2.1.0)
fog-google (~> 1.19)
- gitlab-qa (~> 10, >= 10.2.1)
+ gitlab-qa (~> 10, >= 10.3.0)
influxdb-client (~> 2.9)
knapsack (~> 4.0)
nokogiri (~> 1.14, >= 1.14.3)
diff --git a/qa/qa/specs/features/browser_ui/3_create/pages/new_static_page_spec.rb b/qa/qa/specs/features/browser_ui/3_create/pages/new_static_page_spec.rb
index ed4bd7c6980..7dc9e95bcd2 100644
--- a/qa/qa/specs/features/browser_ui/3_create/pages/new_static_page_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/pages/new_static_page_spec.rb
@@ -7,8 +7,7 @@ module QA
except: { job: 'review-qa-*' },
quarantine: {
issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/383215',
- type: :test_environment,
- only: { subdomain: 'staging-ref' }
+ type: :flaky
},
feature_flag: { name: 'show_pages_in_deployments_menu' } do
# TODO: Convert back to :smoke once proved to be stable. Related issue: https://gitlab.com/gitlab-org/gitlab/-/issues/300906
diff --git a/spec/controllers/admin/clusters_controller_spec.rb b/spec/controllers/admin/clusters_controller_spec.rb
index cb310c7b7f9..a47bac4d2ef 100644
--- a/spec/controllers/admin/clusters_controller_spec.rb
+++ b/spec/controllers/admin/clusters_controller_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Admin::ClustersController, feature_category: :kubernetes_management do
+RSpec.describe Admin::ClustersController, feature_category: :deployment_management do
include AccessMatchersForController
include GoogleApi::CloudPlatformHelpers
diff --git a/spec/controllers/concerns/kas_cookie_spec.rb b/spec/controllers/concerns/kas_cookie_spec.rb
index b1a951c663b..d80df106cfd 100644
--- a/spec/controllers/concerns/kas_cookie_spec.rb
+++ b/spec/controllers/concerns/kas_cookie_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe KasCookie, feature_category: :kubernetes_management do
+RSpec.describe KasCookie, feature_category: :deployment_management do
describe '#set_kas_cookie' do
controller(ApplicationController) do
include KasCookie
diff --git a/spec/controllers/groups/clusters_controller_spec.rb b/spec/controllers/groups/clusters_controller_spec.rb
index c020aeedf1c..410579c0bed 100644
--- a/spec/controllers/groups/clusters_controller_spec.rb
+++ b/spec/controllers/groups/clusters_controller_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Groups::ClustersController, feature_category: :kubernetes_management do
+RSpec.describe Groups::ClustersController, feature_category: :deployment_management do
include AccessMatchersForController
include GoogleApi::CloudPlatformHelpers
diff --git a/spec/controllers/projects/blame_controller_spec.rb b/spec/controllers/projects/blame_controller_spec.rb
index f322c78b5e3..06c82bcb404 100644
--- a/spec/controllers/projects/blame_controller_spec.rb
+++ b/spec/controllers/projects/blame_controller_spec.rb
@@ -2,9 +2,9 @@
require 'spec_helper'
-RSpec.describe Projects::BlameController do
- let(:project) { create(:project, :repository) }
- let(:user) { create(:user) }
+RSpec.describe Projects::BlameController, feature_category: :source_code_management do
+ let_it_be(:project) { create(:project, :repository) }
+ let_it_be(:user) { create(:user) }
before do
sign_in(user)
@@ -13,20 +13,14 @@ RSpec.describe Projects::BlameController do
controller.instance_variable_set(:@project, project)
end
- describe "GET show" do
- render_views
-
- before do
- get :show, params: { namespace_id: project.namespace, project_id: project, id: id }
- end
-
- context "valid branch, valid file" do
+ shared_examples 'blame_response' do
+ context 'valid branch, valid file' do
let(:id) { 'master/files/ruby/popen.rb' }
it { is_expected.to respond_with(:success) }
end
- context "valid branch, invalid file" do
+ context 'valid branch, invalid file' do
let(:id) { 'master/files/ruby/invalid-path.rb' }
it 'redirects' do
@@ -34,10 +28,30 @@ RSpec.describe Projects::BlameController do
end
end
- context "invalid branch, valid file" do
+ context 'invalid branch, valid file' do
let(:id) { 'invalid-branch/files/ruby/missing_file.rb' }
it { is_expected.to respond_with(:not_found) }
end
end
+
+ describe 'GET show' do
+ render_views
+
+ before do
+ get :show, params: { namespace_id: project.namespace, project_id: project, id: id }
+ end
+
+ it_behaves_like 'blame_response'
+ end
+
+ describe 'GET page' do
+ render_views
+
+ before do
+ get :page, params: { namespace_id: project.namespace, project_id: project, id: id }
+ end
+
+ it_behaves_like 'blame_response'
+ end
end
diff --git a/spec/controllers/projects/clusters_controller_spec.rb b/spec/controllers/projects/clusters_controller_spec.rb
index 236e1845d3f..ea73f62981e 100644
--- a/spec/controllers/projects/clusters_controller_spec.rb
+++ b/spec/controllers/projects/clusters_controller_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Projects::ClustersController, feature_category: :kubernetes_management do
+RSpec.describe Projects::ClustersController, feature_category: :deployment_management do
include AccessMatchersForController
include GoogleApi::CloudPlatformHelpers
include KubernetesHelpers
diff --git a/spec/controllers/projects/pipelines_controller_spec.rb b/spec/controllers/projects/pipelines_controller_spec.rb
index fe528719f26..ff20f95a8aa 100644
--- a/spec/controllers/projects/pipelines_controller_spec.rb
+++ b/spec/controllers/projects/pipelines_controller_spec.rb
@@ -199,22 +199,6 @@ RSpec.describe Projects::PipelinesController, feature_category: :continuous_inte
check_pipeline_response(returned: 6, all: 6)
end
end
-
- context "with lazy_load_pipeline_dropdown_actions feature flag disabled" do
- before do
- stub_feature_flags(lazy_load_pipeline_dropdown_actions: false)
- end
-
- it 'returns manual and scheduled actions' do
- get_pipelines_index_json
-
- expect(response).to have_gitlab_http_status(:ok)
- expect(response).to match_response_schema('pipeline')
-
- expect(json_response.dig('pipelines', 0, 'details')).to include('manual_actions')
- expect(json_response.dig('pipelines', 0, 'details')).to include('scheduled_actions')
- end
- end
end
def get_pipelines_index_html(params = {})
diff --git a/spec/features/clusters/cluster_detail_page_spec.rb b/spec/features/clusters/cluster_detail_page_spec.rb
index e8fb5f4105d..31dec5e38da 100644
--- a/spec/features/clusters/cluster_detail_page_spec.rb
+++ b/spec/features/clusters/cluster_detail_page_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Clusterable > Show page', feature_category: :kubernetes_management do
+RSpec.describe 'Clusterable > Show page', feature_category: :deployment_management do
include KubernetesHelpers
let(:current_user) { create(:user) }
diff --git a/spec/features/clusters/cluster_health_dashboard_spec.rb b/spec/features/clusters/cluster_health_dashboard_spec.rb
index b557f803a99..ebbc184eaef 100644
--- a/spec/features/clusters/cluster_health_dashboard_spec.rb
+++ b/spec/features/clusters/cluster_health_dashboard_spec.rb
@@ -3,7 +3,7 @@
require 'spec_helper'
RSpec.describe 'Cluster Health board', :js, :kubeclient, :use_clean_rails_memory_store_caching, :sidekiq_inline,
-feature_category: :kubernetes_management do
+feature_category: :deployment_management do
include KubernetesHelpers
include PrometheusHelpers
diff --git a/spec/features/clusters/create_agent_spec.rb b/spec/features/clusters/create_agent_spec.rb
index 01902c36e99..93a49151978 100644
--- a/spec/features/clusters/create_agent_spec.rb
+++ b/spec/features/clusters/create_agent_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Cluster agent registration', :js, feature_category: :kubernetes_management do
+RSpec.describe 'Cluster agent registration', :js, feature_category: :deployment_management do
let_it_be(:project) { create(:project, :custom_repo, files: { '.gitlab/agents/example-agent-1/config.yaml' => '' }) }
let_it_be(:current_user) { create(:user, maintainer_projects: [project]) }
let_it_be(:token) { Devise.friendly_token }
diff --git a/spec/features/dashboard/issues_filter_spec.rb b/spec/features/dashboard/issues_filter_spec.rb
index 1a2268a838b..ee1e704c6c4 100644
--- a/spec/features/dashboard/issues_filter_spec.rb
+++ b/spec/features/dashboard/issues_filter_spec.rb
@@ -44,7 +44,7 @@ RSpec.describe 'Dashboard Issues filtering', :js, feature_category: :team_planni
it 'updates atom feed link' do
visit_issues(milestone_title: '', assignee_username: user.username)
- link = find('[data-testid="rss-feed-link"]')
+ link = find_link('Subscribe to RSS feed')
params = CGI.parse(URI.parse(link[:href]).query)
auto_discovery_link = find('link[type="application/atom+xml"]', visible: false)
auto_discovery_params = CGI.parse(URI.parse(auto_discovery_link[:href]).query)
diff --git a/spec/features/groups/issues_spec.rb b/spec/features/groups/issues_spec.rb
index 00c0d4c3ebe..9f6fa146972 100644
--- a/spec/features/groups/issues_spec.rb
+++ b/spec/features/groups/issues_spec.rb
@@ -30,29 +30,15 @@ RSpec.describe 'Group issues page', feature_category: :subgroups do
user_in_group
end
+ it_behaves_like "it has an RSS link with current_user's feed token"
it_behaves_like "an autodiscoverable RSS feed with current_user's feed token"
-
- # Note: The one from rss_shared_example.rb uses a css pseudo-class `:has`
- # which is VERY experimental and only supported in Nokogiri used by Capybara
- # However,`:js` option forces Capybara to use Selenium that doesn't support`:has`
- context "it has an RSS button with current_user's feed token" do
- it "shows the RSS button with current_user's feed token" do
- expect(page).to have_link 'Subscribe to RSS feed', href: /feed_token=#{user.feed_token}/
- end
- end
end
context 'when signed out' do
let(:user) { nil }
+ it_behaves_like "it has an RSS link without a feed token"
it_behaves_like "an autodiscoverable RSS feed without a feed token"
-
- # Note: please see the above
- context "it has an RSS button without a feed token" do
- it "shows the RSS button without a feed token" do
- expect(page).not_to have_link 'Subscribe to RSS feed', href: /feed_token/
- end
- end
end
end
diff --git a/spec/features/issues/rss_spec.rb b/spec/features/issues/rss_spec.rb
index 36dffeded50..75e7cd03a65 100644
--- a/spec/features/issues/rss_spec.rb
+++ b/spec/features/issues/rss_spec.rb
@@ -25,10 +25,7 @@ RSpec.describe 'Project Issues RSS', :js, feature_category: :team_planning do
visit path
end
- it "shows the RSS button with current_user's feed token" do
- expect(page).to have_link 'Subscribe to RSS feed', href: /feed_token=#{user.feed_token}/
- end
-
+ it_behaves_like "it has an RSS link with current_user's feed token"
it_behaves_like "an autodiscoverable RSS feed with current_user's feed token"
end
@@ -37,10 +34,7 @@ RSpec.describe 'Project Issues RSS', :js, feature_category: :team_planning do
visit path
end
- it "shows the RSS button without a feed token" do
- expect(page).not_to have_link 'Subscribe to RSS feed', href: /feed_token/
- end
-
+ it_behaves_like "it has an RSS link without a feed token"
it_behaves_like "an autodiscoverable RSS feed without a feed token"
end
diff --git a/spec/features/projects/clusters/gcp_spec.rb b/spec/features/projects/clusters/gcp_spec.rb
index 114182982e2..f9195904ea3 100644
--- a/spec/features/projects/clusters/gcp_spec.rb
+++ b/spec/features/projects/clusters/gcp_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Gcp Cluster', :js, feature_category: :kubernetes_management do
+RSpec.describe 'Gcp Cluster', :js, feature_category: :deployment_management do
include GoogleApi::CloudPlatformHelpers
let(:project) { create(:project) }
diff --git a/spec/features/projects/clusters/user_spec.rb b/spec/features/projects/clusters/user_spec.rb
index 34fc0a76c7f..eb2601bb85f 100644
--- a/spec/features/projects/clusters/user_spec.rb
+++ b/spec/features/projects/clusters/user_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'User Cluster', :js, feature_category: :kubernetes_management do
+RSpec.describe 'User Cluster', :js, feature_category: :deployment_management do
include GoogleApi::CloudPlatformHelpers
let(:project) { create(:project) }
diff --git a/spec/finders/clusters/agents/authorizations/ci_access/finder_spec.rb b/spec/finders/clusters/agents/authorizations/ci_access/finder_spec.rb
index c311b19139f..0d010729d5c 100644
--- a/spec/finders/clusters/agents/authorizations/ci_access/finder_spec.rb
+++ b/spec/finders/clusters/agents/authorizations/ci_access/finder_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Agents::Authorizations::CiAccess::Finder, feature_category: :kubernetes_management do
+RSpec.describe Clusters::Agents::Authorizations::CiAccess::Finder, feature_category: :deployment_management do
describe '#execute' do
let_it_be(:top_level_group) { create(:group) }
let_it_be(:subgroup1) { create(:group, parent: top_level_group) }
diff --git a/spec/frontend/__helpers__/wait_for_text.js b/spec/frontend/__helpers__/wait_for_text.js
index 6bed8a90a98..991adc5d6c0 100644
--- a/spec/frontend/__helpers__/wait_for_text.js
+++ b/spec/frontend/__helpers__/wait_for_text.js
@@ -1,3 +1,3 @@
import { findByText } from '@testing-library/dom';
-export const waitForText = async (text, container = document) => findByText(container, text);
+export const waitForText = (text, container = document) => findByText(container, text);
diff --git a/spec/frontend/ci/ci_variable_list/components/ci_variable_shared_spec.js b/spec/frontend/ci/ci_variable_list/components/ci_variable_shared_spec.js
index 06b3ec4aab8..a25d325f7a1 100644
--- a/spec/frontend/ci/ci_variable_list/components/ci_variable_shared_spec.js
+++ b/spec/frontend/ci/ci_variable_list/components/ci_variable_shared_spec.js
@@ -626,7 +626,7 @@ describe('Ci Variable Shared Component', () => {
}
});
- it('report custom validator error on wrong data', async () => {
+ it('report custom validator error on wrong data', () => {
expect(() =>
assertProps(
ciVariableShared,
diff --git a/spec/frontend/ci/runner/components/registration/registration_instructions_spec.js b/spec/frontend/ci/runner/components/registration/registration_instructions_spec.js
index 629272c0bf0..8c196d7b5e3 100644
--- a/spec/frontend/ci/runner/components/registration/registration_instructions_spec.js
+++ b/spec/frontend/ci/runner/components/registration/registration_instructions_spec.js
@@ -280,7 +280,7 @@ describe('RegistrationInstructions', () => {
});
describe('when the page is closing', () => {
- it('warns the user against closing', async () => {
+ it('warns the user against closing', () => {
const { event, preventDefault, returnValueSetter } = mockBeforeunload();
expect(preventDefault).not.toHaveBeenCalled();
diff --git a/spec/frontend/design_management/components/design_notes/design_reply_form_spec.js b/spec/frontend/design_management/components/design_notes/design_reply_form_spec.js
index c8fa02cb6aa..f08efc0c685 100644
--- a/spec/frontend/design_management/components/design_notes/design_reply_form_spec.js
+++ b/spec/frontend/design_management/components/design_notes/design_reply_form_spec.js
@@ -124,7 +124,7 @@ describe('Design reply form component', () => {
${'gid://gitlab/DiffDiscussion/123'} | ${123}
`(
'initializes autosave support on discussion with proper key',
- async ({ discussionId, shortDiscussionId }) => {
+ ({ discussionId, shortDiscussionId }) => {
createComponent({ props: { discussionId } });
expect(Autosave).toHaveBeenCalledWith(expect.any(Element), [
@@ -136,7 +136,7 @@ describe('Design reply form component', () => {
);
describe('when form has no text', () => {
- beforeEach(async () => {
+ beforeEach(() => {
createComponent();
});
@@ -148,7 +148,7 @@ describe('Design reply form component', () => {
key | keyData
${'ctrl'} | ${ctrlKey}
${'meta'} | ${metaKey}
- `('does not perform mutation on textarea $key+enter keydown', async ({ keyData }) => {
+ `('does not perform mutation on textarea $key+enter keydown', ({ keyData }) => {
findTextarea().trigger('keydown.enter', keyData);
expect(mockMutationHandler).not.toHaveBeenCalled();
@@ -266,7 +266,7 @@ describe('Design reply form component', () => {
expect(wrapper.emitted('cancel-form')).toHaveLength(1);
});
- it('opens confirmation modal on Escape key when text has changed', async () => {
+ it('opens confirmation modal on Escape key when text has changed', () => {
createComponent();
findTextarea().setValue(mockComment);
diff --git a/spec/frontend/diffs/components/diff_view_spec.js b/spec/frontend/diffs/components/diff_view_spec.js
index 9bff6bd14f1..cfc80e61b30 100644
--- a/spec/frontend/diffs/components/diff_view_spec.js
+++ b/spec/frontend/diffs/components/diff_view_spec.js
@@ -14,7 +14,7 @@ describe('DiffView', () => {
const setSelectedCommentPosition = jest.fn();
const getDiffRow = (wrapper) => wrapper.findComponent(DiffRow).vm;
- const createWrapper = (props, provide = {}) => {
+ const createWrapper = (props) => {
Vue.use(Vuex);
const batchComments = {
@@ -48,7 +48,7 @@ describe('DiffView', () => {
...props,
};
const stubs = { DiffExpansionCell, DiffRow, DiffCommentCell, DraftNote };
- return shallowMount(DiffView, { propsData, store, stubs, provide });
+ return shallowMount(DiffView, { propsData, store, stubs });
};
it('does not render a diff-line component when there is no finding', () => {
@@ -56,24 +56,13 @@ describe('DiffView', () => {
expect(wrapper.findComponent(DiffLine).exists()).toBe(false);
});
- it('does render a diff-line component with the correct props when there is a finding & refactorCodeQualityInlineFindings flag is true', async () => {
- const wrapper = createWrapper(diffCodeQuality, {
- glFeatures: { refactorCodeQualityInlineFindings: true },
- });
+ it('does render a diff-line component with the correct props when there is a finding', async () => {
+ const wrapper = createWrapper(diffCodeQuality);
wrapper.findComponent(DiffRow).vm.$emit('toggleCodeQualityFindings', 2);
await nextTick();
expect(wrapper.findComponent(DiffLine).props('line')).toBe(diffCodeQuality.diffLines[2]);
});
- it('does not render a diff-line component when there is a finding & refactorCodeQualityInlineFindings flag is false', async () => {
- const wrapper = createWrapper(diffCodeQuality, {
- glFeatures: { refactorCodeQualityInlineFindings: false },
- });
- wrapper.findComponent(DiffRow).vm.$emit('toggleCodeQualityFindings', 2);
- await nextTick();
- expect(wrapper.findComponent(DiffLine).exists()).toBe(false);
- });
-
it.each`
type | side | container | sides | total
${'parallel'} | ${'left'} | ${'.old'} | ${{ left: { lineDrafts: [], renderDiscussion: true }, right: { lineDrafts: [], renderDiscussion: true } }} | ${2}
diff --git a/spec/frontend/pipelines/pipeline_operations_spec.js b/spec/frontend/pipelines/pipeline_operations_spec.js
index 15fc23e8b54..b2191453824 100644
--- a/spec/frontend/pipelines/pipeline_operations_spec.js
+++ b/spec/frontend/pipelines/pipeline_operations_spec.js
@@ -1,6 +1,5 @@
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import PipelinesManualActions from '~/pipelines/components/pipelines_list/pipelines_manual_actions.vue';
-import PipelinesManualActionsLegacy from '~/pipelines/components/pipelines_list/pipelines_manual_actions_legacy.vue';
import PipelineMultiActions from '~/pipelines/components/pipelines_list/pipeline_multi_actions.vue';
import PipelineOperations from '~/pipelines/components/pipelines_list/pipeline_operations.vue';
import eventHub from '~/pipelines/event_hub';
@@ -15,15 +14,6 @@ describe('Pipeline operations', () => {
details: {
has_manual_actions: true,
has_scheduled_actions: false,
- manual_actions: [
- {
- name: 'dont-interrupt-me',
- path: '/root/ci-project/-/jobs/3974323562/play',
- playable: true,
- scheduled: false,
- },
- ],
- scheduled_actions: [],
},
flags: {
retryable: true,
@@ -34,20 +24,14 @@ describe('Pipeline operations', () => {
},
};
- const createComponent = (props = defaultProps, flagState = true) => {
+ const createComponent = (props = defaultProps) => {
wrapper = shallowMountExtended(PipelineOperations, {
- provide: {
- glFeatures: {
- lazyLoadPipelineDropdownActions: flagState,
- },
- },
propsData: {
...props,
},
});
};
- const findLegacyManualActions = () => wrapper.findComponent(PipelinesManualActionsLegacy);
const findManualActions = () => wrapper.findComponent(PipelinesManualActions);
const findMultiActions = () => wrapper.findComponent(PipelineMultiActions);
const findRetryBtn = () => wrapper.findByTestId('pipelines-retry-button');
@@ -57,14 +41,6 @@ describe('Pipeline operations', () => {
createComponent();
expect(findManualActions().exists()).toBe(true);
- expect(findLegacyManualActions().exists()).toBe(false);
- });
-
- it('should display legacy pipeline manual actions', () => {
- createComponent(defaultProps, false);
-
- expect(findLegacyManualActions().exists()).toBe(true);
- expect(findManualActions().exists()).toBe(false);
});
it('should display pipeline multi actions', () => {
diff --git a/spec/frontend/pipelines/pipelines_manual_actions_legacy_spec.js b/spec/frontend/pipelines/pipelines_manual_actions_legacy_spec.js
deleted file mode 100644
index 50ff301060b..00000000000
--- a/spec/frontend/pipelines/pipelines_manual_actions_legacy_spec.js
+++ /dev/null
@@ -1,168 +0,0 @@
-import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
-import { shallowMount } from '@vue/test-utils';
-import MockAdapter from 'axios-mock-adapter';
-import { nextTick } from 'vue';
-import { mockTracking, unmockTracking } from 'helpers/tracking_helper';
-import waitForPromises from 'helpers/wait_for_promises';
-import { TEST_HOST } from 'spec/test_constants';
-import { createAlert } from '~/alert';
-import axios from '~/lib/utils/axios_utils';
-import { HTTP_STATUS_INTERNAL_SERVER_ERROR, HTTP_STATUS_OK } from '~/lib/utils/http_status';
-import { confirmAction } from '~/lib/utils/confirm_via_gl_modal/confirm_via_gl_modal';
-import PipelinesManualActionsLegacy from '~/pipelines/components/pipelines_list/pipelines_manual_actions_legacy.vue';
-import GlCountdown from '~/vue_shared/components/gl_countdown.vue';
-import { TRACKING_CATEGORIES } from '~/pipelines/constants';
-
-jest.mock('~/alert');
-jest.mock('~/lib/utils/confirm_via_gl_modal/confirm_via_gl_modal');
-
-describe('Pipelines Actions dropdown', () => {
- let wrapper;
- let mock;
-
- const createComponent = (props, mountFn = shallowMount) => {
- wrapper = mountFn(PipelinesManualActionsLegacy, {
- propsData: {
- ...props,
- },
- });
- };
-
- const findDropdown = () => wrapper.findComponent(GlDropdown);
- const findAllDropdownItems = () => wrapper.findAllComponents(GlDropdownItem);
- const findAllCountdowns = () => wrapper.findAllComponents(GlCountdown);
-
- beforeEach(() => {
- mock = new MockAdapter(axios);
- });
-
- afterEach(() => {
- mock.restore();
- confirmAction.mockReset();
- });
-
- describe('manual actions', () => {
- const mockActions = [
- {
- name: 'stop_review',
- path: `${TEST_HOST}/root/review-app/builds/1893/play`,
- },
- {
- name: 'foo',
- path: `${TEST_HOST}/disabled/pipeline/action`,
- playable: false,
- },
- ];
-
- beforeEach(() => {
- createComponent({ actions: mockActions });
- });
-
- it('renders a dropdown with the provided actions', () => {
- expect(findAllDropdownItems()).toHaveLength(mockActions.length);
- });
-
- it("renders a disabled action when it's not playable", () => {
- expect(findAllDropdownItems().at(1).attributes('disabled')).toBe('true');
- });
-
- describe('on click', () => {
- it('makes a request and toggles the loading state', async () => {
- mock.onPost(mockActions.path).reply(HTTP_STATUS_OK);
-
- findAllDropdownItems().at(0).vm.$emit('click');
-
- await nextTick();
- expect(findDropdown().props('loading')).toBe(true);
-
- await waitForPromises();
- expect(findDropdown().props('loading')).toBe(false);
- });
-
- it('makes a failed request and toggles the loading state', async () => {
- mock.onPost(mockActions.path).reply(HTTP_STATUS_INTERNAL_SERVER_ERROR);
-
- findAllDropdownItems().at(0).vm.$emit('click');
-
- await nextTick();
- expect(findDropdown().props('loading')).toBe(true);
-
- await waitForPromises();
- expect(findDropdown().props('loading')).toBe(false);
- expect(createAlert).toHaveBeenCalledTimes(1);
- });
- });
-
- describe('tracking', () => {
- afterEach(() => {
- unmockTracking();
- });
-
- it('tracks manual actions click', () => {
- const trackingSpy = mockTracking(undefined, wrapper.element, jest.spyOn);
-
- findDropdown().vm.$emit('shown');
-
- expect(trackingSpy).toHaveBeenCalledWith(undefined, 'click_manual_actions', {
- label: TRACKING_CATEGORIES.table,
- });
- });
- });
- });
-
- describe('scheduled jobs', () => {
- const scheduledJobAction = {
- name: 'scheduled action',
- path: `${TEST_HOST}/scheduled/job/action`,
- playable: true,
- scheduled_at: '2063-04-05T00:42:00Z',
- };
- const expiredJobAction = {
- name: 'expired action',
- path: `${TEST_HOST}/expired/job/action`,
- playable: true,
- scheduled_at: '2018-10-05T08:23:00Z',
- };
-
- beforeEach(() => {
- jest.spyOn(Date, 'now').mockImplementation(() => new Date('2063-04-04T00:42:00Z').getTime());
- createComponent({ actions: [scheduledJobAction, expiredJobAction] });
- });
-
- it('makes post request after confirming', async () => {
- mock.onPost(scheduledJobAction.path).reply(HTTP_STATUS_OK);
- confirmAction.mockResolvedValueOnce(true);
-
- findAllDropdownItems().at(0).vm.$emit('click');
-
- expect(confirmAction).toHaveBeenCalled();
-
- await waitForPromises();
-
- expect(mock.history.post).toHaveLength(1);
- });
-
- it('does not make post request if confirmation is cancelled', async () => {
- mock.onPost(scheduledJobAction.path).reply(HTTP_STATUS_OK);
- confirmAction.mockResolvedValueOnce(false);
-
- findAllDropdownItems().at(0).vm.$emit('click');
-
- expect(confirmAction).toHaveBeenCalled();
-
- await waitForPromises();
-
- expect(mock.history.post).toHaveLength(0);
- });
-
- it('displays the remaining time in the dropdown', () => {
- expect(findAllCountdowns().at(0).props('endDateString')).toBe(
- scheduledJobAction.scheduled_at,
- );
- });
-
- it('displays 00:00:00 for expired jobs in the dropdown', () => {
- expect(findAllCountdowns().at(1).props('endDateString')).toBe(expiredJobAction.scheduled_at);
- });
- });
-});
diff --git a/spec/frontend/repository/components/fork_info_spec.js b/spec/frontend/repository/components/fork_info_spec.js
index 6b3d7552bb3..8521f91a6c7 100644
--- a/spec/frontend/repository/components/fork_info_spec.js
+++ b/spec/frontend/repository/components/fork_info_spec.js
@@ -224,7 +224,7 @@ describe('ForkInfo component', () => {
);
});
- it('does not render Update Fork button', async () => {
+ it('does not render Update Fork button', () => {
expect(findUpdateForkButton().exists()).toBe(false);
});
});
diff --git a/spec/frontend/repository/components/table/row_spec.js b/spec/frontend/repository/components/table/row_spec.js
index 38260c5b1cd..02b505c828c 100644
--- a/spec/frontend/repository/components/table/row_spec.js
+++ b/spec/frontend/repository/components/table/row_spec.js
@@ -63,7 +63,7 @@ describe('Repository table row component', () => {
const findRouterLink = () => wrapper.findComponent(RouterLinkStub);
const findIntersectionObserver = () => wrapper.findComponent(GlIntersectionObserver);
- it('renders table row', async () => {
+ it('renders table row', () => {
factory({
propsData: {
id: '1',
@@ -77,7 +77,7 @@ describe('Repository table row component', () => {
expect(wrapper.element).toMatchSnapshot();
});
- it('renders a symlink table row', async () => {
+ it('renders a symlink table row', () => {
factory({
propsData: {
id: '1',
@@ -92,7 +92,7 @@ describe('Repository table row component', () => {
expect(wrapper.element).toMatchSnapshot();
});
- it('renders table row for path with special character', async () => {
+ it('renders table row for path with special character', () => {
factory({
propsData: {
id: '1',
@@ -128,7 +128,7 @@ describe('Repository table row component', () => {
${'tree'} | ${RouterLinkStub} | ${'RouterLink'}
${'blob'} | ${RouterLinkStub} | ${'RouterLink'}
${'commit'} | ${'a'} | ${'hyperlink'}
- `('renders a $componentName for type $type', async ({ type, component }) => {
+ `('renders a $componentName for type $type', ({ type, component }) => {
factory({
propsData: {
id: '1',
@@ -146,7 +146,7 @@ describe('Repository table row component', () => {
path
${'test#'}
${'Änderungen'}
- `('renders link for $path', async ({ path }) => {
+ `('renders link for $path', ({ path }) => {
factory({
propsData: {
id: '1',
@@ -162,7 +162,7 @@ describe('Repository table row component', () => {
});
});
- it('renders link for directory with hash', async () => {
+ it('renders link for directory with hash', () => {
factory({
propsData: {
id: '1',
@@ -176,7 +176,7 @@ describe('Repository table row component', () => {
expect(wrapper.find('.tree-item-link').props('to')).toEqual({ path: '/-/tree/main/test%23' });
});
- it('renders commit ID for submodule', async () => {
+ it('renders commit ID for submodule', () => {
factory({
propsData: {
id: '1',
@@ -190,7 +190,7 @@ describe('Repository table row component', () => {
expect(wrapper.find('.commit-sha').text()).toContain('1');
});
- it('renders link with href', async () => {
+ it('renders link with href', () => {
factory({
propsData: {
id: '1',
@@ -205,7 +205,7 @@ describe('Repository table row component', () => {
expect(wrapper.find('a').attributes('href')).toEqual('https://test.com');
});
- it('renders LFS badge', async () => {
+ it('renders LFS badge', () => {
factory({
propsData: {
id: '1',
@@ -220,7 +220,7 @@ describe('Repository table row component', () => {
expect(findBadge().exists()).toBe(true);
});
- it('renders commit and web links with href for submodule', async () => {
+ it('renders commit and web links with href for submodule', () => {
factory({
propsData: {
id: '1',
@@ -237,7 +237,7 @@ describe('Repository table row component', () => {
expect(wrapper.findComponent(GlLink).attributes('href')).toEqual('https://test.com/commit');
});
- it('renders lock icon', async () => {
+ it('renders lock icon', () => {
factory({
propsData: {
id: '1',
diff --git a/spec/frontend/search/sidebar/components/scope_new_navigation_spec.js b/spec/frontend/search/sidebar/components/scope_new_navigation_spec.js
new file mode 100644
index 00000000000..105beae8638
--- /dev/null
+++ b/spec/frontend/search/sidebar/components/scope_new_navigation_spec.js
@@ -0,0 +1,83 @@
+import { shallowMount } from '@vue/test-utils';
+import Vue, { nextTick } from 'vue';
+import Vuex from 'vuex';
+import ScopeNewNavigation from '~/search/sidebar/components/scope_new_navigation.vue';
+import NavItem from '~/super_sidebar/components/nav_item.vue';
+import { MOCK_QUERY, MOCK_NAVIGATION, MOCK_NAVIGATION_ITEMS } from '../../mock_data';
+
+Vue.use(Vuex);
+
+describe('ScopeNewNavigation', () => {
+ let wrapper;
+
+ const actionSpies = {
+ fetchSidebarCount: jest.fn(),
+ };
+
+ const getterSpies = {
+ currentScope: jest.fn(() => 'issues'),
+ navigationItems: jest.fn(() => MOCK_NAVIGATION_ITEMS),
+ };
+
+ const createComponent = (initialState) => {
+ const store = new Vuex.Store({
+ state: {
+ urlQuery: MOCK_QUERY,
+ navigation: MOCK_NAVIGATION,
+ ...initialState,
+ },
+ actions: actionSpies,
+ getters: getterSpies,
+ });
+
+ wrapper = shallowMount(ScopeNewNavigation, {
+ store,
+ stubs: {
+ NavItem,
+ },
+ });
+ };
+
+ const findNavElement = () => wrapper.findComponent('nav');
+ const findNavItems = () => wrapper.findAllComponents(NavItem);
+ const findNavItemActive = () => wrapper.find('[aria-current=page]');
+ const findNavItemActiveLabel = () =>
+ findNavItemActive().find('[class="gl-pr-3 gl-text-gray-900 gl-truncate-end"]');
+
+ describe('scope navigation', () => {
+ beforeEach(() => {
+ createComponent({ urlQuery: { ...MOCK_QUERY, search: 'test' } });
+ });
+
+ it('renders section', () => {
+ expect(findNavElement().exists()).toBe(true);
+ });
+
+ it('calls proper action when rendered', async () => {
+ await nextTick();
+ expect(actionSpies.fetchSidebarCount).toHaveBeenCalled();
+ });
+
+ it('renders all nav item components', () => {
+ expect(findNavItems()).toHaveLength(9);
+ });
+
+ it('has all proper links', () => {
+ const linkAtPosition = 3;
+ const { link } = MOCK_NAVIGATION[Object.keys(MOCK_NAVIGATION)[linkAtPosition]];
+
+ expect(findNavItems().at(linkAtPosition).findComponent('a').attributes('href')).toBe(link);
+ });
+ });
+
+ describe('scope navigation sets proper state with url scope set', () => {
+ beforeEach(() => {
+ createComponent();
+ });
+
+ it('has correct active item', () => {
+ expect(findNavItemActive().exists()).toBe(true);
+ expect(findNavItemActiveLabel().text()).toBe('Issues');
+ });
+ });
+});
diff --git a/spec/frontend/super_sidebar/components/create_menu_spec.js b/spec/frontend/super_sidebar/components/create_menu_spec.js
index b24c6b8de7f..e05b5d30e69 100644
--- a/spec/frontend/super_sidebar/components/create_menu_spec.js
+++ b/spec/frontend/super_sidebar/components/create_menu_spec.js
@@ -1,3 +1,4 @@
+import { nextTick } from 'vue';
import { GlDisclosureDropdown, GlTooltip } from '@gitlab/ui';
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import { __ } from '~/locale';
@@ -23,6 +24,14 @@ describe('CreateMenu component', () => {
createWrapper();
});
+ it('passes popper options to the dropdown', () => {
+ createWrapper();
+
+ expect(findGlDisclosureDropdown().props('popperOptions')).toEqual({
+ modifiers: [{ name: 'offset', options: { offset: [-147, 4] } }],
+ });
+ });
+
it("sets the toggle's label", () => {
expect(findGlDisclosureDropdown().props('toggleText')).toBe(__('Create new...'));
});
@@ -35,5 +44,20 @@ describe('CreateMenu component', () => {
expect(findGlDisclosureDropdown().props('toggleId')).toBe(wrapper.vm.$options.toggleId);
expect(findGlTooltip().props('target')).toBe(`#${wrapper.vm.$options.toggleId}`);
});
+
+ it('hides the tooltip when the dropdown is opened', async () => {
+ findGlDisclosureDropdown().vm.$emit('shown');
+ await nextTick();
+
+ expect(findGlTooltip().exists()).toBe(false);
+ });
+
+ it('shows the tooltip when the dropdown is closed', async () => {
+ findGlDisclosureDropdown().vm.$emit('shown');
+ findGlDisclosureDropdown().vm.$emit('hidden');
+ await nextTick();
+
+ expect(findGlTooltip().exists()).toBe(true);
+ });
});
});
diff --git a/spec/frontend/super_sidebar/components/help_center_spec.js b/spec/frontend/super_sidebar/components/help_center_spec.js
index 839677f29d5..4c0e7a89a43 100644
--- a/spec/frontend/super_sidebar/components/help_center_spec.js
+++ b/spec/frontend/super_sidebar/components/help_center_spec.js
@@ -88,6 +88,12 @@ describe('HelpCenter component', () => {
]);
});
+ it('passes popper options to the dropdown', () => {
+ expect(findDropdown().props('popperOptions')).toEqual({
+ modifiers: [{ name: 'offset', options: { offset: [-4, 4] } }],
+ });
+ });
+
describe('with Gitlab version check feature enabled', () => {
beforeEach(() => {
createWrapper({ ...sidebarData, show_version_check: true });
diff --git a/spec/frontend/super_sidebar/components/user_menu_spec.js b/spec/frontend/super_sidebar/components/user_menu_spec.js
index 25bcd322d32..995095d0e35 100644
--- a/spec/frontend/super_sidebar/components/user_menu_spec.js
+++ b/spec/frontend/super_sidebar/components/user_menu_spec.js
@@ -14,7 +14,8 @@ describe('UserMenu component', () => {
const GlEmoji = { template: '<img/>' };
const toggleNewNavEndpoint = invalidUrl;
- const showDropdown = () => wrapper.findComponent(GlDisclosureDropdown).vm.$emit('shown');
+ const findDropdown = () => wrapper.findComponent(GlDisclosureDropdown);
+ const showDropdown = () => findDropdown().vm.$emit('shown');
const createWrapper = (userDataChanges = {}) => {
wrapper = mountExtended(UserMenu, {
@@ -36,6 +37,14 @@ describe('UserMenu component', () => {
trackingSpy = mockTracking(undefined, wrapper.element, jest.spyOn);
};
+ it('passes popper options to the dropdown', () => {
+ createWrapper();
+
+ expect(findDropdown().props('popperOptions')).toEqual({
+ modifiers: [{ name: 'offset', options: { offset: [-211, 4] } }],
+ });
+ });
+
describe('Toggle button', () => {
let toggle;
diff --git a/spec/frontend/tags/components/delete_tag_modal_spec.js b/spec/frontend/tags/components/delete_tag_modal_spec.js
index 8438bdb7db0..8ec9925563a 100644
--- a/spec/frontend/tags/components/delete_tag_modal_spec.js
+++ b/spec/frontend/tags/components/delete_tag_modal_spec.js
@@ -69,7 +69,7 @@ describe('Delete tag modal', () => {
expect(submitFormSpy).toHaveBeenCalled();
});
- it('calls show on the modal when a `openModal` event is received through the event hub', async () => {
+ it('calls show on the modal when a `openModal` event is received through the event hub', () => {
const showSpy = jest.spyOn(wrapper.vm.$refs.modal, 'show');
eventHub.$emit('openModal', {
diff --git a/spec/frontend/vue_merge_request_widget/components/mr_widget_rebase_spec.js b/spec/frontend/vue_merge_request_widget/components/mr_widget_rebase_spec.js
index f284ec98a73..9bd46267daa 100644
--- a/spec/frontend/vue_merge_request_widget/components/mr_widget_rebase_spec.js
+++ b/spec/frontend/vue_merge_request_widget/components/mr_widget_rebase_spec.js
@@ -1,56 +1,101 @@
+import Vue, { nextTick } from 'vue';
+import VueApollo from 'vue-apollo';
import { GlModal } from '@gitlab/ui';
-import { mount } from '@vue/test-utils';
-import { nextTick } from 'vue';
+import BoldText from '~/vue_merge_request_widget/components/bold_text.vue';
import WidgetRebase from '~/vue_merge_request_widget/components/states/mr_widget_rebase.vue';
+import rebaseQuery from '~/vue_merge_request_widget/queries/states/rebase.query.graphql';
import eventHub from '~/vue_merge_request_widget/event_hub';
+import StateContainer from '~/vue_merge_request_widget/components/state_container.vue';
import toast from '~/vue_shared/plugins/global_toast';
+import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
+import createMockApollo from 'helpers/mock_apollo_helper';
+import waitForPromises from 'helpers/wait_for_promises';
+import { stubComponent } from 'helpers/stub_component';
jest.mock('~/vue_shared/plugins/global_toast');
let wrapper;
-
-function createWrapper(propsData, provideData) {
- wrapper = mount(WidgetRebase, {
- provide: {
- ...provideData,
+const showMock = jest.fn();
+
+const mockPipelineNodes = [
+ {
+ id: '1',
+ project: {
+ id: '2',
+ fullPath: 'user/forked',
},
- propsData,
- data() {
- return {
- state: {
- rebaseInProgress: propsData.mr.rebaseInProgress,
- targetBranch: propsData.mr.targetBranch,
+ },
+];
+
+const mockQueryHandler = ({
+ rebaseInProgress = false,
+ targetBranch = '',
+ pushToSourceBranch = false,
+ nodes = mockPipelineNodes,
+} = {}) =>
+ jest.fn().mockResolvedValue({
+ data: {
+ project: {
+ id: '1',
+ mergeRequest: {
+ id: '2',
+ rebaseInProgress,
+ targetBranch,
userPermissions: {
- pushToSourceBranch: propsData.mr.canPushToSourceBranch,
+ pushToSourceBranch,
+ },
+ pipelines: {
+ nodes,
},
- pipelines: propsData.mr.pipelines,
},
- };
+ },
+ },
+ });
+
+const createMockApolloProvider = (handler) => {
+ Vue.use(VueApollo);
+
+ return createMockApollo([[rebaseQuery, handler]]);
+};
+
+function createWrapper({ propsData = {}, provideData = {}, handler = mockQueryHandler() } = {}) {
+ wrapper = shallowMountExtended(WidgetRebase, {
+ apolloProvider: createMockApolloProvider(handler),
+ provide: {
+ ...provideData,
},
- mocks: {
- $apollo: {
- queries: {
- state: { loading: false },
+ propsData: {
+ mr: {},
+ service: {},
+ ...propsData,
+ },
+ stubs: {
+ StateContainer,
+ GlModal: stubComponent(GlModal, {
+ methods: {
+ show: showMock,
},
- },
+ }),
},
});
}
describe('Merge request widget rebase component', () => {
- const findRebaseMessage = () => wrapper.find('[data-testid="rebase-message"]');
+ const findRebaseMessage = () => wrapper.findByTestId('rebase-message');
+ const findBoldText = () => wrapper.findComponent(BoldText);
const findRebaseMessageText = () => findRebaseMessage().text();
- const findStandardRebaseButton = () => wrapper.find('[data-testid="standard-rebase-button"]');
- const findRebaseWithoutCiButton = () => wrapper.find('[data-testid="rebase-without-ci-button"]');
+ const findStandardRebaseButton = () => wrapper.findByTestId('standard-rebase-button');
+ const findRebaseWithoutCiButton = () => wrapper.findByTestId('rebase-without-ci-button');
const findModal = () => wrapper.findComponent(GlModal);
describe('while rebasing', () => {
- it('should show progress message', () => {
+ it('should show progress message', async () => {
createWrapper({
- mr: { rebaseInProgress: true },
- service: {},
+ handler: mockQueryHandler({ rebaseInProgress: true }),
});
+ await waitForPromises();
+
expect(findRebaseMessageText()).toContain('Rebase in progress');
});
});
@@ -59,95 +104,110 @@ describe('Merge request widget rebase component', () => {
const rebaseMock = jest.fn().mockResolvedValue();
const pollMock = jest.fn().mockResolvedValue({});
- it('renders the warning message', () => {
+ it('renders the warning message', async () => {
createWrapper({
- mr: {
+ handler: mockQueryHandler({
rebaseInProgress: false,
- canPushToSourceBranch: true,
- },
- service: {
- rebase: rebaseMock,
- poll: pollMock,
- },
+ pushToSourceBranch: false,
+ }),
});
- const text = findRebaseMessageText();
+ await waitForPromises();
- expect(text).toContain('Merge blocked');
- expect(text.replace(/\s\s+/g, ' ')).toContain(
+ expect(findBoldText().props('message')).toContain('Merge blocked');
+ expect(findBoldText().props('message').replace(/\s\s+/g, ' ')).toContain(
'the source branch must be rebased onto the target branch',
);
});
it('renders an error message when rebasing has failed', async () => {
createWrapper({
- mr: {
- rebaseInProgress: false,
- canPushToSourceBranch: true,
- },
- service: {
- rebase: rebaseMock,
- poll: pollMock,
+ propsData: {
+ service: {
+ rebase: jest.fn().mockRejectedValue({
+ response: {
+ data: {
+ merge_error: 'Something went wrong!',
+ },
+ },
+ }),
+ },
},
+ handler: mockQueryHandler({ pushToSourceBranch: true }),
});
+ await waitForPromises();
- // setData usage is discouraged. See https://gitlab.com/groups/gitlab-org/-/epics/7330 for details
- // eslint-disable-next-line no-restricted-syntax
- wrapper.setData({ rebasingError: 'Something went wrong!' });
+ findStandardRebaseButton().vm.$emit('click');
- await nextTick();
+ await waitForPromises();
expect(findRebaseMessageText()).toContain('Something went wrong!');
});
describe('Rebase buttons', () => {
- beforeEach(() => {
+ it('renders both buttons', async () => {
createWrapper({
- mr: {
- rebaseInProgress: false,
- canPushToSourceBranch: true,
- },
- service: {
- rebase: rebaseMock,
- poll: pollMock,
- },
+ handler: mockQueryHandler({ pushToSourceBranch: true }),
});
- });
- it('renders both buttons', () => {
+ await waitForPromises();
+
expect(findRebaseWithoutCiButton().exists()).toBe(true);
expect(findStandardRebaseButton().exists()).toBe(true);
});
it('starts the rebase when clicking', async () => {
- findStandardRebaseButton().vm.$emit('click');
+ createWrapper({
+ propsData: {
+ service: {
+ rebase: rebaseMock,
+ poll: pollMock,
+ },
+ },
+ handler: mockQueryHandler({ pushToSourceBranch: true }),
+ });
- await nextTick();
+ await waitForPromises();
+
+ findStandardRebaseButton().vm.$emit('click');
expect(rebaseMock).toHaveBeenCalledWith({ skipCi: false });
});
it('starts the CI-skipping rebase when clicking on "Rebase without CI"', async () => {
- findRebaseWithoutCiButton().vm.$emit('click');
+ createWrapper({
+ propsData: {
+ service: {
+ rebase: rebaseMock,
+ poll: pollMock,
+ },
+ },
+ handler: mockQueryHandler({ pushToSourceBranch: true }),
+ });
- await nextTick();
+ await waitForPromises();
+
+ findRebaseWithoutCiButton().vm.$emit('click');
expect(rebaseMock).toHaveBeenCalledWith({ skipCi: true });
});
});
describe('Rebase when pipelines must succeed is enabled', () => {
- beforeEach(() => {
+ beforeEach(async () => {
createWrapper({
- mr: {
- rebaseInProgress: false,
- canPushToSourceBranch: true,
- onlyAllowMergeIfPipelineSucceeds: true,
- },
- service: {
- rebase: rebaseMock,
- poll: pollMock,
+ propsData: {
+ mr: {
+ onlyAllowMergeIfPipelineSucceeds: true,
+ },
+ service: {
+ rebase: rebaseMock,
+ poll: pollMock,
+ },
},
+ handler: mockQueryHandler({ pushToSourceBranch: true }),
});
+
+ await waitForPromises();
});
it('renders only the rebase button', () => {
@@ -165,19 +225,22 @@ describe('Merge request widget rebase component', () => {
});
describe('Rebase when pipelines must succeed and skipped pipelines are considered successful are enabled', () => {
- beforeEach(() => {
+ beforeEach(async () => {
createWrapper({
- mr: {
- rebaseInProgress: false,
- canPushToSourceBranch: true,
- onlyAllowMergeIfPipelineSucceeds: true,
- allowMergeOnSkippedPipeline: true,
- },
- service: {
- rebase: rebaseMock,
- poll: pollMock,
+ propsData: {
+ mr: {
+ onlyAllowMergeIfPipelineSucceeds: true,
+ allowMergeOnSkippedPipeline: true,
+ },
+ service: {
+ rebase: rebaseMock,
+ poll: pollMock,
+ },
},
+ handler: mockQueryHandler({ pushToSourceBranch: true }),
});
+
+ await waitForPromises();
});
it('renders both rebase buttons', () => {
@@ -203,51 +266,36 @@ describe('Merge request widget rebase component', () => {
});
describe('security modal', () => {
- it('displays modal and rebases after confirming', () => {
- createWrapper(
- {
+ it('displays modal and rebases after confirming', async () => {
+ createWrapper({
+ propsData: {
mr: {
- rebaseInProgress: false,
- canPushToSourceBranch: true,
sourceProjectFullPath: 'user/forked',
targetProjectFullPath: 'root/original',
- pipelines: {
- nodes: [
- {
- id: '1',
- project: {
- id: '2',
- fullPath: 'user/forked',
- },
- },
- ],
- },
},
service: {
rebase: rebaseMock,
poll: pollMock,
},
},
- { canCreatePipelineInTargetProject: true },
- );
+ provideData: { canCreatePipelineInTargetProject: true },
+ handler: mockQueryHandler({ pushToSourceBranch: true }),
+ });
- findModal().vm.show = jest.fn();
+ await waitForPromises();
findStandardRebaseButton().vm.$emit('click');
-
- expect(findModal().vm.show).toHaveBeenCalled();
+ expect(showMock).toHaveBeenCalled();
findModal().vm.$emit('primary');
expect(rebaseMock).toHaveBeenCalled();
});
- it('does not display modal', () => {
- createWrapper(
- {
+ it('does not display modal', async () => {
+ createWrapper({
+ propsData: {
mr: {
- rebaseInProgress: false,
- canPushToSourceBranch: true,
sourceProjectFullPath: 'user/forked',
targetProjectFullPath: 'root/original',
},
@@ -256,14 +304,15 @@ describe('Merge request widget rebase component', () => {
poll: pollMock,
},
},
- { canCreatePipelineInTargetProject: false },
- );
+ provideData: { canCreatePipelineInTargetProject: false },
+ handler: mockQueryHandler({ pushToSourceBranch: true }),
+ });
- findModal().vm.show = jest.fn();
+ await waitForPromises();
findStandardRebaseButton().vm.$emit('click');
- expect(findModal().vm.show).not.toHaveBeenCalled();
+ expect(showMock).not.toHaveBeenCalled();
expect(rebaseMock).toHaveBeenCalled();
});
});
@@ -273,42 +322,41 @@ describe('Merge request widget rebase component', () => {
const exampleTargetBranch = 'fake-branch-to-test-with';
describe('UI text', () => {
- beforeEach(() => {
+ beforeEach(async () => {
createWrapper({
- mr: {
- rebaseInProgress: false,
- canPushToSourceBranch: false,
+ handler: mockQueryHandler({
+ pushToSourceBranch: false,
targetBranch: exampleTargetBranch,
- },
- service: {},
+ }),
});
+
+ await waitForPromises();
});
it('renders a message explaining user does not have permissions', () => {
- const text = findRebaseMessageText();
-
- expect(text).toContain('Merge blocked:');
- expect(text).toContain('the source branch must be rebased');
+ expect(findBoldText().props('message')).toContain('Merge blocked');
+ expect(findBoldText().props('message')).toContain('the source branch must be rebased');
});
it('renders the correct target branch name', () => {
- const text = findRebaseMessageText();
-
- expect(text).toContain('Merge blocked:');
- expect(text).toContain('the source branch must be rebased onto the target branch.');
+ expect(findBoldText().props('message')).toContain('Merge blocked:');
+ expect(findBoldText().props('message')).toContain(
+ 'the source branch must be rebased onto the target branch.',
+ );
});
});
- it('does render the "Rebase without pipeline" button', () => {
+ it('does render the "Rebase without pipeline" button', async () => {
createWrapper({
- mr: {
+ handler: mockQueryHandler({
rebaseInProgress: false,
- canPushToSourceBranch: false,
+ pushToSourceBranch: false,
targetBranch: exampleTargetBranch,
- },
- service: {},
+ }),
});
+ await waitForPromises();
+
expect(findRebaseWithoutCiButton().exists()).toBe(true);
});
});
@@ -317,24 +365,27 @@ describe('Merge request widget rebase component', () => {
it('checkRebaseStatus', async () => {
jest.spyOn(eventHub, '$emit').mockImplementation(() => {});
createWrapper({
- mr: {},
- service: {
- rebase() {
- return Promise.resolve();
- },
- poll() {
- return Promise.resolve({
- data: {
- rebase_in_progress: false,
- should_be_rebased: false,
- merge_error: null,
- },
- });
+ propsData: {
+ service: {
+ rebase() {
+ return Promise.resolve();
+ },
+ poll() {
+ return Promise.resolve({
+ data: {
+ rebase_in_progress: false,
+ should_be_rebased: false,
+ merge_error: null,
+ },
+ });
+ },
},
},
});
- wrapper.vm.rebase();
+ await waitForPromises();
+
+ findRebaseWithoutCiButton().vm.$emit('click');
// Wait for the rebase request
await nextTick();
diff --git a/spec/frontend_integration/content_editor/content_editor_integration_spec.js b/spec/frontend_integration/content_editor/content_editor_integration_spec.js
index a80c4db19b5..b3997fdb676 100644
--- a/spec/frontend_integration/content_editor/content_editor_integration_spec.js
+++ b/spec/frontend_integration/content_editor/content_editor_integration_spec.js
@@ -66,7 +66,7 @@ describe('content_editor', () => {
expect(wrapper.findByTestId('content-editor-loading-indicator').exists()).toBe(false);
});
- it('displays the initial content', async () => {
+ it('displays the initial content', () => {
expect(wrapper.html()).toContain(initialContent);
});
});
diff --git a/spec/frontend_integration/ide/user_opens_ide_spec.js b/spec/frontend_integration/ide/user_opens_ide_spec.js
index d4656b1098e..2f89b3c0612 100644
--- a/spec/frontend_integration/ide/user_opens_ide_spec.js
+++ b/spec/frontend_integration/ide/user_opens_ide_spec.js
@@ -23,7 +23,7 @@ describe('IDE: User opens IDE', () => {
resetHTMLFixture();
});
- it('shows loading indicator while the IDE is loading', async () => {
+ it('shows loading indicator while the IDE is loading', () => {
vm = startWebIDE(container);
expect(container.querySelectorAll('.multi-file-loading-container')).toHaveLength(3);
@@ -52,7 +52,7 @@ describe('IDE: User opens IDE', () => {
await screen.findByText('README'); // wait for file tree to load
});
- it('shows a list of files in the left sidebar', async () => {
+ it('shows a list of files in the left sidebar', () => {
expect(ideHelper.getFilesList()).toEqual(
expect.arrayContaining(['README', 'LICENSE', 'CONTRIBUTING.md']),
);
diff --git a/spec/frontend_integration/snippets/snippets_notes_spec.js b/spec/frontend_integration/snippets/snippets_notes_spec.js
index bfda86a48a2..27be7793ce6 100644
--- a/spec/frontend_integration/snippets/snippets_notes_spec.js
+++ b/spec/frontend_integration/snippets/snippets_notes_spec.js
@@ -6,7 +6,7 @@ import initDeprecatedNotes from '~/init_deprecated_notes';
import { setHTMLFixture } from 'helpers/fixtures';
describe('Integration Snippets notes', () => {
- beforeEach(async () => {
+ beforeEach(() => {
setHTMLFixture(htmlSnippetsShow);
// Check if we have to Load GFM Input
diff --git a/spec/lib/api/entities/clusters/agents/authorizations/ci_access_spec.rb b/spec/lib/api/entities/clusters/agents/authorizations/ci_access_spec.rb
index 5f41ae6af4b..4dd20f26dc9 100644
--- a/spec/lib/api/entities/clusters/agents/authorizations/ci_access_spec.rb
+++ b/spec/lib/api/entities/clusters/agents/authorizations/ci_access_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe API::Entities::Clusters::Agents::Authorizations::CiAccess, feature_category: :kubernetes_management do
+RSpec.describe API::Entities::Clusters::Agents::Authorizations::CiAccess, feature_category: :deployment_management do
subject { described_class.new(authorization).as_json }
shared_examples 'generic authorization' do
diff --git a/spec/lib/gitlab/kas/user_access_spec.rb b/spec/lib/gitlab/kas/user_access_spec.rb
index 8795ad565d0..a8296d23a18 100644
--- a/spec/lib/gitlab/kas/user_access_spec.rb
+++ b/spec/lib/gitlab/kas/user_access_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Gitlab::Kas::UserAccess, feature_category: :kubernetes_management do
+RSpec.describe Gitlab::Kas::UserAccess, feature_category: :deployment_management do
describe '.enabled?' do
subject { described_class.enabled? }
diff --git a/spec/lib/gitlab/resource_events/assignment_event_recorder_spec.rb b/spec/lib/gitlab/resource_events/assignment_event_recorder_spec.rb
new file mode 100644
index 00000000000..b15f95dbd9c
--- /dev/null
+++ b/spec/lib/gitlab/resource_events/assignment_event_recorder_spec.rb
@@ -0,0 +1,91 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe Gitlab::ResourceEvents::AssignmentEventRecorder, feature_category: :value_stream_management do
+ using RSpec::Parameterized::TableSyntax
+
+ let_it_be(:user1) { create(:user) }
+ let_it_be(:user2) { create(:user) }
+ let_it_be(:user3) { create(:user) }
+
+ let_it_be_with_refind(:issue_with_two_assignees) { create(:issue, assignees: [user1, user2]) }
+ let_it_be_with_refind(:mr_with_no_assignees) { create(:merge_request) }
+ let_it_be_with_refind(:mr_with_one_assignee) { create(:merge_request, assignee: [user3]) }
+
+ let(:parent_records) do
+ {
+ issue_with_two_assignees: issue_with_two_assignees,
+ mr_with_no_assignees: mr_with_no_assignees,
+ mr_with_one_assignee: mr_with_one_assignee
+ }
+ end
+
+ let(:user_records) do
+ {
+ user1: user1,
+ user2: user2,
+ user3: user3
+ }
+ end
+
+ where(:parent, :new_assignees, :assignee_history) do
+ :issue_with_two_assignees | [:user1, :user2, :user3] | [[:user3, :add]]
+ :issue_with_two_assignees | [:user1, :user3] | [[:user2, :remove], [:user3, :add]]
+ :issue_with_two_assignees | [:user1] | [[:user2, :remove]]
+ :issue_with_two_assignees | [] | [[:user1, :remove], [:user2, :remove]]
+ :mr_with_no_assignees | [:user1] | [[:user1, :add]]
+ :mr_with_no_assignees | [] | []
+ :mr_with_one_assignee | [:user3] | []
+ :mr_with_one_assignee | [:user1] | [[:user3, :remove], [:user1, :add]]
+ end
+
+ with_them do
+ it 'records the assignment history corrently' do
+ parent_record = parent_records[parent]
+ old_assignees = parent_record.assignees.to_a
+ parent_record.assignees = new_assignees.map { |user_variable_name| user_records[user_variable_name] }
+
+ described_class.new(parent: parent_record, old_assignees: old_assignees).record
+
+ expected_records = assignee_history.map do |user_variable_name, action|
+ have_attributes({
+ user_id: user_records[user_variable_name].id,
+ action: action.to_s
+ })
+ end
+
+ expect(parent_record.assignment_events).to match_array(expected_records)
+ end
+ end
+
+ context 'when batching' do
+ it 'invokes multiple insert queries' do
+ stub_const('Gitlab::ResourceEvents::AssignmentEventRecorder::BATCH_SIZE', 1)
+
+ expect(ResourceEvents::MergeRequestAssignmentEvent).to receive(:insert_all).twice
+
+ described_class.new(parent: mr_with_one_assignee, old_assignees: [user1]).record # 1 assignment, 1 unassignment
+ end
+ end
+
+ context 'when duplicated old assignees were given' do
+ it 'deduplicates the records' do
+ expect do
+ described_class.new(parent: mr_with_one_assignee, old_assignees: [user3, user2, user2]).record
+ end.to change { ResourceEvents::MergeRequestAssignmentEvent.count }.by(1)
+ end
+ end
+
+ context 'when the record_issue_and_mr_assignee_events FF is off' do
+ before do
+ stub_feature_flags(record_issue_and_mr_assignee_events: false)
+ end
+
+ it 'does nothing' do
+ expect do
+ described_class.new(parent: mr_with_one_assignee, old_assignees: [user2, user3]).record
+ end.not_to change { mr_with_one_assignee.assignment_events.count }
+ end
+ end
+end
diff --git a/spec/lib/gitlab/utils/strong_memoize_spec.rb b/spec/lib/gitlab/utils/strong_memoize_spec.rb
index 44da0aad6fa..ea8083e7d7f 100644
--- a/spec/lib/gitlab/utils/strong_memoize_spec.rb
+++ b/spec/lib/gitlab/utils/strong_memoize_spec.rb
@@ -262,19 +262,21 @@ RSpec.describe Gitlab::Utils::StrongMemoize, feature_category: :shared do
describe '.strong_memoize_attr' do
[nil, false, true, 'value', 0, [0]].each do |value|
- let(:value) { value }
+ context "with value '#{value}'" do
+ let(:value) { value }
- context "memoized after method definition with value #{value}" do
- let(:method_name) { :method_name_attr }
+ context 'memoized after method definition' do
+ let(:method_name) { :method_name_attr }
- it_behaves_like 'caching the value'
+ it_behaves_like 'caching the value'
- it 'calls the existing .method_added' do
- expect(klass.method_added_list).to include(:method_name_attr)
- end
+ it 'calls the existing .method_added' do
+ expect(klass.method_added_list).to include(:method_name_attr)
+ end
- it 'retains method arity' do
- expect(klass.instance_method(method_name).arity).to eq(0)
+ it 'retains method arity' do
+ expect(klass.instance_method(method_name).arity).to eq(0)
+ end
end
end
end
diff --git a/spec/migrations/bulk_insert_cluster_enabled_grants_spec.rb b/spec/migrations/bulk_insert_cluster_enabled_grants_spec.rb
index e85489198ee..71ffdd66d62 100644
--- a/spec/migrations/bulk_insert_cluster_enabled_grants_spec.rb
+++ b/spec/migrations/bulk_insert_cluster_enabled_grants_spec.rb
@@ -3,7 +3,7 @@
require 'spec_helper'
require_migration!
-RSpec.describe BulkInsertClusterEnabledGrants, :migration, feature_category: :kubernetes_management do
+RSpec.describe BulkInsertClusterEnabledGrants, :migration, feature_category: :deployment_management do
let(:migration) { described_class.new }
let(:cluster_enabled_grants) { table(:cluster_enabled_grants) }
diff --git a/spec/models/clusters/agents/authorizations/ci_access/group_authorization_spec.rb b/spec/models/clusters/agents/authorizations/ci_access/group_authorization_spec.rb
index 2864d6583bd..deabebde760 100644
--- a/spec/models/clusters/agents/authorizations/ci_access/group_authorization_spec.rb
+++ b/spec/models/clusters/agents/authorizations/ci_access/group_authorization_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Agents::Authorizations::CiAccess::GroupAuthorization, feature_category: :kubernetes_management do
+RSpec.describe Clusters::Agents::Authorizations::CiAccess::GroupAuthorization, feature_category: :deployment_management do
it { is_expected.to belong_to(:agent).class_name('Clusters::Agent').required }
it { is_expected.to belong_to(:group).class_name('::Group').required }
diff --git a/spec/models/clusters/agents/authorizations/ci_access/implicit_authorization_spec.rb b/spec/models/clusters/agents/authorizations/ci_access/implicit_authorization_spec.rb
index 9a4f0c28687..427858c7529 100644
--- a/spec/models/clusters/agents/authorizations/ci_access/implicit_authorization_spec.rb
+++ b/spec/models/clusters/agents/authorizations/ci_access/implicit_authorization_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Agents::Authorizations::CiAccess::ImplicitAuthorization, feature_category: :kubernetes_management do
+RSpec.describe Clusters::Agents::Authorizations::CiAccess::ImplicitAuthorization, feature_category: :deployment_management do
let_it_be(:agent) { create(:cluster_agent) }
subject { described_class.new(agent: agent) }
diff --git a/spec/models/clusters/agents/authorizations/ci_access/project_authorization_spec.rb b/spec/models/clusters/agents/authorizations/ci_access/project_authorization_spec.rb
index 9e2b25e415e..fe5f3cb10ea 100644
--- a/spec/models/clusters/agents/authorizations/ci_access/project_authorization_spec.rb
+++ b/spec/models/clusters/agents/authorizations/ci_access/project_authorization_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Agents::Authorizations::CiAccess::ProjectAuthorization, feature_category: :kubernetes_management do
+RSpec.describe Clusters::Agents::Authorizations::CiAccess::ProjectAuthorization, feature_category: :deployment_management do
it { is_expected.to belong_to(:agent).class_name('Clusters::Agent').required }
it { is_expected.to belong_to(:project).class_name('Project').required }
diff --git a/spec/models/clusters/agents/authorizations/user_access/group_authorization_spec.rb b/spec/models/clusters/agents/authorizations/user_access/group_authorization_spec.rb
index d7b4ea2388f..9ed4da474c0 100644
--- a/spec/models/clusters/agents/authorizations/user_access/group_authorization_spec.rb
+++ b/spec/models/clusters/agents/authorizations/user_access/group_authorization_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Agents::Authorizations::UserAccess::GroupAuthorization, feature_category: :kubernetes_management do
+RSpec.describe Clusters::Agents::Authorizations::UserAccess::GroupAuthorization, feature_category: :deployment_management do
it { is_expected.to belong_to(:agent).class_name('Clusters::Agent').required }
it { is_expected.to belong_to(:group).class_name('::Group').required }
diff --git a/spec/models/clusters/agents/authorizations/user_access/project_authorization_spec.rb b/spec/models/clusters/agents/authorizations/user_access/project_authorization_spec.rb
index a51be15a9d7..79b039684ad 100644
--- a/spec/models/clusters/agents/authorizations/user_access/project_authorization_spec.rb
+++ b/spec/models/clusters/agents/authorizations/user_access/project_authorization_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Agents::Authorizations::UserAccess::ProjectAuthorization, feature_category: :kubernetes_management do
+RSpec.describe Clusters::Agents::Authorizations::UserAccess::ProjectAuthorization, feature_category: :deployment_management do
it { is_expected.to belong_to(:agent).class_name('Clusters::Agent').required }
it { is_expected.to belong_to(:project).class_name('Project').required }
diff --git a/spec/models/clusters/cluster_spec.rb b/spec/models/clusters/cluster_spec.rb
index b038eb7c03e..189affa3c88 100644
--- a/spec/models/clusters/cluster_spec.rb
+++ b/spec/models/clusters/cluster_spec.rb
@@ -3,7 +3,7 @@
require 'spec_helper'
RSpec.describe Clusters::Cluster, :use_clean_rails_memory_store_caching,
-feature_category: :kubernetes_management do
+feature_category: :deployment_management do
include ReactiveCachingHelpers
include KubernetesHelpers
diff --git a/spec/models/concerns/clusters/agents/authorizations/ci_access/config_scopes_spec.rb b/spec/models/concerns/clusters/agents/authorizations/ci_access/config_scopes_spec.rb
index c632c639273..5c69ede11fc 100644
--- a/spec/models/concerns/clusters/agents/authorizations/ci_access/config_scopes_spec.rb
+++ b/spec/models/concerns/clusters/agents/authorizations/ci_access/config_scopes_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Agents::Authorizations::CiAccess::ConfigScopes, feature_category: :kubernetes_management do
+RSpec.describe Clusters::Agents::Authorizations::CiAccess::ConfigScopes, feature_category: :deployment_management do
describe '.with_available_ci_access_fields' do
let(:project) { create(:project) }
diff --git a/spec/models/onboarding/completion_spec.rb b/spec/models/onboarding/completion_spec.rb
index 0639762b76c..dd7648f7799 100644
--- a/spec/models/onboarding/completion_spec.rb
+++ b/spec/models/onboarding/completion_spec.rb
@@ -37,26 +37,6 @@ RSpec.describe Onboarding::Completion, feature_category: :onboarding do
it { is_expected.to eq(100) }
end
-
- context 'with security_actions_continuous_onboarding experiment' do
- let(:completed_actions) { Hash[tracked_action_columns.first, Time.current] }
-
- context 'when control' do
- before do
- stub_experiments(security_actions_continuous_onboarding: :control)
- end
-
- it { is_expected.to eq(10) }
- end
-
- context 'when candidate' do
- before do
- stub_experiments(security_actions_continuous_onboarding: :candidate)
- end
-
- it { is_expected.to eq(8) }
- end
- end
end
describe '#completed?' do
@@ -84,18 +64,18 @@ RSpec.describe Onboarding::Completion, feature_category: :onboarding do
end
end
- context 'when security_scan_enabled' do
- let(:column) { :security_scan_enabled_at }
- let(:completed_actions) { { security_scan_enabled_at: security_scan_enabled_at } }
+ context 'when secure_dast_run' do
+ let(:column) { :secure_dast_run_at }
+ let(:completed_actions) { { secure_dast_run_at: secure_dast_run_at } }
context 'when is completed' do
- let(:security_scan_enabled_at) { Time.current }
+ let(:secure_dast_run_at) { Time.current }
it { is_expected.to eq(true) }
end
context 'when is not completed' do
- let(:security_scan_enabled_at) { nil }
+ let(:secure_dast_run_at) { nil }
it { is_expected.to eq(false) }
end
diff --git a/spec/models/onboarding/progress_spec.rb b/spec/models/onboarding/progress_spec.rb
index 9d91af2487a..7d169464462 100644
--- a/spec/models/onboarding/progress_spec.rb
+++ b/spec/models/onboarding/progress_spec.rb
@@ -187,7 +187,7 @@ RSpec.describe Onboarding::Progress do
end
context 'for multiple actions' do
- let(:action1) { :security_scan_enabled }
+ let(:action1) { :secure_dast_run }
let(:action2) { :secure_dependency_scanning_run }
let(:actions) { [action1, action2] }
@@ -206,11 +206,11 @@ RSpec.describe Onboarding::Progress do
it 'does not override timestamp', :aggregate_failures do
described_class.register(namespace, [action1])
- expect(described_class.find_by_namespace_id(namespace.id).security_scan_enabled_at).not_to be_nil
+ expect(described_class.find_by_namespace_id(namespace.id).secure_dast_run_at).not_to be_nil
expect(described_class.find_by_namespace_id(namespace.id).secure_dependency_scanning_run_at).to be_nil
expect { described_class.register(namespace, [action1, action2]) }.not_to change {
- described_class.find_by_namespace_id(namespace.id).security_scan_enabled_at
+ described_class.find_by_namespace_id(namespace.id).secure_dast_run_at
}
expect(described_class.find_by_namespace_id(namespace.id).secure_dependency_scanning_run_at).not_to be_nil
end
diff --git a/spec/requests/api/admin/instance_clusters_spec.rb b/spec/requests/api/admin/instance_clusters_spec.rb
index 0a72f404e89..f2e62533b78 100644
--- a/spec/requests/api/admin/instance_clusters_spec.rb
+++ b/spec/requests/api/admin/instance_clusters_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe ::API::Admin::InstanceClusters, feature_category: :kubernetes_management do
+RSpec.describe ::API::Admin::InstanceClusters, feature_category: :deployment_management do
include KubernetesHelpers
let_it_be(:admin_user) { create(:admin) }
diff --git a/spec/requests/api/clusters/agent_tokens_spec.rb b/spec/requests/api/clusters/agent_tokens_spec.rb
index b2d996e8002..a1dd6e84492 100644
--- a/spec/requests/api/clusters/agent_tokens_spec.rb
+++ b/spec/requests/api/clusters/agent_tokens_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe API::Clusters::AgentTokens, feature_category: :kubernetes_management do
+RSpec.describe API::Clusters::AgentTokens, feature_category: :deployment_management do
let_it_be(:agent) { create(:cluster_agent) }
let_it_be(:agent_token_one) { create(:cluster_agent_token, agent: agent) }
let_it_be(:revoked_agent_token) { create(:cluster_agent_token, :revoked, agent: agent) }
diff --git a/spec/requests/api/clusters/agents_spec.rb b/spec/requests/api/clusters/agents_spec.rb
index a09713bd6e7..12056567e9d 100644
--- a/spec/requests/api/clusters/agents_spec.rb
+++ b/spec/requests/api/clusters/agents_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe API::Clusters::Agents, feature_category: :kubernetes_management do
+RSpec.describe API::Clusters::Agents, feature_category: :deployment_management do
let_it_be(:agent) { create(:cluster_agent) }
let(:user) { agent.created_by_user }
diff --git a/spec/requests/api/graphql/mutations/clusters/agent_tokens/agent_tokens/create_spec.rb b/spec/requests/api/graphql/mutations/clusters/agent_tokens/agent_tokens/create_spec.rb
index f544cef8864..ef0d44395bf 100644
--- a/spec/requests/api/graphql/mutations/clusters/agent_tokens/agent_tokens/create_spec.rb
+++ b/spec/requests/api/graphql/mutations/clusters/agent_tokens/agent_tokens/create_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Create a new cluster agent token', feature_category: :kubernetes_management do
+RSpec.describe 'Create a new cluster agent token', feature_category: :deployment_management do
include GraphqlHelpers
let_it_be(:cluster_agent) { create(:cluster_agent) }
diff --git a/spec/requests/api/graphql/mutations/clusters/agents/create_spec.rb b/spec/requests/api/graphql/mutations/clusters/agents/create_spec.rb
index 66e6c5cc629..1d1e72dcff9 100644
--- a/spec/requests/api/graphql/mutations/clusters/agents/create_spec.rb
+++ b/spec/requests/api/graphql/mutations/clusters/agents/create_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Create a new cluster agent', feature_category: :kubernetes_management do
+RSpec.describe 'Create a new cluster agent', feature_category: :deployment_management do
include GraphqlHelpers
let(:project) { create(:project, :public, :repository) }
diff --git a/spec/requests/api/graphql/mutations/clusters/agents/delete_spec.rb b/spec/requests/api/graphql/mutations/clusters/agents/delete_spec.rb
index 27a566dfb8c..b70a6282a7a 100644
--- a/spec/requests/api/graphql/mutations/clusters/agents/delete_spec.rb
+++ b/spec/requests/api/graphql/mutations/clusters/agents/delete_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Delete a cluster agent', feature_category: :kubernetes_management do
+RSpec.describe 'Delete a cluster agent', feature_category: :deployment_management do
include GraphqlHelpers
let(:cluster_agent) { create(:cluster_agent) }
diff --git a/spec/requests/api/graphql/project/cluster_agents_spec.rb b/spec/requests/api/graphql/project/cluster_agents_spec.rb
index 0881eb9cdc3..a50b176cdac 100644
--- a/spec/requests/api/graphql/project/cluster_agents_spec.rb
+++ b/spec/requests/api/graphql/project/cluster_agents_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe 'Project.cluster_agents', feature_category: :kubernetes_management do
+RSpec.describe 'Project.cluster_agents', feature_category: :deployment_management do
include GraphqlHelpers
let_it_be(:project) { create(:project, :public) }
diff --git a/spec/requests/api/group_clusters_spec.rb b/spec/requests/api/group_clusters_spec.rb
index 68c3af01e56..58d0e6a1eb5 100644
--- a/spec/requests/api/group_clusters_spec.rb
+++ b/spec/requests/api/group_clusters_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe API::GroupClusters, feature_category: :kubernetes_management do
+RSpec.describe API::GroupClusters, feature_category: :deployment_management do
include KubernetesHelpers
let(:current_user) { create(:user) }
diff --git a/spec/requests/api/internal/kubernetes_spec.rb b/spec/requests/api/internal/kubernetes_spec.rb
index 54e34d6952b..6d7f2657e1e 100644
--- a/spec/requests/api/internal/kubernetes_spec.rb
+++ b/spec/requests/api/internal/kubernetes_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe API::Internal::Kubernetes, feature_category: :kubernetes_management do
+RSpec.describe API::Internal::Kubernetes, feature_category: :deployment_management do
let(:jwt_auth_headers) do
jwt_token = JWT.encode({ 'iss' => Gitlab::Kas::JWT_ISSUER }, Gitlab::Kas.secret, 'HS256')
diff --git a/spec/requests/api/project_clusters_spec.rb b/spec/requests/api/project_clusters_spec.rb
index 895192252da..c52948a4cb0 100644
--- a/spec/requests/api/project_clusters_spec.rb
+++ b/spec/requests/api/project_clusters_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe API::ProjectClusters, feature_category: :kubernetes_management do
+RSpec.describe API::ProjectClusters, feature_category: :deployment_management do
include KubernetesHelpers
let_it_be(:maintainer_user) { create(:user) }
diff --git a/spec/requests/projects/cluster_agents_controller_spec.rb b/spec/requests/projects/cluster_agents_controller_spec.rb
index d7c791fa0c1..643160ad9f3 100644
--- a/spec/requests/projects/cluster_agents_controller_spec.rb
+++ b/spec/requests/projects/cluster_agents_controller_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Projects::ClusterAgentsController, feature_category: :kubernetes_management do
+RSpec.describe Projects::ClusterAgentsController, feature_category: :deployment_management do
let_it_be(:cluster_agent) { create(:cluster_agent) }
let(:project) { cluster_agent.project }
diff --git a/spec/requests/projects/google_cloud/configuration_controller_spec.rb b/spec/requests/projects/google_cloud/configuration_controller_spec.rb
index 1aa44d1a49a..b807ff7930e 100644
--- a/spec/requests/projects/google_cloud/configuration_controller_spec.rb
+++ b/spec/requests/projects/google_cloud/configuration_controller_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Projects::GoogleCloud::ConfigurationController, feature_category: :kubernetes_management do
+RSpec.describe Projects::GoogleCloud::ConfigurationController, feature_category: :deployment_management do
let_it_be(:project) { create(:project, :public) }
let_it_be(:url) { project_google_cloud_configuration_path(project) }
diff --git a/spec/requests/projects/google_cloud/databases_controller_spec.rb b/spec/requests/projects/google_cloud/databases_controller_spec.rb
index 98e83610600..fa978a3921f 100644
--- a/spec/requests/projects/google_cloud/databases_controller_spec.rb
+++ b/spec/requests/projects/google_cloud/databases_controller_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Projects::GoogleCloud::DatabasesController, :snowplow, feature_category: :kubernetes_management do
+RSpec.describe Projects::GoogleCloud::DatabasesController, :snowplow, feature_category: :deployment_management do
shared_examples 'shared examples for database controller endpoints' do
include_examples 'requires `admin_project_google_cloud` role'
diff --git a/spec/requests/projects/google_cloud/deployments_controller_spec.rb b/spec/requests/projects/google_cloud/deployments_controller_spec.rb
index 14214b8fdfb..e9eac1e7ecd 100644
--- a/spec/requests/projects/google_cloud/deployments_controller_spec.rb
+++ b/spec/requests/projects/google_cloud/deployments_controller_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Projects::GoogleCloud::DeploymentsController, feature_category: :kubernetes_management do
+RSpec.describe Projects::GoogleCloud::DeploymentsController, feature_category: :deployment_management do
let_it_be(:project) { create(:project, :public, :repository) }
let_it_be(:repository) { project.repository }
diff --git a/spec/requests/projects/google_cloud/gcp_regions_controller_spec.rb b/spec/requests/projects/google_cloud/gcp_regions_controller_spec.rb
index de4b96a2e01..da000ec00c0 100644
--- a/spec/requests/projects/google_cloud/gcp_regions_controller_spec.rb
+++ b/spec/requests/projects/google_cloud/gcp_regions_controller_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Projects::GoogleCloud::GcpRegionsController, feature_category: :kubernetes_management do
+RSpec.describe Projects::GoogleCloud::GcpRegionsController, feature_category: :deployment_management do
let_it_be(:project) { create(:project, :public, :repository) }
let_it_be(:repository) { project.repository }
diff --git a/spec/requests/projects/google_cloud/revoke_oauth_controller_spec.rb b/spec/requests/projects/google_cloud/revoke_oauth_controller_spec.rb
index 5965953cf6f..427eff8cd76 100644
--- a/spec/requests/projects/google_cloud/revoke_oauth_controller_spec.rb
+++ b/spec/requests/projects/google_cloud/revoke_oauth_controller_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Projects::GoogleCloud::RevokeOauthController, feature_category: :kubernetes_management do
+RSpec.describe Projects::GoogleCloud::RevokeOauthController, feature_category: :deployment_management do
include SessionHelpers
describe 'POST #create', :snowplow, :clean_gitlab_redis_sessions, :aggregate_failures do
diff --git a/spec/requests/projects/google_cloud/service_accounts_controller_spec.rb b/spec/requests/projects/google_cloud/service_accounts_controller_spec.rb
index 9b048f814ef..29d4154329f 100644
--- a/spec/requests/projects/google_cloud/service_accounts_controller_spec.rb
+++ b/spec/requests/projects/google_cloud/service_accounts_controller_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Projects::GoogleCloud::ServiceAccountsController, feature_category: :kubernetes_management do
+RSpec.describe Projects::GoogleCloud::ServiceAccountsController, feature_category: :deployment_management do
let_it_be(:project) { create(:project, :public) }
describe 'GET index', :snowplow do
diff --git a/spec/rubocop/cop/rspec/invalid_feature_category_spec.rb b/spec/rubocop/cop/rspec/invalid_feature_category_spec.rb
index 0d2fd029a13..e5287f7105e 100644
--- a/spec/rubocop/cop/rspec/invalid_feature_category_spec.rb
+++ b/spec/rubocop/cop/rspec/invalid_feature_category_spec.rb
@@ -17,7 +17,7 @@ RSpec.describe RuboCop::Cop::RSpec::InvalidFeatureCategory, feature_category: :t
it 'flags invalid feature category in nested context' do
expect_offense(<<~RUBY, valid: valid_category, invalid: invalid_category)
- RSpec.describe 'foo', feature_category: :%{valid} do
+ RSpec.describe 'foo', feature_category: :"%{valid}" do
context 'bar', foo: :bar, feature_category: :%{invalid} do
^^{invalid} Please use a valid feature category. See https://docs.gitlab.com/ee/development/feature_categorization/#rspec-examples.
end
@@ -27,7 +27,7 @@ RSpec.describe RuboCop::Cop::RSpec::InvalidFeatureCategory, feature_category: :t
it 'flags invalid feature category in examples' do
expect_offense(<<~RUBY, valid: valid_category, invalid: invalid_category)
- RSpec.describe 'foo', feature_category: :%{valid} do
+ RSpec.describe 'foo', feature_category: :"%{valid}" do
it 'bar', feature_category: :%{invalid} do
^^{invalid} Please use a valid feature category. See https://docs.gitlab.com/ee/development/feature_categorization/#rspec-examples.
end
@@ -37,9 +37,9 @@ RSpec.describe RuboCop::Cop::RSpec::InvalidFeatureCategory, feature_category: :t
it 'does not flag if feature category is valid' do
expect_no_offenses(<<~RUBY)
- RSpec.describe 'foo', feature_category: :#{valid_category} do
- context 'bar', feature_category: :#{valid_category} do
- it 'baz', feature_category: :#{valid_category} do
+ RSpec.describe 'foo', feature_category: :"#{valid_category}" do
+ context 'bar', feature_category: :"#{valid_category}" do
+ it 'baz', feature_category: :"#{valid_category}" do
end
end
end
@@ -50,8 +50,8 @@ RSpec.describe RuboCop::Cop::RSpec::InvalidFeatureCategory, feature_category: :t
mistyped = make_typo(valid_category)
expect_offense(<<~RUBY, invalid: mistyped, valid: valid_category)
- RSpec.describe 'foo', feature_category: :%{invalid} do
- ^^{invalid} Please use a valid feature category. Did you mean `:%{valid}`? See [...]
+ RSpec.describe 'foo', feature_category: :"%{invalid}" do
+ ^^^^{invalid} Please use a valid feature category. Did you mean `:%{valid}`? See [...]
end
RUBY
end
diff --git a/spec/services/ci/generate_kubeconfig_service_spec.rb b/spec/services/ci/generate_kubeconfig_service_spec.rb
index 913aaf11d7d..a03c6ef0c9d 100644
--- a/spec/services/ci/generate_kubeconfig_service_spec.rb
+++ b/spec/services/ci/generate_kubeconfig_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Ci::GenerateKubeconfigService, feature_category: :kubernetes_management do
+RSpec.describe Ci::GenerateKubeconfigService, feature_category: :deployment_management do
describe '#execute' do
let_it_be(:group) { create(:group) }
let_it_be(:project) { create(:project, group: group) }
diff --git a/spec/services/ci/pipeline_processing/atomic_processing_service_spec.rb b/spec/services/ci/pipeline_processing/atomic_processing_service_spec.rb
index d59d8e24af6..d0496acc6fe 100644
--- a/spec/services/ci/pipeline_processing/atomic_processing_service_spec.rb
+++ b/spec/services/ci/pipeline_processing/atomic_processing_service_spec.rb
@@ -33,25 +33,6 @@ RSpec.describe Ci::PipelineProcessing::AtomicProcessingService, feature_category
end
end
- context 'when the FF ci_simplify_dag_status_calculation_for_processing is disabled' do
- before do
- stub_feature_flags(ci_simplify_dag_status_calculation_for_processing: false)
- end
-
- # This is duplicate of the one above but it is temporary
- it 'follows transitions' do
- expect(pipeline).to be_persisted
- Sidekiq::Worker.drain_all # ensure that all async jobs are executed
- check_expectation(test_file.dig('init', 'expect'), "init")
-
- test_file['transitions'].each_with_index do |transition, idx|
- process_events(transition)
- Sidekiq::Worker.drain_all # ensure that all async jobs are executed
- check_expectation(transition['expect'], "transition:#{idx}")
- end
- end
- end
-
private
def check_expectation(expectation, message)
diff --git a/spec/services/clusters/agent_tokens/create_service_spec.rb b/spec/services/clusters/agent_tokens/create_service_spec.rb
index 519a3ba7ce5..803bd947629 100644
--- a/spec/services/clusters/agent_tokens/create_service_spec.rb
+++ b/spec/services/clusters/agent_tokens/create_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::AgentTokens::CreateService, feature_category: :kubernetes_management do
+RSpec.describe Clusters::AgentTokens::CreateService, feature_category: :deployment_management do
subject(:service) { described_class.new(agent: cluster_agent, current_user: user, params: params) }
let_it_be(:user) { create(:user) }
diff --git a/spec/services/clusters/agent_tokens/revoke_service_spec.rb b/spec/services/clusters/agent_tokens/revoke_service_spec.rb
index 9e511de0a13..a1537658723 100644
--- a/spec/services/clusters/agent_tokens/revoke_service_spec.rb
+++ b/spec/services/clusters/agent_tokens/revoke_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::AgentTokens::RevokeService, feature_category: :kubernetes_management do
+RSpec.describe Clusters::AgentTokens::RevokeService, feature_category: :deployment_management do
describe '#execute' do
subject { described_class.new(token: agent_token, current_user: user).execute }
diff --git a/spec/services/clusters/agent_tokens/track_usage_service_spec.rb b/spec/services/clusters/agent_tokens/track_usage_service_spec.rb
index e9e1a5f7ad9..6bea8afcc80 100644
--- a/spec/services/clusters/agent_tokens/track_usage_service_spec.rb
+++ b/spec/services/clusters/agent_tokens/track_usage_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::AgentTokens::TrackUsageService, feature_category: :kubernetes_management do
+RSpec.describe Clusters::AgentTokens::TrackUsageService, feature_category: :deployment_management do
let_it_be(:agent) { create(:cluster_agent) }
describe '#execute', :clean_gitlab_redis_cache do
diff --git a/spec/services/clusters/agents/authorizations/ci_access/refresh_service_spec.rb b/spec/services/clusters/agents/authorizations/ci_access/refresh_service_spec.rb
index dc803c94ccb..c12592cc071 100644
--- a/spec/services/clusters/agents/authorizations/ci_access/refresh_service_spec.rb
+++ b/spec/services/clusters/agents/authorizations/ci_access/refresh_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Agents::Authorizations::CiAccess::RefreshService, feature_category: :kubernetes_management do
+RSpec.describe Clusters::Agents::Authorizations::CiAccess::RefreshService, feature_category: :deployment_management do
describe '#execute' do
let_it_be(:root_ancestor) { create(:group) }
diff --git a/spec/services/clusters/agents/authorizations/user_access/refresh_service_spec.rb b/spec/services/clusters/agents/authorizations/user_access/refresh_service_spec.rb
index bc0f4ea2846..da546ca44a9 100644
--- a/spec/services/clusters/agents/authorizations/user_access/refresh_service_spec.rb
+++ b/spec/services/clusters/agents/authorizations/user_access/refresh_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Agents::Authorizations::UserAccess::RefreshService, feature_category: :kubernetes_management do
+RSpec.describe Clusters::Agents::Authorizations::UserAccess::RefreshService, feature_category: :deployment_management do
describe '#execute' do
let_it_be(:root_ancestor) { create(:group) }
let_it_be(:agent_management_project) { create(:project, namespace: root_ancestor) }
diff --git a/spec/services/clusters/agents/authorize_proxy_user_service_spec.rb b/spec/services/clusters/agents/authorize_proxy_user_service_spec.rb
index c099d87f6eb..28c36e3aa36 100644
--- a/spec/services/clusters/agents/authorize_proxy_user_service_spec.rb
+++ b/spec/services/clusters/agents/authorize_proxy_user_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Agents::AuthorizeProxyUserService, feature_category: :kubernetes_management do
+RSpec.describe Clusters::Agents::AuthorizeProxyUserService, feature_category: :deployment_management do
subject(:service_response) { service.execute }
let(:service) { described_class.new(user, agent) }
diff --git a/spec/services/clusters/agents/create_activity_event_service_spec.rb b/spec/services/clusters/agents/create_activity_event_service_spec.rb
index 3da8ecddb8d..0d784bb69c7 100644
--- a/spec/services/clusters/agents/create_activity_event_service_spec.rb
+++ b/spec/services/clusters/agents/create_activity_event_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Agents::CreateActivityEventService, feature_category: :kubernetes_management do
+RSpec.describe Clusters::Agents::CreateActivityEventService, feature_category: :deployment_management do
let_it_be(:agent) { create(:cluster_agent) }
let_it_be(:token) { create(:cluster_agent_token, agent: agent) }
let_it_be(:user) { create(:user) }
diff --git a/spec/services/clusters/agents/create_service_spec.rb b/spec/services/clusters/agents/create_service_spec.rb
index dc69dfb5e27..85607fcdf3a 100644
--- a/spec/services/clusters/agents/create_service_spec.rb
+++ b/spec/services/clusters/agents/create_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Agents::CreateService, feature_category: :kubernetes_management do
+RSpec.describe Clusters::Agents::CreateService, feature_category: :deployment_management do
subject(:service) { described_class.new(project, user) }
let(:project) { create(:project, :public, :repository) }
diff --git a/spec/services/clusters/agents/delete_expired_events_service_spec.rb b/spec/services/clusters/agents/delete_expired_events_service_spec.rb
index 892cd5a70ea..7dc9c280ab4 100644
--- a/spec/services/clusters/agents/delete_expired_events_service_spec.rb
+++ b/spec/services/clusters/agents/delete_expired_events_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Agents::DeleteExpiredEventsService, feature_category: :kubernetes_management do
+RSpec.describe Clusters::Agents::DeleteExpiredEventsService, feature_category: :deployment_management do
let_it_be(:agent) { create(:cluster_agent) }
describe '#execute' do
diff --git a/spec/services/clusters/agents/delete_service_spec.rb b/spec/services/clusters/agents/delete_service_spec.rb
index da97cdee4ca..febbb7ba5c8 100644
--- a/spec/services/clusters/agents/delete_service_spec.rb
+++ b/spec/services/clusters/agents/delete_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Agents::DeleteService, feature_category: :kubernetes_management do
+RSpec.describe Clusters::Agents::DeleteService, feature_category: :deployment_management do
subject(:service) { described_class.new(container: project, current_user: user) }
let(:cluster_agent) { create(:cluster_agent) }
diff --git a/spec/services/clusters/build_kubernetes_namespace_service_spec.rb b/spec/services/clusters/build_kubernetes_namespace_service_spec.rb
index b1be3eb4199..fea17495914 100644
--- a/spec/services/clusters/build_kubernetes_namespace_service_spec.rb
+++ b/spec/services/clusters/build_kubernetes_namespace_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::BuildKubernetesNamespaceService, feature_category: :kubernetes_management do
+RSpec.describe Clusters::BuildKubernetesNamespaceService, feature_category: :deployment_management do
let(:cluster) { create(:cluster, :project, :provided_by_gcp) }
let(:environment) { create(:environment) }
let(:project) { environment.project }
diff --git a/spec/services/clusters/build_service_spec.rb b/spec/services/clusters/build_service_spec.rb
index 9e71b7a8115..909d3f58c48 100644
--- a/spec/services/clusters/build_service_spec.rb
+++ b/spec/services/clusters/build_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::BuildService, feature_category: :kubernetes_management do
+RSpec.describe Clusters::BuildService, feature_category: :deployment_management do
describe '#execute' do
subject { described_class.new(cluster_subject).execute }
diff --git a/spec/services/clusters/cleanup/project_namespace_service_spec.rb b/spec/services/clusters/cleanup/project_namespace_service_spec.rb
index 366e4fa9c03..34311d6e830 100644
--- a/spec/services/clusters/cleanup/project_namespace_service_spec.rb
+++ b/spec/services/clusters/cleanup/project_namespace_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Cleanup::ProjectNamespaceService, feature_category: :kubernetes_management do
+RSpec.describe Clusters::Cleanup::ProjectNamespaceService, feature_category: :deployment_management do
describe '#execute' do
subject { service.execute }
diff --git a/spec/services/clusters/cleanup/service_account_service_spec.rb b/spec/services/clusters/cleanup/service_account_service_spec.rb
index 881ec85b3d5..d6b5d1a5d5c 100644
--- a/spec/services/clusters/cleanup/service_account_service_spec.rb
+++ b/spec/services/clusters/cleanup/service_account_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Cleanup::ServiceAccountService, feature_category: :kubernetes_management do
+RSpec.describe Clusters::Cleanup::ServiceAccountService, feature_category: :deployment_management do
describe '#execute' do
subject { service.execute }
diff --git a/spec/services/clusters/create_service_spec.rb b/spec/services/clusters/create_service_spec.rb
index 0d170f66f4a..f14cd772545 100644
--- a/spec/services/clusters/create_service_spec.rb
+++ b/spec/services/clusters/create_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::CreateService, feature_category: :kubernetes_management do
+RSpec.describe Clusters::CreateService, feature_category: :deployment_management do
let(:access_token) { 'xxx' }
let(:project) { create(:project) }
let(:user) { create(:user) }
diff --git a/spec/services/clusters/destroy_service_spec.rb b/spec/services/clusters/destroy_service_spec.rb
index 2bc0099ff04..dd3e24d0e12 100644
--- a/spec/services/clusters/destroy_service_spec.rb
+++ b/spec/services/clusters/destroy_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::DestroyService, feature_category: :kubernetes_management do
+RSpec.describe Clusters::DestroyService, feature_category: :deployment_management do
describe '#execute' do
subject { described_class.new(cluster.user, params).execute(cluster) }
diff --git a/spec/services/clusters/integrations/create_service_spec.rb b/spec/services/clusters/integrations/create_service_spec.rb
index fa47811dc6b..b716e4f4651 100644
--- a/spec/services/clusters/integrations/create_service_spec.rb
+++ b/spec/services/clusters/integrations/create_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Integrations::CreateService, '#execute', feature_category: :kubernetes_management do
+RSpec.describe Clusters::Integrations::CreateService, '#execute', feature_category: :deployment_management do
let_it_be(:project) { create(:project) }
let_it_be_with_reload(:cluster) { create(:cluster, :provided_by_gcp, projects: [project]) }
diff --git a/spec/services/clusters/integrations/prometheus_health_check_service_spec.rb b/spec/services/clusters/integrations/prometheus_health_check_service_spec.rb
index 2d527bb0872..9390d4b368b 100644
--- a/spec/services/clusters/integrations/prometheus_health_check_service_spec.rb
+++ b/spec/services/clusters/integrations/prometheus_health_check_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Integrations::PrometheusHealthCheckService, '#execute', feature_category: :kubernetes_management do
+RSpec.describe Clusters::Integrations::PrometheusHealthCheckService, '#execute', feature_category: :deployment_management do
let(:service) { described_class.new(cluster) }
subject { service.execute }
diff --git a/spec/services/clusters/kubernetes/create_or_update_namespace_service_spec.rb b/spec/services/clusters/kubernetes/create_or_update_namespace_service_spec.rb
index 8ae34e4f9ab..7e61d690ddd 100644
--- a/spec/services/clusters/kubernetes/create_or_update_namespace_service_spec.rb
+++ b/spec/services/clusters/kubernetes/create_or_update_namespace_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Kubernetes::CreateOrUpdateNamespaceService, '#execute', feature_category: :kubernetes_management do
+RSpec.describe Clusters::Kubernetes::CreateOrUpdateNamespaceService, '#execute', feature_category: :deployment_management do
include KubernetesHelpers
let(:cluster) { create(:cluster, :project, :provided_by_gcp) }
diff --git a/spec/services/clusters/kubernetes/create_or_update_service_account_service_spec.rb b/spec/services/clusters/kubernetes/create_or_update_service_account_service_spec.rb
index bdf46c19e36..ab0c5691b06 100644
--- a/spec/services/clusters/kubernetes/create_or_update_service_account_service_spec.rb
+++ b/spec/services/clusters/kubernetes/create_or_update_service_account_service_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require 'spec_helper'
-RSpec.describe Clusters::Kubernetes::CreateOrUpdateServiceAccountService, feature_category: :kubernetes_management do
+RSpec.describe Clusters::Kubernetes::CreateOrUpdateServiceAccountService, feature_category: :deployment_management do
include KubernetesHelpers
let(:api_url) { 'http://111.111.111.111' }
diff --git a/spec/services/clusters/kubernetes/fetch_kubernetes_token_service_spec.rb b/spec/services/clusters/kubernetes/fetch_kubernetes_token_service_spec.rb
index 2b77df1eb6d..439dc37e684 100644
--- a/spec/services/clusters/kubernetes/fetch_kubernetes_token_service_spec.rb
+++ b/spec/services/clusters/kubernetes/fetch_kubernetes_token_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Kubernetes::FetchKubernetesTokenService, feature_category: :kubernetes_management do
+RSpec.describe Clusters::Kubernetes::FetchKubernetesTokenService, feature_category: :deployment_management do
include KubernetesHelpers
describe '#execute' do
diff --git a/spec/services/clusters/kubernetes_spec.rb b/spec/services/clusters/kubernetes_spec.rb
index 7e22c2f95df..cd430f81a65 100644
--- a/spec/services/clusters/kubernetes_spec.rb
+++ b/spec/services/clusters/kubernetes_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Kubernetes, feature_category: :kubernetes_management do
+RSpec.describe Clusters::Kubernetes, feature_category: :deployment_management do
it { is_expected.to be_const_defined(:GITLAB_SERVICE_ACCOUNT_NAME) }
it { is_expected.to be_const_defined(:GITLAB_SERVICE_ACCOUNT_NAMESPACE) }
it { is_expected.to be_const_defined(:GITLAB_ADMIN_TOKEN_NAME) }
diff --git a/spec/services/clusters/management/validate_management_project_permissions_service_spec.rb b/spec/services/clusters/management/validate_management_project_permissions_service_spec.rb
index 8a49d90aa48..46032de600d 100644
--- a/spec/services/clusters/management/validate_management_project_permissions_service_spec.rb
+++ b/spec/services/clusters/management/validate_management_project_permissions_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Management::ValidateManagementProjectPermissionsService, feature_category: :kubernetes_management do
+RSpec.describe Clusters::Management::ValidateManagementProjectPermissionsService, feature_category: :deployment_management do
describe '#execute' do
subject { described_class.new(user).execute(cluster, management_project_id) }
diff --git a/spec/services/clusters/update_service_spec.rb b/spec/services/clusters/update_service_spec.rb
index 31661d30f41..cc759407376 100644
--- a/spec/services/clusters/update_service_spec.rb
+++ b/spec/services/clusters/update_service_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::UpdateService, feature_category: :kubernetes_management do
+RSpec.describe Clusters::UpdateService, feature_category: :deployment_management do
include KubernetesHelpers
describe '#execute' do
diff --git a/spec/services/issues/create_service_spec.rb b/spec/services/issues/create_service_spec.rb
index 88dcc870ee7..46c2f03dadc 100644
--- a/spec/services/issues/create_service_spec.rb
+++ b/spec/services/issues/create_service_spec.rb
@@ -381,6 +381,13 @@ RSpec.describe Issues::CreateService, feature_category: :team_planning do
expect(assignee.assigned_open_issues_count).to eq 1
end
+
+ it 'records the assignee assignment event' do
+ result = described_class.new(container: project, current_user: user, params: opts, spam_params: spam_params).execute
+
+ issue = result.payload[:issue]
+ expect(issue.assignment_events).to match([have_attributes(user_id: assignee.id, action: 'add')])
+ end
end
context 'when duplicate label titles are given' do
diff --git a/spec/services/issues/update_service_spec.rb b/spec/services/issues/update_service_spec.rb
index 167bff2a492..14b0a8b1cc1 100644
--- a/spec/services/issues/update_service_spec.rb
+++ b/spec/services/issues/update_service_spec.rb
@@ -1159,6 +1159,39 @@ RSpec.describe Issues::UpdateService, :mailer, feature_category: :team_planning
end
end
end
+
+ it 'tracks the assignment events' do
+ original_assignee = issue.assignees.first!
+
+ update_issue(assignee_ids: [user2.id])
+ update_issue(assignee_ids: [])
+ update_issue(assignee_ids: [user3.id])
+
+ expected_events = [
+ have_attributes({
+ issue_id: issue.id,
+ user_id: original_assignee.id,
+ action: 'remove'
+ }),
+ have_attributes({
+ issue_id: issue.id,
+ user_id: user2.id,
+ action: 'add'
+ }),
+ have_attributes({
+ issue_id: issue.id,
+ user_id: user2.id,
+ action: 'remove'
+ }),
+ have_attributes({
+ issue_id: issue.id,
+ user_id: user3.id,
+ action: 'add'
+ })
+ ]
+
+ expect(issue.assignment_events).to match_array(expected_events)
+ end
end
context 'updating mentions' do
diff --git a/spec/services/merge_requests/create_service_spec.rb b/spec/services/merge_requests/create_service_spec.rb
index af77abf252c..efbd693fc82 100644
--- a/spec/services/merge_requests/create_service_spec.rb
+++ b/spec/services/merge_requests/create_service_spec.rb
@@ -445,13 +445,21 @@ RSpec.describe MergeRequests::CreateService, :clean_gitlab_redis_shared_state, f
}
end
- it 'invalidates open merge request counter for assignees when merge request is assigned' do
+ before do
project.add_maintainer(user2)
+ end
+ it 'invalidates open merge request counter for assignees when merge request is assigned' do
described_class.new(project: project, current_user: user, params: opts).execute
expect(user2.assigned_open_merge_requests_count).to eq 1
end
+
+ it 'records the assignee assignment event', :sidekiq_inline do
+ mr = described_class.new(project: project, current_user: user, params: opts).execute.reload
+
+ expect(mr.assignment_events).to match([have_attributes(user_id: user2.id, action: 'add')])
+ end
end
context "when issuable feature is private" do
diff --git a/spec/services/merge_requests/update_service_spec.rb b/spec/services/merge_requests/update_service_spec.rb
index e20ebf18e7c..000c85fd1f8 100644
--- a/spec/services/merge_requests/update_service_spec.rb
+++ b/spec/services/merge_requests/update_service_spec.rb
@@ -782,6 +782,27 @@ RSpec.describe MergeRequests::UpdateService, :mailer, feature_category: :code_re
expect(user3.assigned_open_merge_requests_count).to eq 0
expect(user2.assigned_open_merge_requests_count).to eq 1
end
+
+ it 'records the assignment history', :sidekiq_inline do
+ original_assignee = merge_request.assignees.first!
+
+ update_merge_request(assignee_ids: [user2.id])
+
+ expected_events = [
+ have_attributes({
+ merge_request_id: merge_request.id,
+ user_id: original_assignee.id,
+ action: 'remove'
+ }),
+ have_attributes({
+ merge_request_id: merge_request.id,
+ user_id: user2.id,
+ action: 'add'
+ })
+ ]
+
+ expect(merge_request.assignment_events).to match_array(expected_events)
+ end
end
context 'when the target branch changes' do
diff --git a/spec/services/spam/spam_verdict_service_spec.rb b/spec/services/spam/spam_verdict_service_spec.rb
index 42993491459..e6845517aa7 100644
--- a/spec/services/spam/spam_verdict_service_spec.rb
+++ b/spec/services/spam/spam_verdict_service_spec.rb
@@ -318,11 +318,13 @@ RSpec.describe Spam::SpamVerdictService, feature_category: :instance_resiliency
::Spam::SpamConstants::CONDITIONAL_ALLOW,
::Spam::SpamConstants::DISALLOW,
::Spam::SpamConstants::BLOCK_USER].each do |verdict_value|
- let(:verdict) { verdict_value }
- let(:expected) { [verdict_value, attribs] }
+ context "with verdict_value:#{verdict_value}" do
+ let(:verdict) { verdict_value }
+ let(:expected) { [verdict_value, attribs] }
- it "returns expected spam constant" do
- expect(subject).to eq(expected)
+ it "returns expected spam constant" do
+ expect(subject).to eq(expected)
+ end
end
end
end
diff --git a/spec/support/shared_examples/features/rss_shared_examples.rb b/spec/support/shared_examples/features/rss_shared_examples.rb
index ad865b084e1..29ecbd0dc0e 100644
--- a/spec/support/shared_examples/features/rss_shared_examples.rb
+++ b/spec/support/shared_examples/features/rss_shared_examples.rb
@@ -13,6 +13,12 @@ RSpec.shared_examples "it has an RSS button with current_user's feed token" do
end
end
+RSpec.shared_examples "it has an RSS link with current_user's feed token" do
+ it "shows the RSS link with current_user's feed token" do
+ expect(page).to have_link 'Subscribe to RSS feed', href: /feed_token=#{user.feed_token}/
+ end
+end
+
RSpec.shared_examples "an autodiscoverable RSS feed without a feed token" do
it "has an RSS autodiscovery link tag without a feed token" do
expect(page).to have_css("link[type*='atom+xml']:not([href*='feed_token'])", visible: false)
@@ -26,6 +32,13 @@ RSpec.shared_examples "it has an RSS button without a feed token" do
end
end
+RSpec.shared_examples "it has an RSS link without a feed token" do
+ it "shows the RSS link without a feed token" do
+ expect(page).to have_link 'Subscribe to RSS feed'
+ expect(page).not_to have_link 'Subscribe to RSS feed', href: /feed_token/
+ end
+end
+
RSpec.shared_examples "updates atom feed link" do |type|
it "for #{type}" do
sign_in(user)
diff --git a/spec/tooling/danger/stable_branch_spec.rb b/spec/tooling/danger/stable_branch_spec.rb
index b0a8ab3c132..fc644413a5a 100644
--- a/spec/tooling/danger/stable_branch_spec.rb
+++ b/spec/tooling/danger/stable_branch_spec.rb
@@ -351,4 +351,26 @@ RSpec.describe Tooling::Danger::StableBranch, feature_category: :delivery do
it { is_expected.to eq(result) }
end
end
+
+ describe '#valid_stable_branch?' do
+ it "returns false when on the default branch" do
+ allow(fake_helper).to receive(:mr_target_branch).and_return('main')
+
+ expect(stable_branch.valid_stable_branch?).to be(false)
+ end
+
+ it "returns true when on a stable branch" do
+ allow(fake_helper).to receive(:mr_target_branch).and_return('15-1-stable-ee')
+ allow(fake_helper).to receive(:security_mr?).and_return(false)
+
+ expect(stable_branch.valid_stable_branch?).to be(true)
+ end
+
+ it "returns false when on a stable branch on a security MR" do
+ allow(fake_helper).to receive(:mr_target_branch).and_return('15-1-stable-ee')
+ allow(fake_helper).to receive(:security_mr?).and_return(true)
+
+ expect(stable_branch.valid_stable_branch?).to be(false)
+ end
+ end
end
diff --git a/spec/workers/clusters/agents/delete_expired_events_worker_spec.rb b/spec/workers/clusters/agents/delete_expired_events_worker_spec.rb
index b439df4e119..8f2bd189d5c 100644
--- a/spec/workers/clusters/agents/delete_expired_events_worker_spec.rb
+++ b/spec/workers/clusters/agents/delete_expired_events_worker_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Agents::DeleteExpiredEventsWorker, feature_category: :kubernetes_management do
+RSpec.describe Clusters::Agents::DeleteExpiredEventsWorker, feature_category: :deployment_management do
let(:agent) { create(:cluster_agent) }
describe '#perform' do
diff --git a/spec/workers/clusters/applications/activate_integration_worker_spec.rb b/spec/workers/clusters/applications/activate_integration_worker_spec.rb
index 40a774e1818..58b133aa6de 100644
--- a/spec/workers/clusters/applications/activate_integration_worker_spec.rb
+++ b/spec/workers/clusters/applications/activate_integration_worker_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Applications::ActivateIntegrationWorker, '#perform', feature_category: :kubernetes_management do
+RSpec.describe Clusters::Applications::ActivateIntegrationWorker, '#perform', feature_category: :deployment_management do
context 'when cluster exists' do
describe 'prometheus integration' do
let(:integration_name) { 'prometheus' }
diff --git a/spec/workers/clusters/applications/deactivate_integration_worker_spec.rb b/spec/workers/clusters/applications/deactivate_integration_worker_spec.rb
index f02ad18c7cc..5f7cd786ea3 100644
--- a/spec/workers/clusters/applications/deactivate_integration_worker_spec.rb
+++ b/spec/workers/clusters/applications/deactivate_integration_worker_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Applications::DeactivateIntegrationWorker, '#perform', feature_category: :kubernetes_management do
+RSpec.describe Clusters::Applications::DeactivateIntegrationWorker, '#perform', feature_category: :deployment_management do
context 'when cluster exists' do
describe 'prometheus integration' do
let(:integration_name) { 'prometheus' }
diff --git a/spec/workers/clusters/cleanup/project_namespace_worker_spec.rb b/spec/workers/clusters/cleanup/project_namespace_worker_spec.rb
index 008ac5249da..7119664d706 100644
--- a/spec/workers/clusters/cleanup/project_namespace_worker_spec.rb
+++ b/spec/workers/clusters/cleanup/project_namespace_worker_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Cleanup::ProjectNamespaceWorker, feature_category: :kubernetes_management do
+RSpec.describe Clusters::Cleanup::ProjectNamespaceWorker, feature_category: :deployment_management do
describe '#perform' do
context 'when cluster.cleanup_status is cleanup_removing_project_namespaces' do
let!(:cluster) { create(:cluster, :with_environments, :cleanup_removing_project_namespaces) }
diff --git a/spec/workers/clusters/cleanup/service_account_worker_spec.rb b/spec/workers/clusters/cleanup/service_account_worker_spec.rb
index 0d4df795278..cc388841c91 100644
--- a/spec/workers/clusters/cleanup/service_account_worker_spec.rb
+++ b/spec/workers/clusters/cleanup/service_account_worker_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Clusters::Cleanup::ServiceAccountWorker, feature_category: :kubernetes_management do
+RSpec.describe Clusters::Cleanup::ServiceAccountWorker, feature_category: :deployment_management do
describe '#perform' do
let!(:cluster) { create(:cluster, :cleanup_removing_service_account) }
diff --git a/spec/workers/concerns/cluster_agent_queue_spec.rb b/spec/workers/concerns/cluster_agent_queue_spec.rb
index c30616d04e1..77417601748 100644
--- a/spec/workers/concerns/cluster_agent_queue_spec.rb
+++ b/spec/workers/concerns/cluster_agent_queue_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe ClusterAgentQueue, feature_category: :kubernetes_management do
+RSpec.describe ClusterAgentQueue, feature_category: :deployment_management do
let(:worker) do
Class.new do
def self.name
@@ -14,5 +14,5 @@ RSpec.describe ClusterAgentQueue, feature_category: :kubernetes_management do
end
end
- it { expect(worker.get_feature_category).to eq(:kubernetes_management) }
+ it { expect(worker.get_feature_category).to eq(:deployment_management) }
end
diff --git a/tooling/danger/stable_branch.rb b/tooling/danger/stable_branch.rb
index 2751a6f0191..9deb4838079 100644
--- a/tooling/danger/stable_branch.rb
+++ b/tooling/danger/stable_branch.rb
@@ -85,12 +85,12 @@ module Tooling
!has_flaky_failure_label?
end
- private
-
def valid_stable_branch?
!!stable_target_branch && !helper.security_mr?
end
+ private
+
def package_and_test_bridge_and_pipeline_status
mr_head_pipeline_id = gitlab.mr_json.dig('head_pipeline', 'id')
return unless mr_head_pipeline_id