From 3e5162fc5b7b59cf69ba905d84a862b5b8eedf30 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 23 Jan 2025 12:29:34 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .rubocop_todo/lint/symbol_conversion.yml | 1 - .../style/class_and_module_children.yml | 1 - GITALY_SERVER_VERSION | 2 +- .../admin/jobs_table/admin_jobs_table_app.vue | 6 +- .../components/assigned_users.vue | 48 +- .../pages/admin/jobs/index/index.js | 4 +- .../components/project_delete_button.vue | 5 + .../components/shared/delete_button.vue | 10 +- .../projects/project_delete_button.js | 2 + .../components/inbound_token_access.vue | 48 +- .../javascripts/token_access/constants.js | 3 + .../vue_shared/components/crud_component.vue | 2 +- .../admin/application_settings_controller.rb | 471 +++++++++--------- app/controllers/admin/jobs_controller.rb | 2 + .../oauth/authorizations_controller.rb | 3 + .../projects/settings/ci_cd_controller.rb | 1 + app/events/merge_requests/approved_event.rb | 3 +- app/finders/ci/jobs_finder.rb | 2 +- app/helpers/admin/jobs_helper.rb | 14 + app/helpers/projects_helper.rb | 14 +- app/models/merge_request/approval_metrics.rb | 24 + app/policies/global_policy.rb | 3 + ...ct_aggregate_pipeline_analytics_service.rb | 2 +- app/services/ci/register_job_service.rb | 50 +- .../merge_requests/approval_service.rb | 3 +- app/views/admin/jobs/index.html.haml | 2 +- .../settings/_permanent_deletion.html.haml | 4 +- .../groups/settings/_remove_button.html.haml | 3 +- app/views/projects/_delete.html.haml | 5 +- .../projects/_delete_immediately.html.haml | 4 +- ...ntication_logs_migration_for_allowlist.yml | 9 + ...omatic_lock_writes_on_partition_tables.yml | 2 +- .../ops/automatic_lock_writes_on_table.yml | 2 +- .../detect_cross_database_modification.yml | 2 +- .../ops/lock_tables_in_monitoring.yml | 2 +- .../ops/loose_foreign_keys_turbo_mode_ci.yml | 2 +- .../loose_foreign_keys_turbo_mode_main.yml | 2 +- .../ops/monitor_database_locked_tables.yml | 2 +- .../query_analyzer_gitlab_schema_metrics.yml | 2 +- ...olumn_information_on_statement_invalid.yml | 2 +- ...mplates_security_api_discovery_monthly.yml | 3 - .../20230217215050_ci_internal_pipelines.yml | 3 - ..._entities_group_finished_with_failures.yml | 3 - ...tities_group_finished_without_failures.yml | 3 - ...ntities_project_finished_with_failures.yml | 3 - ...ties_project_finished_without_failures.yml | 3 - ...ithub_import_project_cancelled_monthly.yml | 3 - ...rt_project_partially_completed_monthly.yml | 3 - ...container_registry_writes_user_monthly.yml | 3 - ...0420160442_i_quickactions_type_monthly.yml | 3 - .../20230502171807_ci_interpolation_users.yml | 3 - ..._templates_security_bas_latest_monthly.yml | 3 - ...2402_p_ci_templates_pages_zola_monthly.yml | 3 - .../counts_28d/20230531170613_ci_builds.yml | 3 - ..._jetbrains_bundled_api_request_monthly.yml | 3 - ...13085814_i_quickactions_unlink_monthly.yml | 3 - ...ts_unique_agents_via_ci_access_monthly.yml | 3 - ..._unique_agents_via_user_access_monthly.yml | 3 - ...sts_unique_users_via_ci_access_monthly.yml | 3 - ...s_unique_users_via_user_access_monthly.yml | 3 - ..._push_notified_unique_projects_monthly.yml | 3 - ...de_review_saved_replies_create_monthly.yml | 3 - ..._code_review_saved_replies_use_monthly.yml | 3 - ...review_saved_replies_use_in_mr_monthly.yml | 3 - ...157_count_cicd_component_usage_monthly.yml | 2 - ...iew_saved_replies_use_in_other_monthly.yml | 3 - ...s_unique_agents_via_pat_access_monthly.yml | 3 - ...ts_unique_users_via_pat_access_monthly.yml | 3 - ...30153031_p_ci_templates_cosign_monthly.yml | 3 - ...5305_i_quickactions_set_parent_monthly.yml | 3 - ...52527_i_quickactions_add_child_monthly.yml | 3 - ..._p_ci_templates_diffblue_cover_monthly.yml | 3 - ..._users_updating_work_item_todo_monthly.yml | 3 - ...registry_push_tag_deploy_token_monthly.yml | 3 - ...gistry_delete_tag_deploy_token_monthly.yml | 3 - ...y_push_repository_deploy_token_monthly.yml | 3 - ...delete_repository_deploy_token_monthly.yml | 3 - ...create_repository_deploy_token_monthly.yml | 3 - ...4_i_quickactions_remove_parent_monthly.yml | 3 - ...templates_opentofu_base_latest_monthly.yml | 3 - ...p_ci_templates_opentofu_latest_monthly.yml | 3 - ...27_i_quickactions_remove_child_monthly.yml | 3 - ...65317_i_quickactions_remind_me_monthly.yml | 3 - ...s_security_api_security_latest_monthly.yml | 3 - ...emplates_security_api_security_monthly.yml | 3 - ...t_label_from_render_glql_block_monthly.yml | 3 - ...amespace_id_from_pull_ml_model_monthly.yml | 3 - ...amespace_id_from_push_ml_model_monthly.yml | 3 - ..._ci_catalog_component_included_monthly.yml | 3 - ...oject_id_from_ci_template_included_28d.yml | 3 - ...oject_id_from_click_delete_pod_monthly.yml | 3 - ...om_create_ci_internal_pipeline_monthly.yml | 3 - ...ipeline_with_repository_source_monthly.yml | 3 - ...d_from_create_pages_deployment_monthly.yml | 3 - ...oject_id_from_create_wiki_page_monthly.yml | 3 - ...from_create_wiki_page_template_monthly.yml | 3 - ...oject_id_from_delete_wiki_page_monthly.yml | 3 - ...from_delete_wiki_page_template_monthly.yml | 3 - ...isable_inbound_job_token_scope_monthly.yml | 3 - ...enable_inbound_job_token_scope_monthly.yml | 3 - ...m_job_token_cross_project_auth_monthly.yml | 3 - ...om_job_token_same_project_auth_monthly.yml | 3 - ..._project_id_from_pull_ml_model_monthly.yml | 3 - ..._project_id_from_push_ml_model_monthly.yml | 3 - ..._id_from_register_agent_at_kas_monthly.yml | 3 - ...oject_id_from_update_wiki_page_monthly.yml | 3 - ...from_update_wiki_page_template_monthly.yml | 3 - ...project_id_from_view_wiki_page_monthly.yml | 3 - ...er_id_from_apply_wiki_template_monthly.yml | 3 - ...er_id_from_branch_rule_details_monthly.yml | 2 - ..._id_from_branch_rules_settings_monthly.yml | 2 - ...oped_search_to_advanced_search_monthly.yml | 3 - ...ick_blame_control_on_blob_page_monthly.yml | 3 - ...ck_blob_results_show_more_less_monthly.yml | 3 - ...click_chunk_blame_on_blob_page_monthly.yml | 3 - ...tton_in_multimatch_file_header_monthly.yml | 3 - ...ds_sub_menu_in_command_palette_monthly.yml | 3 - ...lter_toggle_bot_comments_in_mr_monthly.yml | 3 - ...ter_toggle_user_comments_in_mr_monthly.yml | 3 - ..._user_id_from_click_delete_pod_monthly.yml | 3 - ...click_expand_panel_on_settings_monthly.yml | 3 - ...ick_explore_in_command_palette_monthly.yml | 3 - ...ile_button_on_repository_pages_monthly.yml | 3 - ...quent_group_in_command_palette_monthly.yml | 3 - ...ent_project_in_command_palette_monthly.yml | 3 - ...from_click_go_to_file_shortcut_monthly.yml | 3 - ...roup_result_in_command_palette_monthly.yml | 3 - ...oped_search_to_advanced_search_monthly.yml | 3 - ...ick_header_link_of_blob_result_monthly.yml | 3 - ...k_history_control_on_blob_page_monthly.yml | 3 - ...ssue_result_in_command_palette_monthly.yml | 3 - ...igned_to_me_in_command_palette_monthly.yml | 3 - ...s_i_created_in_command_palette_monthly.yml | 3 - ...uest_result_in_command_palette_monthly.yml | 3 - ...igned_to_me_in_command_palette_monthly.yml | 3 - ...s_i_created_in_command_palette_monthly.yml | 3 - ..._a_reviewer_in_command_palette_monthly.yml | 3 - ...k_new_project_projects_explore_monthly.yml | 3 - ...ick_outside_of_command_palette_monthly.yml | 3 - ...preferences_in_command_palette_monthly.yml | 3 - ...ck_previous_blame_on_blob_page_monthly.yml | 3 - ...lick_print_as_pdf_in_wiki_page_monthly.yml | 3 - ...ick_profile_in_command_palette_monthly.yml | 3 - ...ject_result_in_command_palette_monthly.yml | 3 - ...oped_search_to_advanced_search_monthly.yml | 3 - ...ect_setting_in_command_palette_monthly.yml | 3 - ...epic_result_in_command_palette_monthly.yml | 3 - ...ssue_result_in_command_palette_monthly.yml | 3 - ...uest_result_in_command_palette_monthly.yml | 3 - ...ext_button_repository_settings_monthly.yml | 3 - ...lick_ref_selector_on_blob_page_monthly.yml | 3 - ...ex_button_in_search_page_input_monthly.yml | 3 - ...lob_button_repository_settings_monthly.yml | 3 - ..._search_blob_result_blame_line_monthly.yml | 3 - ..._click_search_blob_result_line_monthly.yml | 3 - ...on_to_activate_command_palette_monthly.yml | 3 - ...er_id_from_click_search_result_monthly.yml | 3 - ...rom_click_tab_projects_explore_monthly.yml | 3 - ...on_to_activate_command_palette_monthly.yml | 3 - ...ck_trigger_flux_reconciliation_monthly.yml | 3 - ...from_click_trigger_flux_resume_monthly.yml | 3 - ...rom_click_trigger_flux_suspend_monthly.yml | 3 - ...user_result_in_command_palette_monthly.yml | 3 - ...all_link_in_pipeline_analytics_monthly.yml | 3 - ...k_your_work_in_command_palette_monthly.yml | 3 - ...e_forks_on_search_results_page_monthly.yml | 3 - ...t_user_id_from_create_ci_build_monthly.yml | 3 - ...om_create_ci_internal_pipeline_monthly.yml | 3 - ...id_from_create_group_wiki_page_monthly.yml | 2 - ...d_from_create_pages_deployment_monthly.yml | 3 - ..._user_id_from_create_wiki_page_monthly.yml | 3 - ...from_create_wiki_page_template_monthly.yml | 3 - ...id_from_delete_group_wiki_page_monthly.yml | 2 - ..._user_id_from_delete_wiki_page_monthly.yml | 3 - ...from_delete_wiki_page_template_monthly.yml | 3 - ..._challenge_during_registration_monthly.yml | 3 - ...quickactions_remove_email_multiple_28d.yml | 3 - ...i_quickactions_remove_email_single_28d.yml | 3 - ..._dashboard_to_old_mr_dashboard_monthly.yml | 3 - ..._dashboard_to_new_mr_dashboard_monthly.yml | 3 - ...open_blame_viewer_on_blob_page_monthly.yml | 3 - ...en_kubernetes_resource_details_monthly.yml | 3 - ...s_at_symbol_in_command_palette_monthly.yml | 3 - ...press_colon_in_command_palette_monthly.yml | 3 - ...press_enter_to_advanced_search_monthly.yml | 3 - ...ress_escape_in_command_palette_monthly.yml | 3 - ...rward_slash_in_command_palette_monthly.yml | 3 - ...reater_than_in_command_palette_monthly.yml | 3 - ...ut_to_activate_command_palette_monthly.yml | 3 - ...user_id_from_render_glql_block_monthly.yml | 3 - ...e_filter_on_merge_request_page_monthly.yml | 3 - ...e_filter_on_merge_request_page_monthly.yml | 3 - ...m_unique_users_visiting_ci_catalog_28d.yml | 3 - ...id_from_update_group_wiki_page_monthly.yml | 2 - ..._user_id_from_update_wiki_page_monthly.yml | 3 - ...from_update_wiki_page_template_monthly.yml | 3 - ...se_filter_bar_projects_explore_monthly.yml | 3 - ...se_pagination_projects_explore_monthly.yml | 3 - ...from_use_sort_projects_explore_monthly.yml | 3 - ...clicks_comment_filter_dropdown_monthly.yml | 3 - ...w_admin_abuse_reports_pageload_monthly.yml | 3 - ...tings_advanced_search_pageload_monthly.yml | 3 - ...on_settings_analytics_pageload_monthly.yml | 3 - ...n_settings_appearance_pageload_monthly.yml | 3 - ...cation_settings_ci_cd_pageload_monthly.yml | 3 - ...tion_settings_general_pageload_monthly.yml | 3 - ...settings_integrations_pageload_monthly.yml | 3 - ...tion_settings_network_pageload_monthly.yml | 3 - ..._settings_preferences_pageload_monthly.yml | 3 - ...on_settings_reporting_pageload_monthly.yml | 3 - ...n_settings_repository_pageload_monthly.yml | 3 - ...on_settings_templates_pageload_monthly.yml | 3 - ...ew_admin_applications_pageload_monthly.yml | 3 - ...view_admin_audit_logs_pageload_monthly.yml | 3 - ...admin_background_jobs_pageload_monthly.yml | 3 - ...background_migrations_pageload_monthly.yml | 3 - ...in_broadcast_messages_pageload_monthly.yml | 3 - ...iew_admin_credentials_pageload_monthly.yml | 3 - ..._view_admin_dashboard_pageload_monthly.yml | 3 - ...iew_admin_deploy_keys_pageload_monthly.yml | 3 - ...admin_dev_ops_reports_pageload_monthly.yml | 3 - ...ew_admin_geo_settings_pageload_monthly.yml | 3 - ..._view_admin_geo_sites_pageload_monthly.yml | 3 - ..._admin_gitaly_servers_pageload_monthly.yml | 3 - ...rom_view_admin_groups_pageload_monthly.yml | 3 - ...ew_admin_health_check_pageload_monthly.yml | 3 - ...from_view_admin_hooks_pageload_monthly.yml | 3 - ..._from_view_admin_jobs_pageload_monthly.yml | 3 - ...rom_view_admin_labels_pageload_monthly.yml | 3 - ...m_view_admin_projects_pageload_monthly.yml | 3 - ..._view_admin_push_rule_pageload_monthly.yml | 3 - ...om_view_admin_runners_pageload_monthly.yml | 3 - ...ew_admin_subscription_pageload_monthly.yml | 3 - ...iew_admin_system_info_pageload_monthly.yml | 3 - ...rom_view_admin_topics_pageload_monthly.yml | 3 - ...ew_admin_usage_trends_pageload_monthly.yml | 3 - ...from_view_admin_users_pageload_monthly.yml | 3 - ...ct_user_id_from_view_wiki_page_monthly.yml | 3 - ...metrics_and_profiling_pageload_monthly.yml | 3 - ...roles_and_permissions_pageload_monthly.yml | 3 - ...gs_sec_and_compliance_pageload_monthly.yml | 3 - ...lter_toggle_bot_comments_in_mr_monthly.yml | 3 - ...ter_toggle_user_comments_in_mr_monthly.yml | 3 - ..._commit_change_to_ciconfigfile_monthly.yml | 3 - .../count_total_create_ci_build_monthly.yml | 3 - ...al_create_ci_internal_pipeline_monthly.yml | 3 - ...nternal_pipeline_with_schedule_monthly.yml | 3 - ...nternal_with_repository_source_monthly.yml | 3 - ...t_total_create_group_wiki_page_monthly.yml | 2 - ...t_total_delete_group_wiki_page_monthly.yml | 2 - ...expand_description_on_workitem_monthly.yml | 3 - ...uickactions_add_email_multiple_monthly.yml | 3 - ..._quickactions_add_email_single_monthly.yml | 3 - ...quickactions_convert_to_ticket_monthly.yml | 3 - ...k_add_to_review_on_changes_tab_monthly.yml | 3 - ..._add_to_review_on_overview_tab_monthly.yml | 3 - ...ck_start_review_on_changes_tab_monthly.yml | 3 - ...k_start_review_on_overview_tab_monthly.yml | 3 - ...al_model_registry_ml_model_created_28d.yml | 3 - ..._registry_ml_model_version_created_28d.yml | 3 - ..._total_package_ml_model_pulled_monthly.yml | 3 - ..._total_package_ml_model_pushed_monthly.yml | 3 - ...push_package_to_registry_conan_monthly.yml | 3 - ...sh_package_to_registry_generic_monthly.yml | 3 - ...ush_package_to_registry_golang_monthly.yml | 3 - ..._push_package_to_registry_helm_monthly.yml | 3 - ...push_package_to_registry_maven_monthly.yml | 3 - ...total_push_package_to_registry_monthly.yml | 3 - ...l_push_package_to_registry_npm_monthly.yml | 3 - ...push_package_to_registry_nuget_monthly.yml | 3 - ..._push_package_to_registry_pypi_monthly.yml | 3 - ...l_push_package_to_registry_rpm_monthly.yml | 3 - ...h_package_to_registry_rubygems_monthly.yml | 3 - ...e_to_registry_terraform_module_monthly.yml | 3 - ...nt_total_register_agent_at_kas_monthly.yml | 3 - ..._request_service_ping_via_rest_monthly.yml | 3 - ...en_kubernetes_resource_details_monthly.yml | 3 - ..._created_with_maintenance_note_monthly.yml | 3 - ...t_total_update_group_wiki_page_monthly.yml | 2 - ...l_use_run_keyword_in_cicd_yaml_monthly.yml | 3 - ...clicks_comment_filter_dropdown_monthly.yml | 3 - ...w_admin_abuse_reports_pageload_monthly.yml | 3 - ...tings_advanced_search_pageload_monthly.yml | 3 - ...on_settings_analytics_pageload_monthly.yml | 3 - ...n_settings_appearance_pageload_monthly.yml | 3 - ...cation_settings_ci_cd_pageload_monthly.yml | 3 - ...tion_settings_general_pageload_monthly.yml | 3 - ...settings_integrations_pageload_monthly.yml | 3 - ...metrics_and_profiling_pageload_monthly.yml | 3 - ...tion_settings_network_pageload_monthly.yml | 3 - ..._settings_preferences_pageload_monthly.yml | 3 - ...on_settings_reporting_pageload_monthly.yml | 3 - ...n_settings_repository_pageload_monthly.yml | 3 - ...roles_and_permissions_pageload_monthly.yml | 3 - ...curity_and_compliance_pageload_monthly.yml | 3 - ...on_settings_templates_pageload_monthly.yml | 3 - ...ew_admin_applications_pageload_monthly.yml | 3 - ...view_admin_audit_logs_pageload_monthly.yml | 3 - ...admin_background_jobs_pageload_monthly.yml | 3 - ...background_migrations_pageload_monthly.yml | 3 - ...in_broadcast_messages_pageload_monthly.yml | 3 - ...iew_admin_credentials_pageload_monthly.yml | 3 - ..._view_admin_dashboard_pageload_monthly.yml | 3 - ...iew_admin_deploy_keys_pageload_monthly.yml | 3 - ...admin_dev_ops_reports_pageload_monthly.yml | 3 - ...ew_admin_geo_settings_pageload_monthly.yml | 3 - ..._view_admin_geo_sites_pageload_monthly.yml | 3 - ..._admin_gitaly_servers_pageload_monthly.yml | 3 - ...tal_view_admin_groups_pageload_monthly.yml | 3 - ...ew_admin_health_check_pageload_monthly.yml | 3 - ...otal_view_admin_hooks_pageload_monthly.yml | 3 - ...total_view_admin_jobs_pageload_monthly.yml | 3 - ...tal_view_admin_labels_pageload_monthly.yml | 3 - ...l_view_admin_projects_pageload_monthly.yml | 3 - ..._view_admin_push_rule_pageload_monthly.yml | 3 - ...al_view_admin_runners_pageload_monthly.yml | 3 - ...ew_admin_subscription_pageload_monthly.yml | 3 - ...iew_admin_system_info_pageload_monthly.yml | 3 - ...tal_view_admin_topics_pageload_monthly.yml | 3 - ...ew_admin_usage_trends_pageload_monthly.yml | 3 - ...otal_view_admin_users_pageload_monthly.yml | 3 - config/sidekiq_queues.yml | 2 + db/docs/merge_request_approval_metrics.yml | 14 + ...7_create_merge_request_approval_metrics.rb | 22 + ...n_key_to_merge_request_approval_metrics.rb | 19 + db/schema_migrations/20241217100247 | 1 + db/schema_migrations/20250114084738 | 1 + db/structure.sql | 19 + doc/administration/admin_area.md | 2 +- doc/administration/instance_limits.md | 2 +- .../invalidate_markdown_cache.md | 2 +- doc/administration/review_abuse_reports.md | 2 +- .../settings/account_and_limit_settings.md | 3 +- .../settings/import_and_export_settings.md | 2 +- .../settings/push_event_activities_limit.md | 2 +- .../settings/security_contact_information.md | 2 +- .../settings/sign_in_restrictions.md | 2 +- doc/administration/snippets/index.md | 4 +- doc/administration/user_settings.md | 2 +- doc/administration/wikis/index.md | 6 +- doc/api/appearance.md | 45 +- doc/api/group_import_export.md | 2 +- doc/api/project_import_export.md | 4 +- doc/api/rest/deprecations.md | 2 +- doc/api/settings.md | 42 +- doc/api/statistics.md | 16 +- doc/security/hardening_nist_800_53.md | 2 +- doc/security/two_factor_authentication.md | 2 +- doc/security/unlock_user.md | 2 +- doc/topics/autodevops/customize.md | 2 +- doc/user/asciidoc.md | 2 +- doc/user/markdown.md | 2 +- doc/user/packages/package_registry/index.md | 4 +- doc/user/profile/personal_access_tokens.md | 2 +- doc/user/profile/preferences.md | 2 +- doc/user/project/codeowners/reference.md | 45 +- .../img/direct_group_members_v17_9.png | Bin 0 -> 30845 bytes .../img/merge_request_maintainers_v17_9.png | Bin 0 -> 9694 bytes doc/user/project/integrations/index.md | 2 +- .../project/integrations/webhook_events.md | 4 +- doc/user/project/settings/import_export.md | 4 +- .../overdue_finalize_background_migration.rb | 29 +- locale/gitlab.pot | 77 ++- .../formatters/allure_metadata_formatter.rb | 25 +- .../allure_metadata_formatter_spec.rb | 28 +- .../oauth/authorizations_controller_spec.rb | 19 + .../merge_request_approval_metrics.rb | 9 + .../jobs_table/admin_job_table_app_spec.js | 35 +- .../__snapshots__/assigned_users_spec.js.snap | 8 +- .../components/assigned_users_spec.js | 39 -- .../table/admin_job_table_app_spec.js | 35 +- .../components/project_delete_button_spec.js | 2 + .../components/shared/delete_button_spec.js | 19 +- .../token_access/inbound_token_access_spec.js | 58 ++- .../components/crud_component_spec.js | 11 + spec/helpers/admin/jobs_helper_spec.rb | 27 + spec/helpers/projects_helper_spec.rb | 26 +- ...rdue_finalize_background_migration_spec.rb | 47 ++ .../merge_request/approval_metrics_spec.rb | 69 +++ spec/policies/global_policy_spec.rb | 12 + .../project_pipeline_statistics_spec.rb | 10 +- ...gregate_pipeline_analytics_service_spec.rb | 2 +- spec/services/ci/register_job_service_spec.rb | 10 +- .../merge_requests/approval_service_spec.rb | 4 +- .../auto_merge_from_event_shared_examples.rb | 2 +- .../create_approval_event_worker_spec.rb | 2 +- .../create_approval_note_worker_spec.rb | 2 +- .../execute_approval_hooks_worker_spec.rb | 2 +- ...ocess_auto_merge_from_event_worker_spec.rb | 2 +- ...esolve_todos_after_approval_worker_spec.rb | 2 +- 390 files changed, 1102 insertions(+), 1409 deletions(-) create mode 100644 app/helpers/admin/jobs_helper.rb create mode 100644 app/models/merge_request/approval_metrics.rb create mode 100644 config/feature_flags/gitlab_com_derisk/authentication_logs_migration_for_allowlist.yml create mode 100644 db/docs/merge_request_approval_metrics.yml create mode 100644 db/migrate/20241217100247_create_merge_request_approval_metrics.rb create mode 100644 db/migrate/20250114084738_add_target_project_foreign_key_to_merge_request_approval_metrics.rb create mode 100644 db/schema_migrations/20241217100247 create mode 100644 db/schema_migrations/20250114084738 create mode 100644 doc/user/project/img/direct_group_members_v17_9.png create mode 100644 doc/user/project/img/merge_request_maintainers_v17_9.png create mode 100644 spec/factories/merge_request_approval_metrics.rb create mode 100644 spec/helpers/admin/jobs_helper_spec.rb create mode 100644 spec/models/merge_request/approval_metrics_spec.rb diff --git a/.rubocop_todo/lint/symbol_conversion.yml b/.rubocop_todo/lint/symbol_conversion.yml index 6f4e4b99018..353293d9fe5 100644 --- a/.rubocop_todo/lint/symbol_conversion.yml +++ b/.rubocop_todo/lint/symbol_conversion.yml @@ -2,7 +2,6 @@ # Cop supports --autocorrect. Lint/SymbolConversion: Exclude: - - 'app/controllers/admin/application_settings_controller.rb' - 'app/controllers/groups_controller.rb' - 'app/controllers/projects/issues_controller.rb' - 'app/controllers/projects_controller.rb' diff --git a/.rubocop_todo/style/class_and_module_children.yml b/.rubocop_todo/style/class_and_module_children.yml index 5bc2bcf638d..aef144c5f15 100644 --- a/.rubocop_todo/style/class_and_module_children.yml +++ b/.rubocop_todo/style/class_and_module_children.yml @@ -6,7 +6,6 @@ Style/ClassAndModuleChildren: - 'app/controllers/admin/abuse_reports_controller.rb' - 'app/controllers/admin/application_controller.rb' - 'app/controllers/admin/application_settings/appearances_controller.rb' - - 'app/controllers/admin/application_settings_controller.rb' - 'app/controllers/admin/applications_controller.rb' - 'app/controllers/admin/clusters_controller.rb' - 'app/controllers/admin/cohorts_controller.rb' diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index 4d4bae95e57..4a23e6689b9 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -0be460967aff73c3ce3262e840bee3dc6ed289f5 +6dc57705f4d70c87ea803faa572e5bb844cbc569 diff --git a/app/assets/javascripts/ci/admin/jobs_table/admin_jobs_table_app.vue b/app/assets/javascripts/ci/admin/jobs_table/admin_jobs_table_app.vue index dc5528d4e4d..ed07dc4a397 100644 --- a/app/assets/javascripts/ci/admin/jobs_table/admin_jobs_table_app.vue +++ b/app/assets/javascripts/ci/admin/jobs_table/admin_jobs_table_app.vue @@ -60,6 +60,10 @@ export default { default: '', required: false, }, + canUpdateAllJobs: { + default: false, + required: true, + }, }, apollo: { jobs: { @@ -240,7 +244,7 @@ export default { diff --git a/app/assets/javascripts/merge_request_dashboard/components/assigned_users.vue b/app/assets/javascripts/merge_request_dashboard/components/assigned_users.vue index 8f907ab9add..d793b8e3335 100644 --- a/app/assets/javascripts/merge_request_dashboard/components/assigned_users.vue +++ b/app/assets/javascripts/merge_request_dashboard/components/assigned_users.vue @@ -1,6 +1,6 @@ @@ -47,5 +51,6 @@ export default { :merge-requests-count="mergeRequestsCount" :forks-count="forksCount" :stars-count="starsCount" + :button-text="buttonText" /> diff --git a/app/assets/javascripts/projects/components/shared/delete_button.vue b/app/assets/javascripts/projects/components/shared/delete_button.vue index b290b2b085f..bb92f8569d0 100644 --- a/app/assets/javascripts/projects/components/shared/delete_button.vue +++ b/app/assets/javascripts/projects/components/shared/delete_button.vue @@ -39,6 +39,11 @@ export default { type: Number, required: true, }, + buttonText: { + type: String, + required: false, + default: __('Delete project'), + }, }, data() { return { @@ -58,9 +63,6 @@ export default { this.isModalVisible = true; }, }, - i18n: { - deleteProject: __('Delete project'), - }, }; @@ -89,7 +91,7 @@ export default { variant="danger" data-testid="delete-button" @click="onButtonClick" - >{{ $options.i18n.deleteProject }}{{ buttonText }} diff --git a/app/assets/javascripts/projects/project_delete_button.js b/app/assets/javascripts/projects/project_delete_button.js index b4d388eda3a..c2293ec675b 100644 --- a/app/assets/javascripts/projects/project_delete_button.js +++ b/app/assets/javascripts/projects/project_delete_button.js @@ -15,6 +15,7 @@ export default (selector = '#js-project-delete-button') => { mergeRequestsCount, forksCount, starsCount, + buttonText, } = el.dataset; // eslint-disable-next-line no-new @@ -30,6 +31,7 @@ export default (selector = '#js-project-delete-button') => { mergeRequestsCount: parseInt(mergeRequestsCount, 10), forksCount: parseInt(forksCount, 10), starsCount: parseInt(starsCount, 10), + buttonText, }, }); }, diff --git a/app/assets/javascripts/token_access/components/inbound_token_access.vue b/app/assets/javascripts/token_access/components/inbound_token_access.vue index 6ad02fedefa..b927483ade5 100644 --- a/app/assets/javascripts/token_access/components/inbound_token_access.vue +++ b/app/assets/javascripts/token_access/components/inbound_token_access.vue @@ -2,8 +2,9 @@ import { GlAlert, GlButton, - GlLink, + GlCollapsibleListbox, GlIcon, + GlLink, GlLoadingIcon, GlSprintf, GlTooltipDirective, @@ -22,6 +23,10 @@ import inboundUpdateCIJobTokenScopeMutation from '../graphql/mutations/inbound_u import inboundGetCIJobTokenScopeQuery from '../graphql/queries/inbound_get_ci_job_token_scope.query.graphql'; import inboundGetGroupsAndProjectsWithCIJobTokenScopeQuery from '../graphql/queries/inbound_get_groups_and_projects_with_ci_job_token_scope.query.graphql'; import getCiJobTokenScopeAllowlistQuery from '../graphql/queries/get_ci_job_token_scope_allowlist.query.graphql'; +import { + JOB_TOKEN_FORM_ADD_GROUP_OR_PROJECT, + JOB_TOKEN_FORM_AUTOPOPULATE_AUTH_LOG, +} from '../constants'; import TokenAccessTable from './token_access_table.vue'; import NamespaceForm from './namespace_form.vue'; @@ -38,6 +43,7 @@ export default { settingDisabledMessage: s__( 'CICD|Access unrestricted, so users with sufficient permissions in this project can authenticate with a job token generated in any other project.', ), + add: __('Add'), addGroupOrProject: __('Add group or project'), projectsFetchError: __('There was a problem fetching the projects'), scopeFetchError: __('There was a problem fetching the job token scope value'), @@ -58,11 +64,22 @@ export default { text: s__('CICD|Only this project and any groups and projects in the allowlist'), }, ], + crudFormActions: [ + { + text: __('Group or project'), + value: JOB_TOKEN_FORM_ADD_GROUP_OR_PROJECT, + }, + { + text: __('All projects in authentication log'), + value: JOB_TOKEN_FORM_AUTOPOPULATE_AUTH_LOG, + }, + ], components: { GlAlert, GlButton, - GlLink, + GlCollapsibleListbox, GlIcon, + GlLink, GlLoadingIcon, GlSprintf, CrudComponent, @@ -132,6 +149,7 @@ export default { projectName: '', namespaceToEdit: null, namespaceToRemove: null, + selectedAction: null, }; }, computed: { @@ -147,6 +165,9 @@ export default { const { groups, projects } = this.groupsAndProjectsWithAccess; return [...groups, ...projects]; }, + canAutopopulateAuthLog() { + return this.glFeatures.authenticationLogsMigrationForAllowlist; + }, groupCount() { return this.groupsAndProjectsWithAccess.groups.length; }, @@ -169,6 +190,10 @@ export default { }, }, methods: { + hideSelectedAction() { + this.namespaceToEdit = null; + this.selectedAction = null; + }, mapAllowlistNodes(list) { // The defaultPermissions and jobTokenPolicies are separate fields from the target (the group or project in the // allowlist). Combine them into a single object. @@ -235,6 +260,11 @@ export default { refetchGroupsAndProjects() { this.$apollo.queries.groupsAndProjectsWithAccess.refetch(); }, + selectAction(action, showFormFn) { + // TODO: render autopopulate modal when selected + this.selectedAction = action; + showFormFn(); + }, showNamespaceForm(namespace, showFormFn) { this.namespaceToEdit = namespace; showFormFn(); @@ -289,10 +319,20 @@ export default { +