Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2021-08-26 03:09:01 +00:00
parent b3618e799d
commit baaa5c45c0
28 changed files with 661 additions and 58 deletions

418
.cross-join-allowlist.yml Normal file
View file

@ -0,0 +1,418 @@
- "./ee/spec/controllers/ee/projects/jobs_controller_spec.rb"
- "./ee/spec/controllers/ee/search_controller_spec.rb"
- "./ee/spec/controllers/operations_controller_spec.rb"
- "./ee/spec/controllers/projects/issues_controller_spec.rb"
- "./ee/spec/controllers/projects/security/vulnerabilities_controller_spec.rb"
- "./ee/spec/features/ci/ci_minutes_spec.rb"
- "./ee/spec/features/ci_shared_runner_warnings_spec.rb"
- "./ee/spec/features/groups/analytics/cycle_analytics/filters_and_data_spec.rb"
- "./ee/spec/features/merge_request/sidebar_spec.rb"
- "./ee/spec/features/merge_requests/user_resets_approvers_spec.rb"
- "./ee/spec/features/merge_request/user_approves_with_password_spec.rb"
- "./ee/spec/features/merge_request/user_creates_merge_request_spec.rb"
- "./ee/spec/features/merge_request/user_creates_merge_request_with_blocking_mrs_spec.rb"
- "./ee/spec/features/merge_request/user_edits_merge_request_blocking_mrs_spec.rb"
- "./ee/spec/features/merge_request/user_merges_immediately_spec.rb"
- "./ee/spec/features/merge_request/user_merges_with_push_rules_spec.rb"
- "./ee/spec/features/merge_request/user_sees_approval_widget_spec.rb"
- "./ee/spec/features/merge_request/user_sees_closing_issues_message_spec.rb"
- "./ee/spec/features/merge_request/user_sees_merge_widget_spec.rb"
- "./ee/spec/features/merge_request/user_sees_status_checks_widget_spec.rb"
- "./ee/spec/features/merge_request/user_selects_branches_for_new_mr_spec.rb"
- "./ee/spec/features/merge_request/user_sets_approval_rules_spec.rb"
- "./ee/spec/features/merge_request/user_sets_approvers_spec.rb"
- "./ee/spec/features/merge_request/user_uses_slash_commands_spec.rb"
- "./ee/spec/features/merge_request/user_views_blocked_merge_request_spec.rb"
- "./ee/spec/features/merge_trains/two_merge_requests_on_train_spec.rb"
- "./ee/spec/features/merge_trains/user_adds_merge_request_to_merge_train_spec.rb"
- "./ee/spec/features/merge_trains/user_adds_to_merge_train_when_pipeline_succeeds_spec.rb"
- "./ee/spec/features/projects/jobs_spec.rb"
- "./ee/spec/features/projects/merge_requests/user_approves_merge_request_spec.rb"
- "./ee/spec/features/projects/pipelines/pipeline_spec.rb"
- "./ee/spec/features/projects/settings/auto_rollback_spec.rb"
- "./ee/spec/features/projects/settings/pipeline_subscriptions_spec.rb"
- "./ee/spec/features/projects/settings/protected_environments_spec.rb"
- "./ee/spec/features/search/elastic/group_search_spec.rb"
- "./ee/spec/finders/ee/namespaces/projects_finder_spec.rb"
- "./ee/spec/finders/group_projects_finder_spec.rb"
- "./ee/spec/finders/security/findings_finder_spec.rb"
- "./ee/spec/frontend/fixtures/analytics/metrics.rb"
- "./ee/spec/frontend/fixtures/analytics/value_streams_code_stage.rb"
- "./ee/spec/frontend/fixtures/analytics/value_streams_issue_stage.rb"
- "./ee/spec/frontend/fixtures/analytics/value_streams_plan_stage.rb"
- "./ee/spec/frontend/fixtures/analytics/value_streams.rb"
- "./ee/spec/frontend/fixtures/analytics/value_streams_review_stage.rb"
- "./ee/spec/frontend/fixtures/analytics/value_streams_staging_stage.rb"
- "./ee/spec/frontend/fixtures/merge_requests.rb"
- "./ee/spec/graphql/ee/mutations/ci/runner/update_spec.rb"
- "./ee/spec/graphql/ee/resolvers/namespace_projects_resolver_spec.rb"
- "./ee/spec/lib/analytics/devops_adoption/snapshot_calculator_spec.rb"
- "./ee/spec/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules_spec.rb"
- "./ee/spec/lib/ee/gitlab/background_migration/migrate_security_scans_spec.rb"
- "./ee/spec/lib/ee/gitlab/background_migration/populate_latest_pipeline_ids_spec.rb"
- "./ee/spec/lib/ee/gitlab/background_migration/populate_resolved_on_default_branch_column_spec.rb"
- "./ee/spec/lib/ee/gitlab/background_migration/populate_uuids_for_security_findings_spec.rb"
- "./ee/spec/lib/ee/gitlab/background_migration/populate_vulnerability_feedback_pipeline_id_spec.rb"
- "./ee/spec/lib/ee/gitlab/usage_data_spec.rb"
- "./ee/spec/lib/gitlab/ci/minutes/build_consumption_spec.rb"
- "./ee/spec/lib/gitlab/ci/minutes/runners_availability_spec.rb"
- "./ee/spec/lib/gitlab/ci/templates/Jobs/browser_performance_testing_gitlab_ci_yaml_spec.rb"
- "./ee/spec/lib/gitlab/ci/templates/Jobs/load_performance_testing_gitlab_ci_yaml_spec.rb"
- "./ee/spec/lib/gitlab/ci/templates/Verify/browser_performance_testing_gitlab_ci_yaml_spec.rb"
- "./ee/spec/lib/gitlab/ci/templates/Verify/load_performance_testing_gitlab_ci_yaml_spec.rb"
- "./ee/spec/migrations/schedule_populate_resolved_on_default_branch_column_spec.rb"
- "./ee/spec/models/analytics/cycle_analytics/group_level_spec.rb"
- "./ee/spec/models/ci/build_spec.rb"
- "./ee/spec/models/ci/minutes/project_monthly_usage_spec.rb"
- "./ee/spec/models/ci/pipeline_spec.rb"
- "./ee/spec/models/ee/ci/runner_spec.rb"
- "./ee/spec/models/ee/vulnerability_spec.rb"
- "./ee/spec/models/merge_request_spec.rb"
- "./ee/spec/models/project_spec.rb"
- "./ee/spec/models/security/finding_spec.rb"
- "./ee/spec/models/security/scan_spec.rb"
- "./ee/spec/presenters/ci/pipeline_presenter_spec.rb"
- "./ee/spec/requests/api/ci/jobs_spec.rb"
- "./ee/spec/requests/api/ci/minutes_spec.rb"
- "./ee/spec/requests/api/ci/runner_spec.rb"
- "./ee/spec/requests/api/graphql/ci/minutes/usage_spec.rb"
- "./ee/spec/requests/api/graphql/mutations/environments/canary_ingress/update_spec.rb"
- "./ee/spec/requests/api/graphql/mutations/vulnerabilities/create_external_issue_link_spec.rb"
- "./ee/spec/requests/api/graphql/project/pipeline/security_report_summary_spec.rb"
- "./ee/spec/requests/api/graphql/vulnerabilities/location_spec.rb"
- "./ee/spec/requests/api/groups_spec.rb"
- "./ee/spec/requests/api/namespaces_spec.rb"
- "./ee/spec/requests/api/search_spec.rb"
- "./ee/spec/requests/api/vulnerability_findings_spec.rb"
- "./ee/spec/serializers/dashboard_environment_entity_spec.rb"
- "./ee/spec/serializers/dashboard_environments_serializer_spec.rb"
- "./ee/spec/serializers/dashboard_operations_project_entity_spec.rb"
- "./ee/spec/serializers/ee/build_details_entity_spec.rb"
- "./ee/spec/serializers/merge_request_poll_widget_entity_spec.rb"
- "./ee/spec/services/auto_merge/add_to_merge_train_when_pipeline_succeeds_service_spec.rb"
- "./ee/spec/services/ci/create_pipeline_service/needs_spec.rb"
- "./ee/spec/services/ci/create_pipeline_service/runnable_builds_spec.rb"
- "./ee/spec/services/ci/minutes/additional_packs/change_namespace_service_spec.rb"
- "./ee/spec/services/ci/minutes/additional_packs/create_service_spec.rb"
- "./ee/spec/services/ci/minutes/refresh_cached_data_service_spec.rb"
- "./ee/spec/services/ci/pipeline_creation/drop_not_runnable_builds_service_spec.rb"
- "./ee/spec/services/ci/process_pipeline_service_spec.rb"
- "./ee/spec/services/ci/register_job_service_spec.rb"
- "./ee/spec/services/ci/retry_build_service_spec.rb"
- "./ee/spec/services/ci/retry_pipeline_service_spec.rb"
- "./ee/spec/services/ci/trigger_downstream_subscription_service_spec.rb"
- "./ee/spec/services/clear_namespace_shared_runners_minutes_service_spec.rb"
- "./ee/spec/services/deployments/auto_rollback_service_spec.rb"
- "./ee/spec/services/ee/ci/job_artifacts/destroy_all_expired_service_spec.rb"
- "./ee/spec/services/ee/ci/job_artifacts/destroy_batch_service_spec.rb"
- "./ee/spec/services/ee/issues/build_from_vulnerability_service_spec.rb"
- "./ee/spec/services/ee/merge_requests/after_create_service_spec.rb"
- "./ee/spec/services/ee/merge_requests/create_pipeline_service_spec.rb"
- "./ee/spec/services/ee/merge_requests/refresh_service_spec.rb"
- "./ee/spec/services/merge_trains/refresh_merge_request_service_spec.rb"
- "./ee/spec/services/search/group_service_spec.rb"
- "./ee/spec/services/security/report_summary_service_spec.rb"
- "./ee/spec/services/security/vulnerability_counting_service_spec.rb"
- "./ee/spec/support/features/redacted_search_results_examples.rb"
- "./ee/spec/support/shared_examples/fixtures/analytics_value_streams_shared_examples.rb"
- "./ee/spec/support/shared_examples/services/build_execute_shared_examples.rb"
- "./ee/spec/support/shared_examples/services/search_service_shared_examples.rb"
- "./ee/spec/workers/ci/initial_pipeline_process_worker_spec.rb"
- "./ee/spec/workers/scan_security_report_secrets_worker_spec.rb"
- "./ee/spec/workers/security/store_scans_worker_spec.rb"
- "./spec/controllers/admin/runners_controller_spec.rb"
- "./spec/controllers/groups/runners_controller_spec.rb"
- "./spec/controllers/groups/settings/ci_cd_controller_spec.rb"
- "./spec/controllers/projects/issues_controller_spec.rb"
- "./spec/controllers/projects/jobs_controller_spec.rb"
- "./spec/controllers/projects/logs_controller_spec.rb"
- "./spec/controllers/projects/merge_requests/content_controller_spec.rb"
- "./spec/controllers/projects/merge_requests_controller_spec.rb"
- "./spec/controllers/projects/pipelines_controller_spec.rb"
- "./spec/controllers/projects/runners_controller_spec.rb"
- "./spec/controllers/projects/serverless/functions_controller_spec.rb"
- "./spec/controllers/projects/settings/ci_cd_controller_spec.rb"
- "./spec/controllers/projects/web_ide_terminals_controller_spec.rb"
- "./spec/features/admin/admin_builds_spec.rb"
- "./spec/features/admin/admin_runners_spec.rb"
- "./spec/features/commits_spec.rb"
- "./spec/features/cycle_analytics_spec.rb"
- "./spec/features/groups/settings/ci_cd_spec.rb"
- "./spec/features/ide/user_opens_merge_request_spec.rb"
- "./spec/features/issuables/markdown_references/internal_references_spec.rb"
- "./spec/features/issuables/markdown_references/jira_spec.rb"
- "./spec/features/issues/create_issue_for_discussions_in_merge_request_spec.rb"
- "./spec/features/issues/create_issue_for_single_discussion_in_merge_request_spec.rb"
- "./spec/features/issues/notes_on_issues_spec.rb"
- "./spec/features/issues/user_creates_branch_and_merge_request_spec.rb"
- "./spec/features/issues/user_creates_confidential_merge_request_spec.rb"
- "./spec/features/markdown/gitlab_flavored_markdown_spec.rb"
- "./spec/features/merge_request/batch_comments_spec.rb"
- "./spec/features/merge_request/close_reopen_report_toggle_spec.rb"
- "./spec/features/merge_request/maintainer_edits_fork_spec.rb"
- "./spec/features/merge_request/merge_request_discussion_lock_spec.rb"
- "./spec/features/merge_request/user_accepts_merge_request_spec.rb"
- "./spec/features/merge_request/user_allows_commits_from_memebers_who_can_merge_spec.rb"
- "./spec/features/merge_request/user_approves_spec.rb"
- "./spec/features/merge_request/user_assigns_themselves_spec.rb"
- "./spec/features/merge_request/user_awards_emoji_spec.rb"
- "./spec/features/merge_request/user_clicks_merge_request_tabs_spec.rb"
- "./spec/features/merge_request/user_comments_on_diff_spec.rb"
- "./spec/features/merge_request/user_comments_on_merge_request_spec.rb"
- "./spec/features/merge_request/user_creates_image_diff_notes_spec.rb"
- "./spec/features/merge_request/user_creates_merge_request_spec.rb"
- "./spec/features/merge_request/user_customizes_merge_commit_message_spec.rb"
- "./spec/features/merge_request/user_edits_assignees_sidebar_spec.rb"
- "./spec/features/merge_request/user_edits_merge_request_spec.rb"
- "./spec/features/merge_request/user_edits_reviewers_sidebar_spec.rb"
- "./spec/features/merge_request/user_expands_diff_spec.rb"
- "./spec/features/merge_request/user_interacts_with_batched_mr_diffs_spec.rb"
- "./spec/features/merge_request/user_invites_from_a_comment_spec.rb"
- "./spec/features/merge_request/user_jumps_to_discussion_spec.rb"
- "./spec/features/merge_request/user_locks_discussion_spec.rb"
- "./spec/features/merge_request/user_manages_subscription_spec.rb"
- "./spec/features/merge_request/user_marks_merge_request_as_draft_spec.rb"
- "./spec/features/merge_request/user_merges_immediately_spec.rb"
- "./spec/features/merge_request/user_merges_merge_request_spec.rb"
- "./spec/features/merge_request/user_merges_only_if_pipeline_succeeds_spec.rb"
- "./spec/features/merge_request/user_merges_when_pipeline_succeeds_spec.rb"
- "./spec/features/merge_request/user_posts_diff_notes_spec.rb"
- "./spec/features/merge_request/user_posts_notes_spec.rb"
- "./spec/features/merge_request/user_rebases_merge_request_spec.rb"
- "./spec/features/merge_request/user_resolves_conflicts_spec.rb"
- "./spec/features/merge_request/user_resolves_diff_notes_and_discussions_resolve_spec.rb"
- "./spec/features/merge_request/user_resolves_outdated_diff_discussions_spec.rb"
- "./spec/features/merge_request/user_resolves_wip_mr_spec.rb"
- "./spec/features/merge_request/user_reverts_merge_request_spec.rb"
- "./spec/features/merge_request/user_reviews_image_spec.rb"
- "./spec/features/merge_request/user_scrolls_to_note_on_load_spec.rb"
- "./spec/features/merge_request/user_sees_avatar_on_diff_notes_spec.rb"
- "./spec/features/merge_request/user_sees_check_out_branch_modal_spec.rb"
- "./spec/features/merge_request/user_sees_cherry_pick_modal_spec.rb"
- "./spec/features/merge_request/user_sees_closing_issues_message_spec.rb"
- "./spec/features/merge_request/user_sees_deleted_target_branch_spec.rb"
- "./spec/features/merge_request/user_sees_deployment_widget_spec.rb"
- "./spec/features/merge_request/user_sees_diff_spec.rb"
- "./spec/features/merge_request/user_sees_discussions_spec.rb"
- "./spec/features/merge_request/user_sees_merge_button_depending_on_unresolved_discussions_spec.rb"
- "./spec/features/merge_request/user_sees_merge_request_pipelines_spec.rb"
- "./spec/features/merge_request/user_sees_merge_widget_spec.rb"
- "./spec/features/merge_request/user_sees_mini_pipeline_graph_spec.rb"
- "./spec/features/merge_request/user_sees_mr_with_deleted_source_branch_spec.rb"
- "./spec/features/merge_request/user_sees_notes_from_forked_project_spec.rb"
- "./spec/features/merge_request/user_sees_pipelines_from_forked_project_spec.rb"
- "./spec/features/merge_request/user_sees_pipelines_spec.rb"
- "./spec/features/merge_request/user_sees_suggest_pipeline_spec.rb"
- "./spec/features/merge_request/user_sees_system_notes_spec.rb"
- "./spec/features/merge_request/user_sees_versions_spec.rb"
- "./spec/features/merge_request/user_selects_branches_for_new_mr_spec.rb"
- "./spec/features/merge_request/user_squashes_merge_request_spec.rb"
- "./spec/features/merge_request/user_suggests_changes_on_diff_spec.rb"
- "./spec/features/merge_request/user_toggles_whitespace_changes_spec.rb"
- "./spec/features/merge_request/user_views_auto_expanding_diff_spec.rb"
- "./spec/features/merge_request/user_views_diffs_commit_spec.rb"
- "./spec/features/merge_request/user_views_diffs_file_by_file_spec.rb"
- "./spec/features/merge_request/user_views_diffs_spec.rb"
- "./spec/features/merge_request/user_views_merge_request_from_deleted_fork_spec.rb"
- "./spec/features/merge_request/user_views_open_merge_request_spec.rb"
- "./spec/features/participants_autocomplete_spec.rb"
- "./spec/features/project_group_variables_spec.rb"
- "./spec/features/projects/badges/list_spec.rb"
- "./spec/features/projects/badges/pipeline_badge_spec.rb"
- "./spec/features/projects/blobs/edit_spec.rb"
- "./spec/features/projects/environments/environment_spec.rb"
- "./spec/features/projects/environments/environments_spec.rb"
- "./spec/features/projects/environments_pod_logs_spec.rb"
- "./spec/features/projects/infrastructure_registry_spec.rb"
- "./spec/features/projects/issuable_templates_spec.rb"
- "./spec/features/projects/jobs/permissions_spec.rb"
- "./spec/features/projects/jobs_spec.rb"
- "./spec/features/projects/jobs/user_browses_job_spec.rb"
- "./spec/features/projects/jobs/user_browses_jobs_spec.rb"
- "./spec/features/projects/package_files_spec.rb"
- "./spec/features/projects/pipelines/pipeline_spec.rb"
- "./spec/features/projects/pipelines/pipelines_spec.rb"
- "./spec/features/projects/serverless/functions_spec.rb"
- "./spec/features/projects/settings/pipelines_settings_spec.rb"
- "./spec/features/projects/user_sees_user_popover_spec.rb"
- "./spec/features/projects/view_on_env_spec.rb"
- "./spec/features/project_variables_spec.rb"
- "./spec/features/runners_spec.rb"
- "./spec/features/security/project/internal_access_spec.rb"
- "./spec/features/security/project/private_access_spec.rb"
- "./spec/features/security/project/public_access_spec.rb"
- "./spec/features/task_lists_spec.rb"
- "./spec/features/triggers_spec.rb"
- "./spec/features/user_sees_revert_modal_spec.rb"
- "./spec/finders/ci/pipelines_finder_spec.rb"
- "./spec/finders/ci/pipelines_for_merge_request_finder_spec.rb"
- "./spec/finders/ci/runners_finder_spec.rb"
- "./spec/finders/clusters/knative_services_finder_spec.rb"
- "./spec/finders/projects_finder_spec.rb"
- "./spec/finders/projects/serverless/functions_finder_spec.rb"
- "./spec/frontend/fixtures/analytics.rb"
- "./spec/frontend/fixtures/jobs.rb"
- "./spec/frontend/fixtures/merge_requests.rb"
- "./spec/frontend/fixtures/pipelines.rb"
- "./spec/frontend/fixtures/runner.rb"
- "./spec/graphql/mutations/ci/runner/delete_spec.rb"
- "./spec/graphql/mutations/ci/runner/update_spec.rb"
- "./spec/graphql/resolvers/ci/group_runners_resolver_spec.rb"
- "./spec/graphql/resolvers/ci/job_token_scope_resolver_spec.rb"
- "./spec/graphql/resolvers/merge_request_pipelines_resolver_spec.rb"
- "./spec/graphql/resolvers/projects_resolver_spec.rb"
- "./spec/graphql/types/ci/job_token_scope_type_spec.rb"
- "./spec/helpers/packages_helper_spec.rb"
- "./spec/lib/api/entities/package_spec.rb"
- "./spec/lib/gitlab/background_migration/migrate_legacy_artifacts_spec.rb"
- "./spec/lib/gitlab/ci/badge/pipeline/status_spec.rb"
- "./spec/lib/gitlab/ci/templates/Jobs/build_gitlab_ci_yaml_spec.rb"
- "./spec/lib/gitlab/ci/templates/Jobs/code_quality_gitlab_ci_yaml_spec.rb"
- "./spec/lib/gitlab/ci/templates/Jobs/deploy_gitlab_ci_yaml_spec.rb"
- "./spec/lib/gitlab/ci/templates/Jobs/test_gitlab_ci_yaml_spec.rb"
- "./spec/lib/gitlab/ci/templates/Verify/load_performance_testing_gitlab_ci_yaml_spec.rb"
- "./spec/lib/gitlab/prometheus/query_variables_spec.rb"
- "./spec/mailers/emails/pipelines_spec.rb"
- "./spec/migrations/cleanup_legacy_artifact_migration_spec.rb"
- "./spec/migrations/migrate_protected_attribute_to_pending_builds_spec.rb"
- "./spec/migrations/re_schedule_latest_pipeline_id_population_with_all_security_related_artifact_types_spec.rb"
- "./spec/migrations/schedule_migrate_security_scans_spec.rb"
- "./spec/models/ci/build_dependencies_spec.rb"
- "./spec/models/ci/build_spec.rb"
- "./spec/models/ci/build_trace_chunk_spec.rb"
- "./spec/models/ci/job_artifact_spec.rb"
- "./spec/models/ci/job_token/scope_spec.rb"
- "./spec/models/ci/pipeline_spec.rb"
- "./spec/models/ci/runner_spec.rb"
- "./spec/models/clusters/applications/runner_spec.rb"
- "./spec/models/concerns/chronic_duration_attribute_spec.rb"
- "./spec/models/deployment_spec.rb"
- "./spec/models/environment_spec.rb"
- "./spec/models/environment_status_spec.rb"
- "./spec/models/merge_request_spec.rb"
- "./spec/models/project_spec.rb"
- "./spec/models/user_spec.rb"
- "./spec/presenters/ci/build_runner_presenter_spec.rb"
- "./spec/presenters/ci/pipeline_presenter_spec.rb"
- "./spec/presenters/packages/detail/package_presenter_spec.rb"
- "./spec/requests/api/ci/jobs_spec.rb"
- "./spec/requests/api/ci/pipelines_spec.rb"
- "./spec/requests/api/ci/runner/jobs_put_spec.rb"
- "./spec/requests/api/ci/runner/jobs_request_post_spec.rb"
- "./spec/requests/api/ci/runner/jobs_trace_spec.rb"
- "./spec/requests/api/ci/runner/runners_post_spec.rb"
- "./spec/requests/api/ci/runners_spec.rb"
- "./spec/requests/api/commit_statuses_spec.rb"
- "./spec/requests/api/graphql/ci/groups_spec.rb"
- "./spec/requests/api/graphql/ci/job_spec.rb"
- "./spec/requests/api/graphql/ci/runner_spec.rb"
- "./spec/requests/api/graphql/group_query_spec.rb"
- "./spec/requests/api/graphql/merge_request/merge_request_spec.rb"
- "./spec/requests/api/graphql/mutations/ci/job_play_spec.rb"
- "./spec/requests/api/graphql/mutations/ci/job_retry_spec.rb"
- "./spec/requests/api/graphql/mutations/ci/job_token_scope/add_project_spec.rb"
- "./spec/requests/api/graphql/mutations/ci/job_token_scope/remove_project_spec.rb"
- "./spec/requests/api/graphql/mutations/environments/canary_ingress/update_spec.rb"
- "./spec/requests/api/graphql/mutations/merge_requests/create_spec.rb"
- "./spec/requests/api/graphql/packages/composer_spec.rb"
- "./spec/requests/api/graphql/packages/conan_spec.rb"
- "./spec/requests/api/graphql/packages/maven_spec.rb"
- "./spec/requests/api/graphql/packages/nuget_spec.rb"
- "./spec/requests/api/graphql/packages/package_spec.rb"
- "./spec/requests/api/graphql/packages/pypi_spec.rb"
- "./spec/requests/api/graphql/project/merge_request/pipelines_spec.rb"
- "./spec/requests/api/graphql/project/merge_request_spec.rb"
- "./spec/requests/api/graphql/project/merge_requests_spec.rb"
- "./spec/requests/api/graphql/project/pipeline_spec.rb"
- "./spec/requests/api/merge_requests_spec.rb"
- "./spec/requests/api/package_files_spec.rb"
- "./spec/requests/api/projects_spec.rb"
- "./spec/requests/projects/cycle_analytics_events_spec.rb"
- "./spec/serializers/build_details_entity_spec.rb"
- "./spec/serializers/ci/pipeline_entity_spec.rb"
- "./spec/serializers/merge_request_poll_widget_entity_spec.rb"
- "./spec/serializers/merge_request_serializer_spec.rb"
- "./spec/serializers/pipeline_details_entity_spec.rb"
- "./spec/serializers/pipeline_serializer_spec.rb"
- "./spec/serializers/runner_entity_spec.rb"
- "./spec/services/auto_merge/merge_when_pipeline_succeeds_service_spec.rb"
- "./spec/services/auto_merge_service_spec.rb"
- "./spec/services/ci/create_pipeline_service/cross_project_pipeline_spec.rb"
- "./spec/services/ci/create_pipeline_service/needs_spec.rb"
- "./spec/services/ci/create_pipeline_service/parent_child_pipeline_spec.rb"
- "./spec/services/ci/create_pipeline_service_spec.rb"
- "./spec/services/ci/destroy_pipeline_service_spec.rb"
- "./spec/services/ci/drop_pipeline_service_spec.rb"
- "./spec/services/ci/expire_pipeline_cache_service_spec.rb"
- "./spec/services/ci/job_artifacts/destroy_all_expired_service_spec.rb"
- "./spec/services/ci/job_artifacts/destroy_associations_service_spec.rb"
- "./spec/services/ci/job_artifacts/destroy_batch_service_spec.rb"
- "./spec/services/ci/pipeline_processing/shared_processing_service.rb"
- "./spec/services/ci/pipeline_processing/shared_processing_service_tests_with_yaml.rb"
- "./spec/services/ci/play_build_service_spec.rb"
- "./spec/services/ci/register_job_service_spec.rb"
- "./spec/services/ci/retry_build_service_spec.rb"
- "./spec/services/ci/retry_pipeline_service_spec.rb"
- "./spec/services/ci/update_build_queue_service_spec.rb"
- "./spec/services/ci/update_runner_service_spec.rb"
- "./spec/services/clusters/applications/prometheus_config_service_spec.rb"
- "./spec/services/deployments/older_deployments_drop_service_spec.rb"
- "./spec/services/environments/auto_stop_service_spec.rb"
- "./spec/services/environments/stop_service_spec.rb"
- "./spec/services/merge_requests/add_todo_when_build_fails_service_spec.rb"
- "./spec/services/merge_requests/after_create_service_spec.rb"
- "./spec/services/merge_requests/create_from_issue_service_spec.rb"
- "./spec/services/merge_requests/create_pipeline_service_spec.rb"
- "./spec/services/merge_requests/create_service_spec.rb"
- "./spec/services/merge_requests/merge_orchestration_service_spec.rb"
- "./spec/services/merge_requests/post_merge_service_spec.rb"
- "./spec/services/merge_requests/refresh_service_spec.rb"
- "./spec/services/merge_requests/reopen_service_spec.rb"
- "./spec/services/projects/update_pages_service_spec.rb"
- "./spec/services/quick_actions/interpret_service_spec.rb"
- "./spec/support/prometheus/additional_metrics_shared_examples.rb"
- "./spec/support/shared_examples/ci/pipeline_email_shared_examples.rb"
- "./spec/support/shared_examples/controllers/unique_hll_events_examples.rb"
- "./spec/support/shared_examples/features/comments_on_merge_request_files_shared_examples.rb"
- "./spec/support/shared_examples/features/creatable_merge_request_shared_examples.rb"
- "./spec/support/shared_examples/features/discussion_comments_shared_example.rb"
- "./spec/support/shared_examples/features/editable_merge_request_shared_examples.rb"
- "./spec/support/shared_examples/features/issuable_invite_members_shared_examples.rb"
- "./spec/support/shared_examples/features/issuable_sidebar_shared_examples.rb"
- "./spec/support/shared_examples/features/multiple_assignees_mr_shared_examples.rb"
- "./spec/support/shared_examples/features/multiple_reviewers_mr_shared_examples.rb"
- "./spec/support/shared_examples/features/packages_shared_examples.rb"
- "./spec/support/shared_examples/features/page_description_shared_examples.rb"
- "./spec/support/shared_examples/features/reportable_note_shared_examples.rb"
- "./spec/support/shared_examples/features/resolving_discussions_in_issues_shared_examples.rb"
- "./spec/support/shared_examples/features/search_settings_shared_examples.rb"
- "./spec/support/shared_examples/features/showing_user_status_shared_examples.rb"
- "./spec/support/shared_examples/features/variable_list_shared_examples.rb"
- "./spec/support/shared_examples/lib/gitlab/search_results_sorted_shared_examples.rb"
- "./spec/support/shared_examples/models/cluster_application_status_shared_examples.rb"
- "./spec/support/shared_examples/models/concerns/limitable_shared_examples.rb"
- "./spec/support/shared_examples/quick_actions/issuable/close_quick_action_shared_examples.rb"
- "./spec/support/shared_examples/quick_actions/issuable/time_tracking_quick_action_shared_examples.rb"
- "./spec/support/shared_examples/quick_actions/issue/create_merge_request_quick_action_shared_examples.rb"
- "./spec/support/shared_examples/quick_actions/merge_request/merge_quick_action_shared_examples.rb"
- "./spec/support/shared_examples/quick_actions/merge_request/rebase_quick_action_shared_examples.rb"
- "./spec/support/shared_examples/requests/api/graphql/packages/group_and_project_packages_list_shared_examples.rb"
- "./spec/support/shared_examples/requests/api/graphql/packages/package_details_shared_examples.rb"
- "./spec/support/shared_examples/requests/api/logging_application_context_shared_examples.rb"
- "./spec/support/shared_examples/requests/api/status_shared_examples.rb"
- "./spec/support/shared_examples/requests/graphql_shared_examples.rb"
- "./spec/support/shared_examples/services/merge_request_shared_examples.rb"
- "./spec/support/shared_examples/services/onboarding_progress_shared_examples.rb"
- "./spec/support/shared_examples/services/packages_shared_examples.rb"
- "./spec/support/shared_examples/workers/idempotency_shared_examples.rb"
- "./spec/tasks/gitlab/generate_sample_prometheus_data_spec.rb"
- "./spec/views/projects/jobs/_build.html.haml_spec.rb"
- "./spec/workers/ci/drop_pipeline_worker_spec.rb"
- "./spec/workers/ci/initial_pipeline_process_worker_spec.rb"
- "./spec/workers/expire_job_cache_worker_spec.rb"
- "./spec/workers/expire_pipeline_cache_worker_spec.rb"
- "./spec/workers/new_merge_request_worker_spec.rb"
- "./spec/workers/pipeline_process_worker_spec.rb"
- "./spec/workers/pipeline_schedule_worker_spec.rb"
- "./spec/workers/stuck_merge_jobs_worker_spec.rb"
- "./spec/workers/update_head_pipeline_for_merge_request_worker_spec.rb"

View file

@ -112,6 +112,9 @@ export default {
this.$emit('commit', { type: COMMIT_SUCCESS }); this.$emit('commit', { type: COMMIT_SUCCESS });
this.updateLastCommitBranch(targetBranch); this.updateLastCommitBranch(targetBranch);
this.updateCurrentBranch(targetBranch); this.updateCurrentBranch(targetBranch);
if (this.currentBranch === targetBranch) {
this.$emit('updateCommitSha');
}
} }
} catch (error) { } catch (error) {
this.$emit('showError', { type: COMMIT_FAILURE, reasons: [error?.message] }); this.$emit('showError', { type: COMMIT_FAILURE, reasons: [error?.message] });

View file

@ -43,3 +43,5 @@ export const pipelineEditorTrackingOptions = {
export const TEMPLATE_REPOSITORY_URL = export const TEMPLATE_REPOSITORY_URL =
'https://gitlab.com/gitlab-org/gitlab-foss/tree/master/lib/gitlab/ci/templates'; 'https://gitlab.com/gitlab-org/gitlab-foss/tree/master/lib/gitlab/ci/templates';
export const COMMIT_SHA_POLL_INTERVAL = 1000;

View file

@ -10,6 +10,7 @@ import ConfirmUnsavedChangesDialog from './components/ui/confirm_unsaved_changes
import PipelineEditorEmptyState from './components/ui/pipeline_editor_empty_state.vue'; import PipelineEditorEmptyState from './components/ui/pipeline_editor_empty_state.vue';
import PipelineEditorMessages from './components/ui/pipeline_editor_messages.vue'; import PipelineEditorMessages from './components/ui/pipeline_editor_messages.vue';
import { import {
COMMIT_SHA_POLL_INTERVAL,
EDITOR_APP_STATUS_EMPTY, EDITOR_APP_STATUS_EMPTY,
EDITOR_APP_STATUS_ERROR, EDITOR_APP_STATUS_ERROR,
EDITOR_APP_STATUS_LOADING, EDITOR_APP_STATUS_LOADING,
@ -48,6 +49,7 @@ export default {
failureType: null, failureType: null,
failureReasons: [], failureReasons: [],
initialCiFileContent: '', initialCiFileContent: '',
isFetchingCommitSha: false,
isNewCiConfigFile: false, isNewCiConfigFile: false,
lastCommittedContent: '', lastCommittedContent: '',
currentCiFileContent: '', currentCiFileContent: '',
@ -170,15 +172,22 @@ export default {
// in this case, we start polling until we get a commit sha. // in this case, we start polling until we get a commit sha.
if (pipelineNodes.length === 0) { if (pipelineNodes.length === 0) {
if (![EDITOR_APP_STATUS_LOADING, EDITOR_APP_STATUS_EMPTY].includes(this.appStatus)) { if (![EDITOR_APP_STATUS_LOADING, EDITOR_APP_STATUS_EMPTY].includes(this.appStatus)) {
this.$apollo.queries.commitSha.startPolling(1000); this.$apollo.queries.commitSha.startPolling(COMMIT_SHA_POLL_INTERVAL);
return this.commitSha; return this.commitSha;
} }
return ''; return '';
} }
const latestCommitSha = pipelineNodes[0].sha;
if (this.isFetchingCommitSha && latestCommitSha === this.commitSha) {
this.$apollo.queries.commitSha.startPolling(COMMIT_SHA_POLL_INTERVAL);
return this.commitSha;
}
this.isFetchingCommitSha = false;
this.$apollo.queries.commitSha.stopPolling(); this.$apollo.queries.commitSha.stopPolling();
return pipelineNodes[0].sha; return latestCommitSha;
}, },
}, },
currentBranch: { currentBranch: {
@ -280,6 +289,10 @@ export default {
updateCiConfig(ciFileContent) { updateCiConfig(ciFileContent) {
this.currentCiFileContent = ciFileContent; this.currentCiFileContent = ciFileContent;
}, },
updateCommitSha() {
this.isFetchingCommitSha = true;
this.$apollo.queries.commitSha.refetch();
},
updateOnCommit({ type }) { updateOnCommit({ type }) {
this.reportSuccess(type); this.reportSuccess(type);
@ -333,6 +346,7 @@ export default {
@showError="showErrorAlert" @showError="showErrorAlert"
@refetchContent="refetchContent" @refetchContent="refetchContent"
@updateCiConfig="updateCiConfig" @updateCiConfig="updateCiConfig"
@updateCommitSha="updateCommitSha"
/> />
<confirm-unsaved-changes-dialog :has-unsaved-changes="hasUnsavedChanges" /> <confirm-unsaved-changes-dialog :has-unsaved-changes="hasUnsavedChanges" />
</div> </div>

View file

@ -175,7 +175,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
# or from cache if already merged # or from cache if already merged
@commits = @commits =
set_commits_for_rendering( set_commits_for_rendering(
@merge_request.recent_commits.with_latest_pipeline(@merge_request.source_branch).with_markdown_cache, @merge_request.recent_commits(load_from_gitaly: true).with_latest_pipeline(@merge_request.source_branch).with_markdown_cache,
commits_count: @merge_request.commits_count commits_count: @merge_request.commits_count
) )

View file

@ -615,8 +615,8 @@ class MergeRequest < ApplicationRecord
context_commits.count context_commits.count
end end
def commits(limit: nil) def commits(limit: nil, load_from_gitaly: false)
return merge_request_diff.commits(limit: limit) if merge_request_diff.persisted? return merge_request_diff.commits(limit: limit, load_from_gitaly: load_from_gitaly) if merge_request_diff.persisted?
commits_arr = if compare_commits commits_arr = if compare_commits
reversed_commits = compare_commits.reverse reversed_commits = compare_commits.reverse
@ -628,8 +628,8 @@ class MergeRequest < ApplicationRecord
CommitCollection.new(source_project, commits_arr, source_branch) CommitCollection.new(source_project, commits_arr, source_branch)
end end
def recent_commits def recent_commits(load_from_gitaly: false)
commits(limit: MergeRequestDiff::COMMITS_SAFE_SIZE) commits(limit: MergeRequestDiff::COMMITS_SAFE_SIZE, load_from_gitaly: load_from_gitaly)
end end
def commits_count def commits_count

View file

@ -288,9 +288,9 @@ class MergeRequestDiff < ApplicationRecord
end end
end end
def commits(limit: nil) def commits(limit: nil, load_from_gitaly: false)
strong_memoize(:"commits_#{limit || 'all'}") do strong_memoize(:"commits_#{limit || 'all'}_#{load_from_gitaly}") do
load_commits(limit: limit) load_commits(limit: limit, load_from_gitaly: load_from_gitaly)
end end
end end
@ -700,9 +700,14 @@ class MergeRequestDiff < ApplicationRecord
end end
end end
def load_commits(limit: nil) def load_commits(limit: nil, load_from_gitaly: false)
if load_from_gitaly
commits = Gitlab::Git::Commit.batch_by_oid(repository, merge_request_diff_commits.limit(limit).map(&:sha))
commits = Commit.decorate(commits, project)
else
commits = merge_request_diff_commits.with_users.limit(limit) commits = merge_request_diff_commits.with_users.limit(limit)
.map { |commit| Commit.from_hash(commit.to_hash, project) } .map { |commit| Commit.from_hash(commit.to_hash, project) }
end
CommitCollection CommitCollection
.new(merge_request.source_project, commits, merge_request.source_branch) .new(merge_request.source_project, commits, merge_request.source_branch)

View file

@ -0,0 +1,17 @@
# frozen_string_literal: true
class ResetSeverityLevelsToNewDefault < ActiveRecord::Migration[6.1]
ALL_SEVERITY_LEVELS = 6 # ::Enums::Vulnerability::SEVERITY_LEVELS.count
def up
execute(<<~SQL.squish)
UPDATE approval_project_rules
SET severity_levels = '{unknown, high, critical}'
WHERE array_length(severity_levels, 1) = #{ALL_SEVERITY_LEVELS};
SQL
end
def down
# no-op
end
end

View file

@ -0,0 +1 @@
d57791945f0d21da90a5b1d75db9add6c7e916ad3c13df2522c7d71d572baa47

View file

@ -515,17 +515,23 @@ Plan.default.actual_limits.update!(ci_jobs_trace_size_limit: 125)
## Instance monitoring and metrics ## Instance monitoring and metrics
### Incident Management inbound alert limits ### Limit inbound incident management alerts
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/17859) in GitLab 12.5. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/17859) in GitLab 12.5.
Limiting inbound alerts for an incident reduces the number of alerts (issues) You can limit the number of inbound alerts for [incidents](../operations/incident_management/incidents.md)
that can be created within a period of time, which can help prevent overloading that can be created in a period of time. The inbound [incident management](../operations/incident_management/index.md)
your incident responders with duplicate issues. You can reduce the volume of alert limit can help prevent overloading your incident responders by reducing the
alerts in the following ways: number of alerts or duplicate issues.
- Max requests per period per project, 3600 seconds by default. To set inbound incident management alert limits:
- Rate limit period in seconds, 3600 seconds by default.
1. On the top bar, select **Menu >** **{admin}** **Admin**.
1. On the left sidebar, select **Settings > Network**.
1. Expand General **Incident Management Limits**.
1. Select the **Enable Incident Management inbound alert limit** checkbox.
1. Optional. Input a custom value for **Maximum requests per project per rate limit period**. Default is 3600.
1. Optional. Input a custom value for **Rate limit period**. Default is 3600 seconds.
### Prometheus Alert JSON payloads ### Prometheus Alert JSON payloads

View file

@ -38,6 +38,9 @@ curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/a
] ]
``` ```
The trigger token is displayed in full if the trigger token was created by the authenticated
user. Trigger tokens created by other users are shortened to four characters.
## Get trigger details ## Get trigger details
Get details of project's build trigger. Get details of project's build trigger.

View file

@ -261,7 +261,7 @@ GET /users?with_custom_attributes=true
## Single user ## Single user
Get a single user. Get a single user. This endpoint can be accessed without authentication.
### For user ### For user
@ -668,7 +668,7 @@ Example response:
## Get the status of a user ## Get the status of a user
Get the status of a user. Get the status of a user. This endpoint can be accessed without authentication.
```plaintext ```plaintext
GET /users/:id_or_username/status GET /users/:id_or_username/status
@ -812,7 +812,7 @@ Example response:
### Followers and following ### Followers and following
Get the followers of a user. Get the followers of a user. This endpoint can be accessed without authentication.
```plaintext ```plaintext
GET /users/:id/followers GET /users/:id/followers

View file

@ -37,9 +37,9 @@ can't link to files outside it.
- Define artifacts per job. - Define artifacts per job.
- Subsequent jobs in later stages of the same pipeline can use artifacts. - Subsequent jobs in later stages of the same pipeline can use artifacts.
- Different projects cannot share artifacts. - Different projects cannot share artifacts.
- Artifacts expire after 30 days by default. You can define a custom [expiration time](../yaml/index.md#artifactsexpire_in).
Artifacts expire after 30 days unless you define an [expiration time](../yaml/index.md#artifactsexpire_in). - The latest artifacts do not expire if [keep latest artifacts](../pipelines/job_artifacts.md#keep-artifacts-from-most-recent-successful-jobs) is enabled.
Use [dependencies](../yaml/index.md#dependencies) to control which jobs fetch the artifacts. - Use [dependencies](../yaml/index.md#dependencies) to control which jobs fetch the artifacts.
## Good caching practices ## Good caching practices

View file

@ -141,8 +141,22 @@ The pipeline starts when the commit is committed.
[CI Lint tool](../lint.md), which is available in every project. [CI Lint tool](../lint.md), which is available in every project.
- You can also use [CI/CD configuration visualization](../pipeline_editor/index.md#visualize-ci-configuration) to - You can also use [CI/CD configuration visualization](../pipeline_editor/index.md#visualize-ci-configuration) to
view a graphical representation of your `.gitlab-ci.yml` file. view a graphical representation of your `.gitlab-ci.yml` file.
- For the complete `.gitlab-ci.yml` syntax, see - Each job contains scripts and stages:
[the `.gitlab-ci.yml` reference topic](../yaml/index.md). - The [`default`](../yaml/index.md#custom-default-keyword-values) keyword is for
custom defaults, for example with [`before_script`](../yaml/index.md#before_script)
and [`after_script`](../yaml/index.md#after_script).
- [`stage`](../yaml/index.md#stage) describes the sequential execution of jobs.
Jobs in a single stage run in parallel as long as there are available runners.
- Use [Directed Acyclic Graphs (DAG)](../directed_acyclic_graph/index.md) keywords
to run jobs out of stage order.
- You can set additional configuration to customize how your jobs and stages perform:
- Use the [`rules`](../yaml/index.md#rules) keyword to specify when to run or skip jobs.
The `only` and `except` legacy keywords are still supported, but can't be used
with `rules` in the same job.
- Keep information across jobs and stages persistent in a pipeline with [`cache`](../yaml/index.md#cache))
and [`artifacts`](../yaml/index.md#artifacts). These keywords are ways to store
dependencies and job output, even when using ephemeral runners for each job.
- For the complete `.gitlab-ci.yml` syntax, see [the full `.gitlab-ci.yml` reference topic](../yaml/index.md).
### View the status of your pipeline and jobs ### View the status of your pipeline and jobs

View file

@ -109,6 +109,10 @@ already many such examples that need to be fixed in
The following are some real examples that have resulted from this and these The following are some real examples that have resulted from this and these
patterns may apply to future cases. patterns may apply to future cases.
[Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68620) in GitLab 14.3, any
queries detected that join across databases raises an error (except
for pre-existing queries).
#### Remove the code #### Remove the code
The simplest solution we've seen several times now has been an existing scope The simplest solution we've seen several times now has been an existing scope

View file

@ -36,6 +36,16 @@ An icon is visible to the user of a restricted key in the SSH keys section of th
Hovering over this icon tells you why the key is restricted. Hovering over this icon tells you why the key is restricted.
## Default settings
By default, the GitLab.com and self-managed settings for the
[supported key types](../ssh/index.md#supported-ssh-key-types) are:
- RSA SSH keys are allowed.
- DSA SSH keys are forbidden ([since GitLab 11.0](https://about.gitlab.com/releases/2018/06/22/gitlab-11-0-released/#support-for-dsa-ssh-keys)).
- ECDSA SSH keys are allowed.
- ED25519 SSH keys are allowed.
<!-- ## Troubleshooting <!-- ## Troubleshooting
Include any troubleshooting steps that you can foresee. If you know beforehand what issues Include any troubleshooting steps that you can foresee. If you know beforehand what issues

View file

@ -98,7 +98,7 @@ To access the default page for Admin Area settings:
| [Package Registry Rate Limits](package_registry_rate_limits.md) | Configure specific limits for Packages API requests that supersede the user and IP rate limits. | | [Package Registry Rate Limits](package_registry_rate_limits.md) | Configure specific limits for Packages API requests that supersede the user and IP rate limits. |
| [Outbound requests](../../../security/webhooks.md) | Allow requests to the local network from hooks and services. | | [Outbound requests](../../../security/webhooks.md) | Allow requests to the local network from hooks and services. |
| [Protected Paths](protected_paths.md) | Configure paths to be protected by Rack Attack. | | [Protected Paths](protected_paths.md) | Configure paths to be protected by Rack Attack. |
| [Incident Management](../../../operations/incident_management/index.md) Limits | Configure limits on the number of inbound alerts able to be sent to a project. | | [Incident Management](../../../operations/incident_management/index.md) Limits | Limit the number of inbound alerts that can be sent to a project. |
| [Notes creation limit](rate_limit_on_notes_creation.md)| Set a rate limit on the note creation requests. | | [Notes creation limit](rate_limit_on_notes_creation.md)| Set a rate limit on the note creation requests. |
## Geo ## Geo

View file

@ -9,6 +9,10 @@ info: To determine the technical writer assigned to the Stage/Group associated w
This page contains information about the settings that are used on GitLab.com, available to This page contains information about the settings that are used on GitLab.com, available to
[GitLab SaaS](https://about.gitlab.com/pricing/) customers. [GitLab SaaS](https://about.gitlab.com/pricing/) customers.
## SSH key restrictions
GitLab.com uses the default [SSH key restrictions](../../security/ssh_keys_restrictions.md).
## SSH host keys fingerprints ## SSH host keys fingerprints
Below are the fingerprints for SSH host keys on GitLab.com. The first time you Below are the fingerprints for SSH host keys on GitLab.com. The first time you

View file

@ -8497,9 +8497,6 @@ msgstr ""
msgid "Configure limits for web and API requests." msgid "Configure limits for web and API requests."
msgstr "" msgstr ""
msgid "Configure limits on the number of inbound alerts able to be sent to a project."
msgstr ""
msgid "Configure paths to be protected by Rack Attack." msgid "Configure paths to be protected by Rack Attack."
msgstr "" msgstr ""
@ -12350,9 +12347,6 @@ msgstr ""
msgid "Enable Gitpod?" msgid "Enable Gitpod?"
msgstr "" msgstr ""
msgid "Enable Incident Management inbound alert limit"
msgstr ""
msgid "Enable Invisible Captcha during sign up" msgid "Enable Invisible Captcha during sign up"
msgstr "" msgstr ""
@ -12440,6 +12434,9 @@ msgstr ""
msgid "Enable in-product marketing emails" msgid "Enable in-product marketing emails"
msgstr "" msgstr ""
msgid "Enable incident management inbound alert limit"
msgstr ""
msgid "Enable integration" msgid "Enable integration"
msgstr "" msgstr ""
@ -16499,9 +16496,6 @@ msgstr ""
msgid "Helps prevent malicious users hide their activity" msgid "Helps prevent malicious users hide their activity"
msgstr "" msgstr ""
msgid "Helps reduce alert volume (e.g. if creating too many issues)"
msgstr ""
msgid "Helps reduce request volume (e.g. from crawlers or abusive bots)" msgid "Helps reduce request volume (e.g. from crawlers or abusive bots)"
msgstr "" msgstr ""
@ -20065,6 +20059,9 @@ msgstr ""
msgid "Limit the number of concurrent operations this secondary node can run in the background." msgid "Limit the number of concurrent operations this secondary node can run in the background."
msgstr "" msgstr ""
msgid "Limit the number of inbound incident management alerts that can be sent to a project."
msgstr ""
msgid "Limit the number of issues and epics per minute a user can create through web and API requests." msgid "Limit the number of issues and epics per minute a user can create through web and API requests."
msgstr "" msgstr ""
@ -27558,6 +27555,9 @@ msgstr ""
msgid "Redis" msgid "Redis"
msgstr "" msgstr ""
msgid "Reduce incident management alert volume (for example, if too many issues are being created)."
msgstr ""
msgid "Reduce project visibility" msgid "Reduce project visibility"
msgstr "" msgstr ""
@ -33538,6 +33538,9 @@ msgstr ""
msgid "The tag name can't be changed for an existing release." msgid "The tag name can't be changed for an existing release."
msgstr "" msgstr ""
msgid "The time period in seconds that the maximum requests per project limit applies to."
msgstr ""
msgid "The update action will time out after %{number_of_minutes} minutes. For big repositories, use a clone/push combination." msgid "The update action will time out after %{number_of_minutes} minutes. For big repositories, use a clone/push combination."
msgstr "" msgstr ""

View file

@ -14,7 +14,7 @@ gem 'airborne', '~> 0.3.4', require: false # airborne is messing with rspec sand
gem 'rest-client', '~> 2.1.0' gem 'rest-client', '~> 2.1.0'
gem 'rspec-retry', '~> 0.6.1', require: 'rspec/retry' gem 'rspec-retry', '~> 0.6.1', require: 'rspec/retry'
gem 'rspec_junit_formatter', '~> 0.4.1' gem 'rspec_junit_formatter', '~> 0.4.1'
gem 'faker', '~> 1.6', '>= 1.6.6' gem 'faker', '~> 2.19', '>= 2.19.0'
gem 'knapsack', '~> 1.17' gem 'knapsack', '~> 1.17'
gem 'parallel_tests', '~> 2.29' gem 'parallel_tests', '~> 2.29'
gem 'rotp', '~> 3.1.0' gem 'rotp', '~> 3.1.0'

View file

@ -62,8 +62,8 @@ GEM
domain_name (0.5.20190701) domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0) unf (>= 0.0.5, < 1.0.0)
equalizer (0.0.11) equalizer (0.0.11)
faker (1.9.3) faker (2.19.0)
i18n (>= 0.7) i18n (>= 1.6, < 2)
faraday (1.5.1) faraday (1.5.1)
faraday-em_http (~> 1.0) faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0) faraday-em_synchrony (~> 1.0)
@ -218,7 +218,7 @@ DEPENDENCIES
chemlab (~> 0.7) chemlab (~> 0.7)
chemlab-library-www-gitlab-com (~> 0.1) chemlab-library-www-gitlab-com (~> 0.1)
deprecation_toolkit (~> 1.5.1) deprecation_toolkit (~> 1.5.1)
faker (~> 1.6, >= 1.6.6) faker (~> 2.19, >= 2.19.0)
gitlab-qa gitlab-qa
knapsack (~> 1.17) knapsack (~> 1.17)
octokit (~> 4.21) octokit (~> 4.21)

View file

@ -177,6 +177,10 @@ describe('Pipeline Editor | Commit section', () => {
expect(wrapper.emitted('commit')[0]).toEqual([{ type: COMMIT_SUCCESS }]); expect(wrapper.emitted('commit')[0]).toEqual([{ type: COMMIT_SUCCESS }]);
}); });
it('emits an event to refetch the commit sha', () => {
expect(wrapper.emitted('updateCommitSha')).toHaveLength(1);
});
it('shows no saving state', () => { it('shows no saving state', () => {
expect(findCommitBtnLoadingIcon().exists()).toBe(false); expect(findCommitBtnLoadingIcon().exists()).toBe(false);
}); });
@ -216,6 +220,10 @@ describe('Pipeline Editor | Commit section', () => {
}, },
}); });
}); });
it('does not emit an event to refetch the commit sha', () => {
expect(wrapper.emitted('updateCommitSha')).toBeUndefined();
});
}); });
describe('when the user commits changes to open a new merge request', () => { describe('when the user commits changes to open a new merge request', () => {

View file

@ -173,6 +173,29 @@ export const mockCommitShaResults = {
}, },
}; };
export const mockNewCommitShaResults = {
data: {
project: {
pipelines: {
nodes: [
{
id: 'gid://gitlab/Ci::Pipeline/2',
sha: 'eeff1122',
path: `/${mockProjectFullPath}/-/pipelines/489`,
commitPath: `/${mockProjectFullPath}/-/commit/bb1abcfe3d8a3f67a8ab9fc00207d468f3022bee`,
},
{
id: 'gid://gitlab/Ci::Pipeline/1',
sha: mockCommitSha,
path: `/${mockProjectFullPath}/-/pipelines/488`,
commitPath: `/${mockProjectFullPath}/-/commit/d0d56d363d8a3f67a8ab9fc00207d468f30032ca`,
},
],
},
},
},
};
export const mockEmptyCommitShaResults = { export const mockEmptyCommitShaResults = {
data: { data: {
project: { project: {

View file

@ -29,6 +29,7 @@ import {
mockCommitShaResults, mockCommitShaResults,
mockDefaultBranch, mockDefaultBranch,
mockEmptyCommitShaResults, mockEmptyCommitShaResults,
mockNewCommitShaResults,
mockProjectFullPath, mockProjectFullPath,
} from './mock_data'; } from './mock_data';
@ -282,7 +283,7 @@ describe('Pipeline editor app component', () => {
expect(window.scrollTo).toHaveBeenCalledWith({ top: 0, behavior: 'smooth' }); expect(window.scrollTo).toHaveBeenCalledWith({ top: 0, behavior: 'smooth' });
}); });
it('polls for commit sha while pipeline data is not yet available', async () => { it('polls for commit sha while pipeline data is not yet available for newly committed branch', async () => {
jest jest
.spyOn(wrapper.vm.$apollo.queries.commitSha, 'startPolling') .spyOn(wrapper.vm.$apollo.queries.commitSha, 'startPolling')
.mockImplementation(jest.fn()); .mockImplementation(jest.fn());
@ -295,7 +296,19 @@ describe('Pipeline editor app component', () => {
expect(wrapper.vm.$apollo.queries.commitSha.startPolling).toHaveBeenCalledTimes(1); expect(wrapper.vm.$apollo.queries.commitSha.startPolling).toHaveBeenCalledTimes(1);
}); });
it('stops polling for commit sha when pipeline data is available', async () => { it('polls for commit sha while pipeline data is not yet available for current branch', async () => {
jest
.spyOn(wrapper.vm.$apollo.queries.commitSha, 'startPolling')
.mockImplementation(jest.fn());
// simulate a commit to the current branch
findEditorHome().vm.$emit('updateCommitSha');
await waitForPromises();
expect(wrapper.vm.$apollo.queries.commitSha.startPolling).toHaveBeenCalledTimes(1);
});
it('stops polling for commit sha when pipeline data is available for newly committed branch', async () => {
jest jest
.spyOn(wrapper.vm.$apollo.queries.commitSha, 'stopPolling') .spyOn(wrapper.vm.$apollo.queries.commitSha, 'stopPolling')
.mockImplementation(jest.fn()); .mockImplementation(jest.fn());
@ -305,6 +318,18 @@ describe('Pipeline editor app component', () => {
expect(wrapper.vm.$apollo.queries.commitSha.stopPolling).toHaveBeenCalledTimes(1); expect(wrapper.vm.$apollo.queries.commitSha.stopPolling).toHaveBeenCalledTimes(1);
}); });
it('stops polling for commit sha when pipeline data is available for current branch', async () => {
jest
.spyOn(wrapper.vm.$apollo.queries.commitSha, 'stopPolling')
.mockImplementation(jest.fn());
mockLatestCommitShaQuery.mockResolvedValue(mockNewCommitShaResults);
findEditorHome().vm.$emit('updateCommitSha');
await waitForPromises();
expect(wrapper.vm.$apollo.queries.commitSha.stopPolling).toHaveBeenCalledTimes(1);
});
}); });
describe('and the commit mutation fails', () => { describe('and the commit mutation fails', () => {

View file

@ -0,0 +1,33 @@
# frozen_string_literal: true
require 'spec_helper'
require_migration!
RSpec.describe ResetSeverityLevelsToNewDefault do
let(:approval_project_rules) { table(:approval_project_rules) }
let(:projects) { table(:projects)}
let(:namespaces) { table(:namespaces)}
let(:namespace) { namespaces.create!(name: 'namespace', path: 'namespace')}
let(:project) { projects.create!(name: 'project', path: 'project', namespace_id: namespace.id)}
let(:approval_project_rule) { approval_project_rules.create!(name: 'rule', project_id: project.id, severity_levels: severity_levels) }
context 'without having all severity levels selected' do
let(:severity_levels) { ['high'] }
it 'does not change severity_levels' do
expect(approval_project_rule.severity_levels).to eq(severity_levels)
expect { migrate! }.not_to change { approval_project_rule.reload.severity_levels }
end
end
context 'with all scanners selected' do
let(:severity_levels) { ::Enums::Vulnerability::SEVERITY_LEVELS.keys }
let(:default_levels) { %w(unknown high critical) }
it 'changes severity_levels to the default value' do
expect(approval_project_rule.severity_levels).to eq(severity_levels)
expect { migrate! }.to change {approval_project_rule.reload.severity_levels}.from(severity_levels).to(default_levels)
end
end
end

View file

@ -24,12 +24,17 @@ module Database
def self.validate_cross_joins!(sql) def self.validate_cross_joins!(sql)
return if Thread.current[:allow_cross_joins_across_databases] return if Thread.current[:allow_cross_joins_across_databases]
# Allow spec/support/database_cleaner.rb queries to disable/enable triggers for many tables
# See https://gitlab.com/gitlab-org/gitlab/-/issues/339396
return if sql.include?("DISABLE TRIGGER") || sql.include?("ENABLE TRIGGER")
# PgQuery might fail in some cases due to limited nesting: # PgQuery might fail in some cases due to limited nesting:
# https://github.com/pganalyze/pg_query/issues/209 # https://github.com/pganalyze/pg_query/issues/209
tables = PgQuery.parse(sql).tables tables = PgQuery.parse(sql).tables
schemas = Database::GitlabSchema.table_schemas(tables) schemas = Database::GitlabSchema.table_schemas(tables)
if schemas.many? if schemas.include?(:gitlab_ci) && schemas.include?(:gitlab_main)
Thread.current[:has_cross_join_exception] = true
raise CrossJoinAcrossUnsupportedTablesError, raise CrossJoinAcrossUnsupportedTablesError,
"Unsupported cross-join across '#{tables.join(", ")}' modifying '#{schemas.to_a.join(", ")}' discovered " \ "Unsupported cross-join across '#{tables.join(", ")}' modifying '#{schemas.to_a.join(", ")}' discovered " \
"when executing query '#{sql}'" "when executing query '#{sql}'"
@ -62,11 +67,18 @@ end
Gitlab::Database.singleton_class.prepend( Gitlab::Database.singleton_class.prepend(
Database::PreventCrossJoins::GitlabDatabaseMixin) Database::PreventCrossJoins::GitlabDatabaseMixin)
ALLOW_LIST = Set.new(YAML.load_file(Rails.root.join('.cross-join-allowlist.yml'))).freeze
RSpec.configure do |config| RSpec.configure do |config|
config.include(::Database::PreventCrossJoins::SpecHelpers) config.include(::Database::PreventCrossJoins::SpecHelpers)
# TODO: remove `:prevent_cross_joins` to enable the check by default config.around do |example|
config.around(:each, :prevent_cross_joins) do |example| Thread.current[:has_cross_join_exception] = false
if ALLOW_LIST.include?(example.file_path)
example.run
else
with_cross_joins_prevented { example.run } with_cross_joins_prevented { example.run }
end end
end end
end

View file

@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe Database::PreventCrossJoins do RSpec.describe Database::PreventCrossJoins do
context 'when running in :prevent_cross_joins scope', :prevent_cross_joins do context 'when running in a default scope' do
context 'when only non-CI tables are used' do context 'when only non-CI tables are used' do
it 'does not raise exception' do it 'does not raise exception' do
expect { main_only_query }.not_to raise_error expect { main_only_query }.not_to raise_error
@ -32,14 +32,6 @@ RSpec.describe Database::PreventCrossJoins do
end end
end end
context 'when running in a default scope' do
context 'when CI and non-CI tables are used' do
it 'does not raise exception' do
expect { main_and_ci_query }.not_to raise_error
end
end
end
private private
def main_only_query def main_only_query

View file

@ -21,7 +21,7 @@ RSpec.describe 'projects/merge_requests/_commits.html.haml', :sidekiq_might_not_
controller.prepend_view_path('app/views/projects') controller.prepend_view_path('app/views/projects')
assign(:merge_request, merge_request) assign(:merge_request, merge_request)
assign(:commits, merge_request.commits) assign(:commits, merge_request.commits(load_from_gitaly: true))
assign(:hidden_commit_count, 0) assign(:hidden_commit_count, 0)
end end
@ -34,6 +34,12 @@ RSpec.describe 'projects/merge_requests/_commits.html.haml', :sidekiq_might_not_
expect(rendered).to have_link(href: href) expect(rendered).to have_link(href: href)
end end
it 'shows signature verification badge' do
render
expect(rendered).to have_css('.gpg-status-box')
end
context 'when there are hidden commits' do context 'when there are hidden commits' do
before do before do
assign(:hidden_commit_count, 1) assign(:hidden_commit_count, 1)