Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
e778dcbcee
commit
e20fed01c8
|
|
@ -76,14 +76,16 @@ docs-code-quality:
|
|||
- .docs-markdown-lint-image
|
||||
stage: lint
|
||||
needs: []
|
||||
allow_failure: true
|
||||
script:
|
||||
- vale --output=doc/.vale/vale-json.tmpl --minAlertLevel warning doc > gl-code-quality-report-docs.json || exit_code=$?
|
||||
- scripts/lint-doc-quality.sh
|
||||
artifacts:
|
||||
reports:
|
||||
codequality: gl-code-quality-report-docs.json
|
||||
paths:
|
||||
- gl-code-quality-report-docs.json
|
||||
expire_in: 1 week
|
||||
when: always
|
||||
|
||||
ui-docs-links lint:
|
||||
extends:
|
||||
|
|
|
|||
|
|
@ -806,8 +806,7 @@
|
|||
|
||||
.docs:rules:docs-code-quality:
|
||||
rules:
|
||||
- <<: *if-default-branch-refs
|
||||
- <<: *if-default-refs
|
||||
- <<: *if-merge-request
|
||||
changes: *docs-code-quality-patterns
|
||||
|
||||
.docs:rules:docs-lint:
|
||||
|
|
|
|||
|
|
@ -299,6 +299,10 @@ Rails/MailerName:
|
|||
# See for the context on why it's excluded https://gitlab.com/gitlab-org/gitlab/-/issues/239356#note_956419227
|
||||
- 'app/mailers/notify.rb'
|
||||
|
||||
Rails/Pluck:
|
||||
# See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/94047#note_1179689274
|
||||
AutoCorrect: false
|
||||
|
||||
Rails/RakeEnvironment:
|
||||
# Context on why it's disabled: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/93419#note_1048223982
|
||||
Enabled: false
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
---
|
||||
# Cop supports --auto-correct.
|
||||
# Cop supports --autocorrect but disabled.
|
||||
Rails/Pluck:
|
||||
# Offense count: 155
|
||||
# Temporarily disabled due to too many offenses
|
||||
Enabled: false
|
||||
Details: grace period
|
||||
Exclude:
|
||||
- 'app/controllers/ldap/omniauth_callbacks_controller.rb'
|
||||
- 'app/finders/merge_requests/oldest_per_commit_finder.rb'
|
||||
- 'app/helpers/issuables_description_templates_helper.rb'
|
||||
- 'app/models/ci/unit_test.rb'
|
||||
|
|
@ -12,10 +11,18 @@ Rails/Pluck:
|
|||
- 'app/models/concerns/sensitive_serializable_hash.rb'
|
||||
- 'app/models/integrations/chat_message/pipeline_message.rb'
|
||||
- 'app/models/list.rb'
|
||||
- 'app/models/packages/go/module_version.rb'
|
||||
- 'app/models/work_items/parent_link.rb'
|
||||
- 'app/services/ci/pipeline_processing/atomic_processing_service/status_collection.rb'
|
||||
- 'app/services/feature_flags/update_service.rb'
|
||||
- 'app/services/todos/destroy/destroyed_issuable_service.rb'
|
||||
- 'app/workers/database/ci_namespace_mirrors_consistency_check_worker.rb'
|
||||
- 'app/workers/database/ci_project_mirrors_consistency_check_worker.rb'
|
||||
- 'db/post_migrate/20210811122206_update_external_project_bots.rb'
|
||||
- 'ee/app/graphql/mutations/incident_management/escalation_policy/base.rb'
|
||||
- 'ee/app/graphql/mutations/incident_management/oncall_rotation/base.rb'
|
||||
- 'ee/app/models/boards/epic_list.rb'
|
||||
- 'ee/app/models/concerns/geo/verification_state.rb'
|
||||
- 'ee/app/services/concerns/incident_management/oncall_rotations/shared_rotation_logic.rb'
|
||||
- 'ee/app/workers/geo/container_repository_sync_dispatch_worker.rb'
|
||||
- 'ee/app/workers/geo/registry_sync_worker.rb'
|
||||
|
|
@ -24,55 +31,165 @@ Rails/Pluck:
|
|||
- 'ee/app/workers/geo/scheduler/scheduler_worker.rb'
|
||||
- 'ee/lib/ee/banzai/filter/references/iteration_reference_filter.rb'
|
||||
- 'ee/lib/ee/gitlab/auth/ldap/person.rb'
|
||||
- 'ee/lib/ee/gitlab/background_migration/delete_invalid_epic_issues.rb'
|
||||
- 'ee/lib/ee/gitlab/background_migration/populate_uuids_for_security_findings.rb'
|
||||
- 'ee/lib/ee/gitlab/checks/push_rules/file_size_check.rb'
|
||||
- 'ee/lib/elastic/latest/custom_language_analyzers.rb'
|
||||
- 'ee/lib/gitlab/ci/reports/license_scanning/report.rb'
|
||||
- 'ee/lib/gitlab/search/index_curator.rb'
|
||||
- 'ee/spec/controllers/autocomplete_controller_spec.rb'
|
||||
- 'ee/spec/controllers/countries_controller_spec.rb'
|
||||
- 'ee/spec/controllers/groups/audit_events_controller_spec.rb'
|
||||
- 'ee/spec/controllers/operations_controller_spec.rb'
|
||||
- 'ee/spec/controllers/projects/audit_events_controller_spec.rb'
|
||||
- 'ee/spec/controllers/projects/feature_flag_issues_controller_spec.rb'
|
||||
- 'ee/spec/controllers/projects/licenses_controller_spec.rb'
|
||||
- 'ee/spec/controllers/projects/security/configuration_controller_spec.rb'
|
||||
- 'ee/spec/features/projects/new_project_spec.rb'
|
||||
- 'ee/spec/graphql/api/vulnerabilities_spec.rb'
|
||||
- 'ee/spec/graphql/types/vulnerability_scanner_type_spec.rb'
|
||||
- 'ee/spec/helpers/ee/geo_helper_spec.rb'
|
||||
- 'ee/spec/helpers/ee/operations_helper_spec.rb'
|
||||
- 'ee/spec/lib/ee/gitlab/import_export/group/legacy_tree_saver_spec.rb'
|
||||
- 'ee/spec/lib/ee/gitlab/import_export/group/tree_saver_spec.rb'
|
||||
- 'ee/spec/lib/gitlab/custom_file_templates_spec.rb'
|
||||
- 'ee/spec/lib/gitlab/spdx/catalogue_spec.rb'
|
||||
- 'ee/spec/models/analytics/cycle_analytics/group_level_spec.rb'
|
||||
- 'ee/spec/models/concerns/geo/verification_state_spec.rb'
|
||||
- 'ee/spec/models/dast_site_profile_spec.rb'
|
||||
- 'ee/spec/models/integrations/chat_message/vulnerability_message_spec.rb'
|
||||
- 'ee/spec/models/release_highlight_spec.rb'
|
||||
- 'ee/spec/requests/api/analytics/code_review_analytics_spec.rb'
|
||||
- 'ee/spec/requests/api/epic_links_spec.rb'
|
||||
- 'ee/spec/requests/api/epics_spec.rb'
|
||||
- 'ee/spec/requests/api/graphql/boards/board_lists_query_spec.rb'
|
||||
- 'ee/spec/requests/api/graphql/boards/epic_boards_query_spec.rb'
|
||||
- 'ee/spec/requests/api/graphql/boards/epic_lists_query_spec.rb'
|
||||
- 'ee/spec/requests/api/graphql/ci/runners_spec.rb'
|
||||
- 'ee/spec/requests/api/graphql/epics/epic_resolver_spec.rb'
|
||||
- 'ee/spec/requests/api/graphql/iterations/cadences_spec.rb'
|
||||
- 'ee/spec/requests/api/graphql/iterations/iterations_spec.rb'
|
||||
- 'ee/spec/requests/api/graphql/mutations/analytics/devops_adoption/enabled_namespaces/bulk_enable_spec.rb'
|
||||
- 'ee/spec/requests/api/graphql/mutations/epics/update_spec.rb'
|
||||
- 'ee/spec/requests/api/graphql/mutations/releases/create_spec.rb'
|
||||
- 'ee/spec/requests/api/graphql/mutations/releases/update_spec.rb'
|
||||
- 'ee/spec/requests/api/graphql/project/dast_profiles_spec.rb'
|
||||
- 'ee/spec/requests/api/graphql/project/dast_site_validations_spec.rb'
|
||||
- 'ee/spec/requests/api/graphql/project/incident_management/escalation_policy/rules_spec.rb'
|
||||
- 'ee/spec/requests/api/graphql/project/pipeline/code_quality_reports_spec.rb'
|
||||
- 'ee/spec/requests/api/graphql/vulnerabilities/issue_links_spec.rb'
|
||||
- 'ee/spec/requests/api/groups_spec.rb'
|
||||
- 'ee/spec/requests/api/iterations_spec.rb'
|
||||
- 'ee/spec/requests/api/members_spec.rb'
|
||||
- 'ee/spec/requests/api/merge_request_approval_rules_spec.rb'
|
||||
- 'ee/spec/requests/api/project_approval_rules_spec.rb'
|
||||
- 'ee/spec/requests/api/project_approval_settings_spec.rb'
|
||||
- 'ee/spec/requests/api/projects_spec.rb'
|
||||
- 'ee/spec/requests/api/protected_branches_spec.rb'
|
||||
- 'ee/spec/requests/api/protected_environments_spec.rb'
|
||||
- 'ee/spec/requests/api/protected_tags_spec.rb'
|
||||
- 'ee/spec/requests/api/releases_spec.rb'
|
||||
- 'ee/spec/requests/api/search_spec.rb'
|
||||
- 'ee/spec/requests/api/status_checks_spec.rb'
|
||||
- 'ee/spec/requests/api/users_spec.rb'
|
||||
- 'ee/spec/requests/api/vulnerabilities_spec.rb'
|
||||
- 'ee/spec/requests/api/vulnerability_findings_spec.rb'
|
||||
- 'ee/spec/requests/api/vulnerability_issue_links_spec.rb'
|
||||
- 'ee/spec/requests/ee/groups/autocomplete_sources_spec.rb'
|
||||
- 'ee/spec/requests/groups/protected_environments_controller_spec.rb'
|
||||
- 'ee/spec/requests/projects/issue_feature_flags_controller_spec.rb'
|
||||
- 'ee/spec/services/analytics/cycle_analytics/stages/update_service_spec.rb'
|
||||
- 'ee/spec/services/analytics/cycle_analytics/value_streams/create_service_spec.rb'
|
||||
- 'ee/spec/services/analytics/cycle_analytics/value_streams/update_service_spec.rb'
|
||||
- 'ee/spec/services/ee/groups/autocomplete_service_spec.rb'
|
||||
- 'ee/spec/services/ee/releases/create_evidence_service_spec.rb'
|
||||
- 'ee/spec/services/iterations/cadences/create_iterations_in_advance_service_spec.rb'
|
||||
- 'ee/spec/services/quick_actions/interpret_service_spec.rb'
|
||||
- 'ee/spec/support/elastic.rb'
|
||||
- 'ee/spec/support/helpers/feature_approval_helper.rb'
|
||||
- 'ee/spec/support/shared_examples/controllers/analytics/cycle_analytics/shared_stage_shared_examples.rb'
|
||||
- 'ee/spec/support/shared_examples/requests/api/graphql/incident_management/escalation_policies_shared_examples.rb'
|
||||
- 'lib/atlassian/jira_connect/client.rb'
|
||||
- 'lib/banzai/filter/references/label_reference_filter.rb'
|
||||
- 'lib/banzai/filter/references/milestone_reference_filter.rb'
|
||||
- 'lib/banzai/renderer.rb'
|
||||
- 'lib/gitlab/access.rb'
|
||||
- 'lib/gitlab/analytics/cycle_analytics/default_stages.rb'
|
||||
- 'lib/gitlab/bullet/exclusions.rb'
|
||||
- 'lib/gitlab/checks/lfs_check.rb'
|
||||
- 'lib/gitlab/ci/pipeline/chain/build/associations.rb'
|
||||
- 'lib/gitlab/ci/pipeline/chain/validate/external.rb'
|
||||
- 'lib/gitlab/ci/variables/collection/sort.rb'
|
||||
- 'lib/gitlab/config/entry/validators.rb'
|
||||
- 'lib/gitlab/cycle_analytics/updater.rb'
|
||||
- 'lib/gitlab/database/migration_helpers.rb'
|
||||
- 'lib/gitlab/database/partitioning_migration_helpers/index_helpers.rb'
|
||||
- 'lib/gitlab/git_access.rb'
|
||||
- 'lib/gitlab/github_import/representation/issue.rb'
|
||||
- 'lib/gitlab/jira_import/metadata_collector.rb'
|
||||
- 'lib/gitlab/merge_requests/commit_message_generator.rb'
|
||||
- 'lib/gitlab/metrics/dashboard/importers/prometheus_metrics.rb'
|
||||
- 'lib/gitlab/metrics/dashboard/stages/custom_metrics_details_inserter.rb'
|
||||
- 'lib/gitlab/sidekiq_config/cli_methods.rb'
|
||||
- 'lib/gitlab/sql/pattern.rb'
|
||||
- 'lib/gitlab/usage/metrics/name_suggestion.rb'
|
||||
- 'lib/gitlab/usage_data_counters/hll_redis_counter.rb'
|
||||
- 'qa/qa/specs/features/browser_ui/3_create/jira/jira_basic_integration_spec.rb'
|
||||
- 'qa/qa/support/page_error_checker.rb'
|
||||
- 'lib/gitlab/zentao/client.rb'
|
||||
- 'lib/tasks/gitlab/info.rake'
|
||||
- 'qa/qa/specs/features/api/1_manage/import/import_github_repo_spec.rb'
|
||||
- 'qa/qa/specs/features/api/1_manage/migration/gitlab_migration_mr_spec.rb'
|
||||
- 'qa/qa/specs/features/browser_ui/1_manage/integrations/jira/jira_basic_integration_spec.rb'
|
||||
- 'qa/qa/tools/ci/qa_changes.rb'
|
||||
- 'qa/qa/tools/delete_projects.rb'
|
||||
- 'qa/qa/tools/delete_test_snippets.rb'
|
||||
- 'qa/qa/tools/delete_test_ssh_keys.rb'
|
||||
- 'qa/qa/tools/delete_test_users.rb'
|
||||
- 'qa/qa/tools/delete_user_projects.rb'
|
||||
- 'scripts/perf/query_limiting_report.rb'
|
||||
- 'spec/config/mail_room_spec.rb'
|
||||
- 'spec/config/metrics/aggregates/aggregated_metrics_spec.rb'
|
||||
- 'spec/controllers/autocomplete_controller_spec.rb'
|
||||
- 'spec/controllers/dashboard/milestones_controller_spec.rb'
|
||||
- 'spec/controllers/groups/labels_controller_spec.rb'
|
||||
- 'spec/controllers/groups/milestones_controller_spec.rb'
|
||||
- 'spec/controllers/groups/releases_controller_spec.rb'
|
||||
- 'spec/controllers/groups/shared_projects_controller_spec.rb'
|
||||
- 'spec/controllers/projects/analytics/cycle_analytics/stages_controller_spec.rb'
|
||||
- 'spec/controllers/projects/autocomplete_sources_controller_spec.rb'
|
||||
- 'spec/controllers/projects/environments_controller_spec.rb'
|
||||
- 'spec/controllers/projects/feature_flags_controller_spec.rb'
|
||||
- 'spec/controllers/projects/issues_controller_spec.rb'
|
||||
- 'spec/controllers/projects/jobs_controller_spec.rb'
|
||||
- 'spec/controllers/projects/merge_requests/conflicts_controller_spec.rb'
|
||||
- 'spec/controllers/projects/merge_requests/diffs_controller_spec.rb'
|
||||
- 'spec/controllers/projects/pipelines/tests_controller_spec.rb'
|
||||
- 'spec/controllers/projects/releases_controller_spec.rb'
|
||||
- 'spec/controllers/projects/starrers_controller_spec.rb'
|
||||
- 'spec/db/schema_spec.rb'
|
||||
- 'spec/features/issues/csv_spec.rb'
|
||||
- 'spec/features/merge_request/user_sees_versions_spec.rb'
|
||||
- 'spec/finders/license_template_finder_spec.rb'
|
||||
- 'spec/graphql/resolvers/ci/test_suite_resolver_spec.rb'
|
||||
- 'spec/graphql/resolvers/concerns/looks_ahead_spec.rb'
|
||||
- 'spec/graphql/resolvers/namespace_projects_resolver_spec.rb'
|
||||
- 'spec/graphql/types/ci/job_token_scope_type_spec.rb'
|
||||
- 'spec/graphql/types/snippet_type_spec.rb'
|
||||
- 'spec/helpers/groups/group_members_helper_spec.rb'
|
||||
- 'spec/helpers/projects/project_members_helper_spec.rb'
|
||||
- 'spec/lib/atlassian/jira_connect/serializers/pull_request_entity_spec.rb'
|
||||
- 'spec/lib/banzai/reference_redactor_spec.rb'
|
||||
- 'spec/lib/bulk_imports/groups/stage_spec.rb'
|
||||
- 'spec/lib/bulk_imports/projects/stage_spec.rb'
|
||||
- 'spec/lib/gitlab/ci/ansi2json/line_spec.rb'
|
||||
- 'spec/lib/gitlab/ci/yaml_processor_spec.rb'
|
||||
- 'spec/lib/gitlab/conflict/file_spec.rb'
|
||||
- 'spec/lib/gitlab/database/load_balancing/transaction_leaking_spec.rb'
|
||||
- 'spec/lib/gitlab/database/similarity_score_spec.rb'
|
||||
- 'spec/lib/gitlab/database_importers/common_metrics/importer_spec.rb'
|
||||
- 'spec/lib/gitlab/git/blame_spec.rb'
|
||||
- 'spec/lib/gitlab/git/conflict/parser_spec.rb'
|
||||
- 'spec/lib/gitlab/import_export/group/legacy_tree_saver_spec.rb'
|
||||
- 'spec/lib/gitlab/import_export/project/sample/relation_tree_restorer_spec.rb'
|
||||
- 'spec/lib/gitlab/import_export/project/tree_saver_spec.rb'
|
||||
- 'spec/lib/gitlab/language_detection_spec.rb'
|
||||
- 'spec/lib/gitlab/lograge/custom_options_spec.rb'
|
||||
- 'spec/lib/gitlab/metrics/dashboard/processor_spec.rb'
|
||||
|
|
@ -80,9 +197,11 @@ Rails/Pluck:
|
|||
- 'spec/lib/gitlab/relative_positioning/item_context_spec.rb'
|
||||
- 'spec/lib/gitlab/search/query_spec.rb'
|
||||
- 'spec/lib/gitlab/sidekiq_config/worker_matcher_spec.rb'
|
||||
- 'spec/lib/gitlab/sidekiq_middleware/duplicate_jobs/client_spec.rb'
|
||||
- 'spec/lib/gitlab/tree_summary_spec.rb'
|
||||
- 'spec/lib/peek/views/rugged_spec.rb'
|
||||
- 'spec/migrations/20210713042000_fix_ci_sources_pipelines_index_names_spec.rb'
|
||||
- 'spec/models/bulk_imports/entity_spec.rb'
|
||||
- 'spec/models/ci/bridge_spec.rb'
|
||||
- 'spec/models/ci/build_spec.rb'
|
||||
- 'spec/models/ci/pipeline_spec.rb'
|
||||
|
|
@ -94,12 +213,97 @@ Rails/Pluck:
|
|||
- 'spec/models/project_spec.rb'
|
||||
- 'spec/presenters/packages/detail/package_presenter_spec.rb'
|
||||
- 'spec/presenters/packages/nuget/service_index_presenter_spec.rb'
|
||||
- 'spec/requests/api/admin/instance_clusters_spec.rb'
|
||||
- 'spec/requests/api/branches_spec.rb'
|
||||
- 'spec/requests/api/ci/pipeline_schedules_spec.rb'
|
||||
- 'spec/requests/api/ci/pipelines_spec.rb'
|
||||
- 'spec/requests/api/commit_statuses_spec.rb'
|
||||
- 'spec/requests/api/commits_spec.rb'
|
||||
- 'spec/requests/api/deploy_tokens_spec.rb'
|
||||
- 'spec/requests/api/deployments_spec.rb'
|
||||
- 'spec/requests/api/events_spec.rb'
|
||||
- 'spec/requests/api/feature_flags_spec.rb'
|
||||
- 'spec/requests/api/feature_flags_user_lists_spec.rb'
|
||||
- 'spec/requests/api/files_spec.rb'
|
||||
- 'spec/requests/api/graphql/boards/board_list_issues_query_spec.rb'
|
||||
- 'spec/requests/api/graphql/ci/manual_variables_spec.rb'
|
||||
- 'spec/requests/api/graphql/ci/pipelines_spec.rb'
|
||||
- 'spec/requests/api/graphql/ci/runners_spec.rb'
|
||||
- 'spec/requests/api/graphql/group/timelogs_spec.rb'
|
||||
- 'spec/requests/api/graphql/group_query_spec.rb'
|
||||
- 'spec/requests/api/graphql/mutations/design_management/move_spec.rb'
|
||||
- 'spec/requests/api/graphql/packages/package_spec.rb'
|
||||
- 'spec/requests/api/graphql/project/alert_management/alerts_spec.rb'
|
||||
- 'spec/requests/api/graphql/project/base_service_spec.rb'
|
||||
- 'spec/requests/api/graphql/project/issue/design_collection/version_spec.rb'
|
||||
- 'spec/requests/api/graphql/project/issue/designs/designs_spec.rb'
|
||||
- 'spec/requests/api/graphql/project/issues_spec.rb'
|
||||
- 'spec/requests/api/graphql/project/jira_import_spec.rb'
|
||||
- 'spec/requests/api/graphql/project/jira_projects_spec.rb'
|
||||
- 'spec/requests/api/graphql/project/release_spec.rb'
|
||||
- 'spec/requests/api/graphql/project/releases_spec.rb'
|
||||
- 'spec/requests/api/group_clusters_spec.rb'
|
||||
- 'spec/requests/api/group_labels_spec.rb'
|
||||
- 'spec/requests/api/group_milestones_spec.rb'
|
||||
- 'spec/requests/api/group_packages_spec.rb'
|
||||
- 'spec/requests/api/groups_spec.rb'
|
||||
- 'spec/requests/api/invitations_spec.rb'
|
||||
- 'spec/requests/api/issues/get_project_issues_spec.rb'
|
||||
- 'spec/requests/api/labels_spec.rb'
|
||||
- 'spec/requests/api/members_spec.rb'
|
||||
- 'spec/requests/api/merge_requests_spec.rb'
|
||||
- 'spec/requests/api/namespaces_spec.rb'
|
||||
- 'spec/requests/api/package_files_spec.rb'
|
||||
- 'spec/requests/api/pages_domains_spec.rb'
|
||||
- 'spec/requests/api/personal_access_tokens_spec.rb'
|
||||
- 'spec/requests/api/project_clusters_spec.rb'
|
||||
- 'spec/requests/api/project_container_repositories_spec.rb'
|
||||
- 'spec/requests/api/project_events_spec.rb'
|
||||
- 'spec/requests/api/project_milestones_spec.rb'
|
||||
- 'spec/requests/api/project_snippets_spec.rb'
|
||||
- 'spec/requests/api/project_templates_spec.rb'
|
||||
- 'spec/requests/api/projects_spec.rb'
|
||||
- 'spec/requests/api/protected_branches_spec.rb'
|
||||
- 'spec/requests/api/protected_tags_spec.rb'
|
||||
- 'spec/requests/api/releases_spec.rb'
|
||||
- 'spec/requests/api/repositories_spec.rb'
|
||||
- 'spec/requests/api/resource_access_tokens_spec.rb'
|
||||
- 'spec/requests/api/snippets_spec.rb'
|
||||
- 'spec/requests/api/tags_spec.rb'
|
||||
- 'spec/requests/api/templates_spec.rb'
|
||||
- 'spec/requests/api/todos_spec.rb'
|
||||
- 'spec/requests/api/topics_spec.rb'
|
||||
- 'spec/requests/api/unleash_spec.rb'
|
||||
- 'spec/requests/api/users_spec.rb'
|
||||
- 'spec/requests/api/v3/github_spec.rb'
|
||||
- 'spec/requests/groups/autocomplete_sources_spec.rb'
|
||||
- 'spec/requests/groups/milestones_controller_spec.rb'
|
||||
- 'spec/requests/jwks_controller_spec.rb'
|
||||
- 'spec/requests/lfs_http_spec.rb'
|
||||
- 'spec/serializers/ci/dag_pipeline_entity_spec.rb'
|
||||
- 'spec/serializers/ci/pipeline_entity_spec.rb'
|
||||
- 'spec/serializers/diff_file_entity_spec.rb'
|
||||
- 'spec/serializers/stage_entity_spec.rb'
|
||||
- 'spec/services/ci/compare_test_reports_service_spec.rb'
|
||||
- 'spec/services/ci/pipeline_processing/atomic_processing_service/status_collection_spec.rb'
|
||||
- 'spec/services/clusters/applications/prometheus_config_service_spec.rb'
|
||||
- 'spec/services/issues/export_csv_service_spec.rb'
|
||||
- 'spec/services/metrics/dashboard/custom_metric_embed_service_spec.rb'
|
||||
- 'spec/services/projects/participants_service_spec.rb'
|
||||
- 'spec/support/helpers/api_helpers.rb'
|
||||
- 'spec/support/helpers/graphql_helpers.rb'
|
||||
- 'spec/support/matchers/background_migrations_matchers.rb'
|
||||
- 'spec/support/shared_contexts/markdown_golden_master_shared_examples.rb'
|
||||
- 'spec/support/shared_examples/graphql/mutation_shared_examples.rb'
|
||||
- 'spec/support/shared_examples/requests/api/container_repositories_shared_examples.rb'
|
||||
- 'spec/support/shared_examples/requests/api/custom_attributes_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/labels_api_shared_examples.rb'
|
||||
- 'spec/support/shared_examples/requests/api/milestones_shared_examples.rb'
|
||||
- 'spec/support/shared_examples/requests/api/notes_shared_examples.rb'
|
||||
- 'spec/support/shared_examples/requests/api/repository_storage_moves_shared_examples.rb'
|
||||
- 'spec/support/shared_examples/services/packages_shared_examples.rb'
|
||||
- 'spec/tooling/docs/deprecation_handling_spec.rb'
|
||||
- 'tooling/danger/sidekiq_queues.rb'
|
||||
- 'tooling/docs/deprecation_handling.rb'
|
||||
|
|
|
|||
2
Gemfile
2
Gemfile
|
|
@ -394,7 +394,7 @@ group :development, :test do
|
|||
# Generate Fake data
|
||||
gem 'ffaker', '~> 2.10'
|
||||
|
||||
gem 'spring', '~> 2.1.0'
|
||||
gem 'spring', '~> 4.1.0'
|
||||
gem 'spring-commands-rspec', '~> 1.0.4'
|
||||
|
||||
gem 'gitlab-styles', '~> 9.1.0', require: false
|
||||
|
|
|
|||
|
|
@ -563,7 +563,7 @@
|
|||
{"name":"sorted_set","version":"1.0.3","platform":"java","checksum":"996283f2e5c6e838825bcdcee31d6306515ae5f24bcb0ee4ce09dfff32919b8c"},
|
||||
{"name":"sorted_set","version":"1.0.3","platform":"ruby","checksum":"4f2b8bee6e8c59cbd296228c0f1f81679357177a8b6859dcc2a99e86cce6372f"},
|
||||
{"name":"spamcheck","version":"1.0.0","platform":"ruby","checksum":"dfeea085184091353e17d729d2f3d714b07cba36aaf64c32dfc35ce9b466fc9c"},
|
||||
{"name":"spring","version":"2.1.1","platform":"ruby","checksum":"0d0ccd42eb6ac035b26a6791d10715b3b59c069d1fcd34693d7782257cf85cf4"},
|
||||
{"name":"spring","version":"4.1.0","platform":"ruby","checksum":"f17f080fb0df558d663c897a6229ed3d5cc54819ab51876ea6eef49a67f0a3cb"},
|
||||
{"name":"spring-commands-rspec","version":"1.0.4","platform":"ruby","checksum":"6202e54fa4767452e3641461a83347645af478bf45dddcca9737b43af0dd1a2c"},
|
||||
{"name":"sprite-factory","version":"1.7.1","platform":"ruby","checksum":"5586524a1aec003241f1abc6852b61433e988aba5ee2b55f906387bf49b01ba2"},
|
||||
{"name":"sprockets","version":"3.7.2","platform":"ruby","checksum":"5ea1d7facd09203c1aa196afd6178208cd25abdbcc2a9978810a2f0754e152a0"},
|
||||
|
|
|
|||
|
|
@ -1399,7 +1399,7 @@ GEM
|
|||
set (~> 1.0)
|
||||
spamcheck (1.0.0)
|
||||
grpc (~> 1.0)
|
||||
spring (2.1.1)
|
||||
spring (4.1.0)
|
||||
spring-commands-rspec (1.0.4)
|
||||
spring (>= 0.9.1)
|
||||
sprite-factory (1.7.1)
|
||||
|
|
@ -1837,7 +1837,7 @@ DEPENDENCIES
|
|||
snowplow-tracker (~> 0.6.1)
|
||||
solargraph (~> 0.47.2)
|
||||
spamcheck (~> 1.0.0)
|
||||
spring (~> 2.1.0)
|
||||
spring (~> 4.1.0)
|
||||
spring-commands-rspec (~> 1.0.4)
|
||||
sprite-factory (~> 1.7)
|
||||
sprockets (~> 3.7.0)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import { GlButton, GlFormGroup } from '@gitlab/ui';
|
||||
import { GlAlert, GlButton, GlFormGroup } from '@gitlab/ui';
|
||||
import * as Sentry from '@sentry/browser';
|
||||
import { helpPagePath } from '~/helpers/help_page_helper';
|
||||
import { getDraft, clearDraft, updateDraft } from '~/lib/utils/autosave';
|
||||
|
|
@ -19,6 +19,7 @@ import WorkItemDescriptionRendered from './work_item_description_rendered.vue';
|
|||
export default {
|
||||
components: {
|
||||
EditedAt,
|
||||
GlAlert,
|
||||
GlButton,
|
||||
GlFormGroup,
|
||||
MarkdownEditor,
|
||||
|
|
@ -54,6 +55,7 @@ export default {
|
|||
isSubmittingWithKeydown: false,
|
||||
descriptionText: '',
|
||||
descriptionHtml: '',
|
||||
conflictedDescription: '',
|
||||
};
|
||||
},
|
||||
apollo: {
|
||||
|
|
@ -71,8 +73,14 @@ export default {
|
|||
return !this.queryVariables.id && !this.queryVariables.iid;
|
||||
},
|
||||
result() {
|
||||
this.descriptionText = this.workItemDescription?.description;
|
||||
this.descriptionHtml = this.workItemDescription?.descriptionHtml;
|
||||
if (this.isEditing) {
|
||||
if (this.descriptionText !== this.workItemDescription?.description) {
|
||||
this.conflictedDescription = this.workItemDescription?.description;
|
||||
}
|
||||
} else {
|
||||
this.descriptionText = this.workItemDescription?.description;
|
||||
this.descriptionHtml = this.workItemDescription?.descriptionHtml;
|
||||
}
|
||||
},
|
||||
error() {
|
||||
this.$emit('error', i18n.fetchError);
|
||||
|
|
@ -94,6 +102,9 @@ export default {
|
|||
canEdit() {
|
||||
return this.workItem?.userPermissions?.updateWorkItem || false;
|
||||
},
|
||||
hasConflicts() {
|
||||
return Boolean(this.conflictedDescription);
|
||||
},
|
||||
tracking() {
|
||||
return {
|
||||
category: TRACKING_CATEGORY_SHOW,
|
||||
|
|
@ -196,6 +207,7 @@ export default {
|
|||
|
||||
this.isEditing = false;
|
||||
clearDraft(this.autosaveKey);
|
||||
this.conflictedDescription = '';
|
||||
} catch (error) {
|
||||
this.$emit('error', error.message);
|
||||
Sentry.captureException(error);
|
||||
|
|
@ -267,17 +279,59 @@ export default {
|
|||
</template>
|
||||
</markdown-field>
|
||||
<div class="gl-display-flex">
|
||||
<gl-button
|
||||
category="primary"
|
||||
variant="confirm"
|
||||
:loading="isSubmitting"
|
||||
data-testid="save-description"
|
||||
@click="updateWorkItem"
|
||||
>{{ __('Save') }}
|
||||
</gl-button>
|
||||
<gl-button category="tertiary" class="gl-ml-3" data-testid="cancel" @click="cancelEditing"
|
||||
>{{ __('Cancel') }}
|
||||
</gl-button>
|
||||
<gl-alert
|
||||
v-if="hasConflicts"
|
||||
:dismissible="false"
|
||||
variant="danger"
|
||||
class="gl-w-full"
|
||||
data-testid="work-item-description-conflicts"
|
||||
>
|
||||
<p>
|
||||
{{
|
||||
s__(
|
||||
"WorkItem|Someone edited the description at the same time you did. If you save it will overwrite their changes. Please confirm you'd like to save your edits.",
|
||||
)
|
||||
}}
|
||||
</p>
|
||||
<details class="gl-mb-5">
|
||||
<summary class="gl-text-blue-500">{{ s__('WorkItem|View current version') }}</summary>
|
||||
<textarea
|
||||
class="note-textarea js-gfm-input js-autosize markdown-area gl-p-3"
|
||||
readonly
|
||||
:value="conflictedDescription"
|
||||
></textarea>
|
||||
</details>
|
||||
<template #actions>
|
||||
<gl-button
|
||||
category="primary"
|
||||
variant="confirm"
|
||||
:loading="isSubmitting"
|
||||
data-testid="save-description"
|
||||
@click="updateWorkItem"
|
||||
>{{ s__('WorkItem|Save and overwrite') }}
|
||||
</gl-button>
|
||||
<gl-button
|
||||
category="secondary"
|
||||
class="gl-ml-3"
|
||||
data-testid="cancel"
|
||||
@click="cancelEditing"
|
||||
>{{ s__('WorkItem|Discard changes') }}
|
||||
</gl-button>
|
||||
</template>
|
||||
</gl-alert>
|
||||
<template v-else>
|
||||
<gl-button
|
||||
category="primary"
|
||||
variant="confirm"
|
||||
:loading="isSubmitting"
|
||||
data-testid="save-description"
|
||||
@click="updateWorkItem"
|
||||
>{{ __('Save') }}
|
||||
</gl-button>
|
||||
<gl-button category="tertiary" class="gl-ml-3" data-testid="cancel" @click="cancelEditing"
|
||||
>{{ __('Cancel') }}
|
||||
</gl-button>
|
||||
</template>
|
||||
</div>
|
||||
</gl-form-group>
|
||||
<work-item-description-rendered
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ export default {
|
|||
ref="gfm-content"
|
||||
v-safe-html="descriptionHtml"
|
||||
class="md gl-mb-5 gl-min-h-8"
|
||||
data-testid="work-item-description"
|
||||
@change="toggleCheckboxes"
|
||||
></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,14 @@ module Resolvers
|
|||
description: 'Global ID of the package.'
|
||||
|
||||
def resolve(id:)
|
||||
Gitlab::Graphql::Lazy.with_value(find_object(id: id)) do |package|
|
||||
package if package.default?
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def find_object(id:)
|
||||
GitlabSchema.find_by_gid(id)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Types
|
||||
module Ci
|
||||
class RunnerJobExecutionStatusEnum < BaseEnum
|
||||
graphql_name 'CiRunnerJobExecutionStatus'
|
||||
|
||||
value 'IDLE',
|
||||
description: "Runner is idle.",
|
||||
value: :idle,
|
||||
deprecated: { milestone: '15.7', reason: :alpha }
|
||||
|
||||
value 'RUNNING',
|
||||
description: 'Runner is executing jobs.',
|
||||
value: :running,
|
||||
deprecated: { milestone: '15.7', reason: :alpha }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -91,6 +91,11 @@ module Types
|
|||
field :owner_project, ::Types::ProjectType, null: true,
|
||||
description: 'Project that owns the runner. For project runners only.',
|
||||
resolver: ::Resolvers::Ci::RunnerOwnerProjectResolver
|
||||
field :job_execution_status,
|
||||
Types::Ci::RunnerJobExecutionStatusEnum,
|
||||
null: true,
|
||||
description: 'Job execution status of the runner.',
|
||||
deprecated: { milestone: '15.7', reason: :alpha }
|
||||
|
||||
markdown_field :maintenance_note_html, null: true
|
||||
|
||||
|
|
@ -134,6 +139,16 @@ module Types
|
|||
batched_owners(::Ci::RunnerNamespace, Group, :runner_groups, :namespace_id)
|
||||
end
|
||||
|
||||
def job_execution_status
|
||||
BatchLoader::GraphQL.for(runner.id).batch(key: :running_builds_exist) do |runner_ids, loader|
|
||||
statuses = ::Ci::Runner.id_in(runner_ids).with_running_builds.index_by(&:id)
|
||||
|
||||
runner_ids.each do |runner_id|
|
||||
loader.call(runner_id, statuses[runner_id] ? :running : :idle)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def can_admin_runners?
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ module Types
|
|||
field :web_path, GraphQL::Types::String, null: true, description: 'Path to the package details page.'
|
||||
|
||||
def web_path
|
||||
return unless object.default?
|
||||
|
||||
package_path(object)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ module Types
|
|||
end
|
||||
|
||||
field :package,
|
||||
description: 'Find a package. This field can only be resolved for one query in any single request.',
|
||||
description: 'Find a package. This field can only be resolved for one query in any single request. Returns `null` if a package has no `default` status.',
|
||||
resolver: Resolvers::PackageDetailsResolver
|
||||
|
||||
field :user, Types::UserType,
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ module Ci
|
|||
TAG_LIST_MAX_LENGTH = 50
|
||||
|
||||
has_many :builds
|
||||
has_many :running_builds, inverse_of: :runner, class_name: 'Ci::RunningBuild'
|
||||
has_many :runner_projects, inverse_of: :runner, autosave: true, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent
|
||||
has_many :projects, through: :runner_projects, disable_joins: true
|
||||
has_many :runner_namespaces, inverse_of: :runner, autosave: true
|
||||
|
|
@ -89,6 +90,11 @@ module Ci
|
|||
scope :ordered, -> { order(id: :desc) }
|
||||
|
||||
scope :with_recent_runner_queue, -> { where('contacted_at > ?', recent_queue_deadline) }
|
||||
scope :with_running_builds, -> do
|
||||
where('EXISTS(?)',
|
||||
::Ci::RunningBuild.select(1)
|
||||
.where('ci_running_builds.runner_id = ci_runners.id'))
|
||||
end
|
||||
|
||||
# BACKWARD COMPATIBILITY: There are needed to maintain compatibility with `AVAILABLE_SCOPES` used by `lib/api/runners.rb`
|
||||
scope :deprecated_shared, -> { instance_type }
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ class WebHook < ApplicationRecord
|
|||
end
|
||||
|
||||
# See app/validators/json_schemas/web_hooks_url_variables.json
|
||||
VARIABLE_REFERENCE_RE = /\{([A-Za-z_][A-Za-z0-9_]+)\}/.freeze
|
||||
VARIABLE_REFERENCE_RE = /\{([A-Za-z]+[0-9]*(?:[._-][A-Za-z0-9]+)*)\}/.freeze
|
||||
|
||||
def interpolated_url
|
||||
return url unless url.include?('{')
|
||||
|
|
|
|||
|
|
@ -20,6 +20,6 @@
|
|||
.form-group
|
||||
= f.gitlab_ui_checkbox_component :dns_rebinding_protection_enabled,
|
||||
s_('OutboundRequests|Enforce DNS rebinding attack protection'),
|
||||
help_text: _('OutboundRequests|Resolve IP addresses once and uses them to submit requests.')
|
||||
help_text: s_('OutboundRequests|Resolve IP addresses once and uses them to submit requests.')
|
||||
|
||||
= f.submit _('Save changes'), pajamas_button: true, data: { qa_selector: 'save_changes_button' }
|
||||
|
|
|
|||
|
|
@ -3,10 +3,3 @@
|
|||
- if @group.licensed_feature_available?(:stale_runner_cleanup_for_namespace)
|
||||
.gl-mb-5
|
||||
#stale-runner-cleanup-form{ data: { group_full_path: @group.full_path, stale_timeout_secs: ::Ci::Runner::STALE_TIMEOUT.to_i } }
|
||||
= render Pajamas::BannerComponent.new(button_text: s_('Runners|Take me there!'),
|
||||
button_link: group_runners_path(@group),
|
||||
svg_path: 'illustrations/rocket-launch-md.svg',
|
||||
close_options: { class: 'gl-display-none' }) do |c|
|
||||
- c.title do
|
||||
= s_('Runners|New group runners view')
|
||||
%p= s_('Runners|The new view gives you more space and better visibility into your fleet of runners.')
|
||||
|
|
|
|||
|
|
@ -6,33 +6,8 @@ module WaitableWorker
|
|||
class_methods do
|
||||
# Schedules multiple jobs and waits for them to be completed.
|
||||
def bulk_perform_and_wait(args_list)
|
||||
# Short-circuit: it's more efficient to do small numbers of jobs inline
|
||||
if args_list.size == 1 && !always_async_project_authorizations_refresh?
|
||||
return bulk_perform_inline(args_list)
|
||||
end
|
||||
|
||||
bulk_perform_async(args_list)
|
||||
end
|
||||
|
||||
# Performs multiple jobs directly. Failed jobs will be put into sidekiq so
|
||||
# they can benefit from retries
|
||||
def bulk_perform_inline(args_list)
|
||||
failed = []
|
||||
|
||||
args_list.each do |args|
|
||||
worker = new
|
||||
Gitlab::AppJsonLogger.info(worker.structured_payload(message: 'running inline'))
|
||||
worker.perform(*args)
|
||||
rescue StandardError
|
||||
failed << args
|
||||
end
|
||||
|
||||
bulk_perform_async(failed) if failed.present?
|
||||
end
|
||||
|
||||
def always_async_project_authorizations_refresh?
|
||||
Feature.enabled?(:always_async_project_authorizations_refresh)
|
||||
end
|
||||
end
|
||||
|
||||
def perform(*args)
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
name: always_async_project_authorizations_refresh
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/92333
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/367683
|
||||
milestone: '15.3'
|
||||
type: development
|
||||
group: group::workspace
|
||||
default_enabled: true
|
||||
|
|
@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/373672
|
|||
milestone: '15.4'
|
||||
type: development
|
||||
group: group::workspace
|
||||
default_enabled: false
|
||||
default_enabled: true
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/382079
|
|||
milestone: '15.6'
|
||||
type: development
|
||||
group: group::security policies
|
||||
default_enabled: false
|
||||
default_enabled: true
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
# This is a template for a feature deprecation.
|
||||
#
|
||||
# Please refer to the deprecation guidelines to confirm your understanding of the
|
||||
# definitions for "Deprecation", "End of Support", and "Removal":
|
||||
# https://docs.gitlab.com/ee/development/deprecation_guidelines/#terminology
|
||||
#
|
||||
# Deprecations must be announced at least three releases prior to removal.
|
||||
# See the OPTIONAL END OF SUPPORT FIELDS section below if an End of Support period also applies.
|
||||
#
|
||||
# Breaking changes must happen in a major release.
|
||||
#
|
||||
# For more information please refer to the handbook documentation here:
|
||||
# https://about.gitlab.com/handbook/marketing/blog/release-posts/#deprecations
|
||||
#
|
||||
# Please delete this line and above before submitting your merge request.
|
||||
#
|
||||
# REQUIRED FIELDS
|
||||
#
|
||||
- title: "`POST ci/lint` API endpoint deprecated" # (required) The name of the feature to be deprecated
|
||||
announcement_milestone: "15.7" # (required) The milestone when this feature was first announced as deprecated.
|
||||
announcement_date: "2022-11-22" # (required) The date of the milestone release when this feature was first announced as deprecated. This should almost always be the 22nd of a month (YYYY-MM-22), unless you did an out of band blog post.
|
||||
removal_milestone: "16.00" # (required) The milestone when this feature is planned to be removed
|
||||
removal_date: 2021-03-22 # (required) The date of the milestone release when this feature is planned to be removed. This should almost always be the 22nd of a month (YYYY-MM-22), unless you did an out of band blog post.
|
||||
breaking_change: true # (required) If this deprecation is a breaking change, set this value to true
|
||||
reporter: dhershkovitch # (required) GitLab username of the person reporting the deprecation
|
||||
stage: verify # (required) String value of the stage that the feature was created in. e.g., Growth
|
||||
issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/381669 # (required) Link to the deprecation issue in GitLab
|
||||
body: | # (required) Do not modify this line, instead modify the lines below.
|
||||
The `POST ci/lint` API endpoint is deprecated in 15.7, and will be removed in 16.0. This endpoint does not validate the full range of CI/CD configuration options. Instead, use [`POST /projects/:id/ci/lint`](https://docs.gitlab.com/15.5/ee/api/lint.html#validate-a-ci-yaml-configuration-with-a-namespace), which properly validates CI/CD configuration.
|
||||
#
|
||||
# OPTIONAL END OF SUPPORT FIELDS
|
||||
#
|
||||
# If an End of Support period applies, the announcement should be shared with GitLab Support
|
||||
# in the `#spt_managers` channel in Slack, and mention `@gitlab-com/support` in this MR.
|
||||
#
|
||||
end_of_support_milestone: # (optional) Use "XX.YY" format. The milestone when support for this feature will end.
|
||||
end_of_support_date: # (optional) The date of the milestone release when support for this feature will end.
|
||||
#
|
||||
# OTHER OPTIONAL FIELDS
|
||||
#
|
||||
tiers: # (optional - may be required in the future) An array of tiers that the feature is available in currently. e.g., [Free, Silver, Gold, Core, Premium, Ultimate]
|
||||
documentation_url: # (optional) This is a link to the current documentation page
|
||||
image_url: # (optional) This is a link to a thumbnail image depicting the feature
|
||||
video_url: # (optional) Use the youtube thumbnail URL with the structure of https://img.youtube.com/vi/UNIQUEID/hqdefault.jpg
|
||||
|
|
@ -347,7 +347,7 @@ Returns [`Namespace`](#namespace).
|
|||
|
||||
### `Query.package`
|
||||
|
||||
Find a package. This field can only be resolved for one query in any single request.
|
||||
Find a package. This field can only be resolved for one query in any single request. Returns `null` if a package has no `default` status.
|
||||
|
||||
Returns [`PackageDetailsType`](#packagedetailstype).
|
||||
|
||||
|
|
@ -11012,6 +11012,7 @@ CI/CD variables for a project.
|
|||
| <a id="cirunnerid"></a>`id` | [`CiRunnerID!`](#cirunnerid) | ID of the runner. |
|
||||
| <a id="cirunneripaddress"></a>`ipAddress` | [`String`](#string) | IP address of the runner. |
|
||||
| <a id="cirunnerjobcount"></a>`jobCount` | [`Int`](#int) | Number of jobs processed by the runner (limited to 1000, plus one to indicate that more items exist). |
|
||||
| <a id="cirunnerjobexecutionstatus"></a>`jobExecutionStatus` **{warning-solid}** | [`CiRunnerJobExecutionStatus`](#cirunnerjobexecutionstatus) | **Introduced** in 15.7. This feature is in Alpha. It can be changed or removed at any time. Job execution status of the runner. |
|
||||
| <a id="cirunnerlocked"></a>`locked` | [`Boolean`](#boolean) | Indicates the runner is locked. |
|
||||
| <a id="cirunnermaintenancenote"></a>`maintenanceNote` | [`String`](#string) | Runner's maintenance notes. |
|
||||
| <a id="cirunnermaintenancenotehtml"></a>`maintenanceNoteHtml` | [`String`](#string) | The GitLab Flavored Markdown rendering of `maintenance_note`. |
|
||||
|
|
@ -16838,6 +16839,7 @@ Represents a product analytics dashboard widget.
|
|||
| <a id="projectissuesenabled"></a>`issuesEnabled` | [`Boolean`](#boolean) | Indicates if Issues are enabled for the current user. |
|
||||
| <a id="projectjiraimportstatus"></a>`jiraImportStatus` | [`String`](#string) | Status of Jira import background job of the project. |
|
||||
| <a id="projectjiraimports"></a>`jiraImports` | [`JiraImportConnection`](#jiraimportconnection) | Jira imports into the project. (see [Connections](#connections)) |
|
||||
| <a id="projectjitsukey"></a>`jitsuKey` **{warning-solid}** | [`String`](#string) | **Introduced** in 15.7. This feature is in Alpha. It can be changed or removed at any time. Jitsu key assigned to the project. |
|
||||
| <a id="projectjobsenabled"></a>`jobsEnabled` | [`Boolean`](#boolean) | Indicates if CI/CD pipeline jobs are enabled for the current user. |
|
||||
| <a id="projectlanguages"></a>`languages` | [`[RepositoryLanguage!]`](#repositorylanguage) | Programming languages used in the project. |
|
||||
| <a id="projectlastactivityat"></a>`lastActivityAt` | [`Time`](#time) | Timestamp of the project last activity. |
|
||||
|
|
@ -20875,6 +20877,13 @@ Values for YAML processor result.
|
|||
| <a id="cirunneraccesslevelnot_protected"></a>`NOT_PROTECTED` | A runner that is not protected. |
|
||||
| <a id="cirunneraccesslevelref_protected"></a>`REF_PROTECTED` | A runner that is ref protected. |
|
||||
|
||||
### `CiRunnerJobExecutionStatus`
|
||||
|
||||
| Value | Description |
|
||||
| ----- | ----------- |
|
||||
| <a id="cirunnerjobexecutionstatusidle"></a>`IDLE` **{warning-solid}** | **Introduced** in 15.7. This feature is in Alpha. It can be changed or removed at any time. Runner is idle. |
|
||||
| <a id="cirunnerjobexecutionstatusrunning"></a>`RUNNING` **{warning-solid}** | **Introduced** in 15.7. This feature is in Alpha. It can be changed or removed at any time. Runner is executing jobs. |
|
||||
|
||||
### `CiRunnerMembershipFilter`
|
||||
|
||||
Values for filtering runners in namespaces. The previous type name `RunnerMembershipFilter` was deprecated in 15.4.
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ can result in malformed data or broken packages.
|
|||
|
||||
## Get a project package
|
||||
|
||||
Get a single project package.
|
||||
Get a single project package. Only packages with status `default` are returned.
|
||||
|
||||
```plaintext
|
||||
GET /projects/:id/packages/:package_id
|
||||
|
|
@ -256,7 +256,7 @@ Example response:
|
|||
|
||||
The `_links` object contains the following properties:
|
||||
|
||||
- `web_path`: The path which you can visit in GitLab and see the details of the package.
|
||||
- `web_path`: The path which you can visit in GitLab and see the details of the package. Only available if the package has status `default`.
|
||||
- `delete_api_path`: The API path to delete the package. Only available if the request user has permission to do so.
|
||||
|
||||
## List package files
|
||||
|
|
|
|||
|
|
@ -180,6 +180,49 @@ respective database tables. Using `RANGE` partitioning works similarly to using
|
|||
of `partition_id` values, using `RANGE` partitioning might be a better
|
||||
strategy.
|
||||
|
||||
### Multi-project pipelines
|
||||
|
||||
Parent-child pipeline will always be part of the same partition because child
|
||||
pipelines are considered a resource of the parent pipeline. They can't be
|
||||
viewed individually in the project pipeline list page.
|
||||
|
||||
On the other hand, multi-project pipelines can be viewed in the pipeline list page.
|
||||
They can also be accessed from the pipeline graph as downstream/upstream links
|
||||
when created via the `trigger` token or the API using a job token.
|
||||
They can also be created from other pipelines by using trigger tokens, but in this
|
||||
case we don't store the source pipeline.
|
||||
|
||||
While partitioning `ci_builds` we need to update the foreign keys to the
|
||||
`ci_sources_pipelines` table:
|
||||
|
||||
```plain
|
||||
Foreign-key constraints:
|
||||
"fk_be5624bf37" FOREIGN KEY (source_job_id) REFERENCES ci_builds(id) ON DELETE CASCADE
|
||||
"fk_d4e29af7d7" FOREIGN KEY (source_pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE
|
||||
"fk_e1bad85861" FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE
|
||||
```
|
||||
|
||||
A `ci_sources_pipelines` record references two `ci_pipelines` rows (parent and
|
||||
the child). Our usual strategy has been to add a `partition_id` to the
|
||||
table, but if we do it here we will force all multi-project
|
||||
pipelines to be part of the same partition.
|
||||
|
||||
We should add two `partition_id` columns for this table, a
|
||||
`partition_id` and a `source_partition_id`:
|
||||
|
||||
```plain
|
||||
Foreign-key constraints:
|
||||
"fk_be5624bf37" FOREIGN KEY (source_job_id, source_partition_id) REFERENCES ci_builds(id, source_partition_id) ON DELETE CASCADE
|
||||
"fk_d4e29af7d7" FOREIGN KEY (source_pipeline_id, source_partition_id) REFERENCES ci_pipelines(id, source_partition_id) ON DELETE CASCADE
|
||||
"fk_e1bad85861" FOREIGN KEY (pipeline_id, partition_id) REFERENCES ci_pipelines(id, partition_id) ON DELETE CASCADE
|
||||
```
|
||||
|
||||
This solution is the closest to a two way door decision because:
|
||||
|
||||
- We retain the ability to reference pipelines in different partitions.
|
||||
- If we later decide that we want to force multi-project pipelines in the same partition
|
||||
we could add a constraint to validate that both columns have the same value.
|
||||
|
||||
## Why do we want to use explicit logical partition ids?
|
||||
|
||||
Partitioning CI/CD data using a logical `partition_id` has several benefits. We
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ locate the feature categories responsible for specific database tables.
|
|||
|
||||
## Location
|
||||
|
||||
Database dictionary metadata files are stored in the `gitlab` project under `db/docs/`.
|
||||
Database dictionary metadata files are stored in the `gitlab` project under `db/docs/` for the `main` and `ci` databases.
|
||||
For the `geo` database, the dictionary files are stored under `ee/db/docs/`.
|
||||
|
||||
## Example dictionary file
|
||||
|
||||
|
|
@ -40,12 +41,14 @@ milestone: '13.0'
|
|||
|
||||
## Adding tables
|
||||
|
||||
When adding a new table, create a new file under `db/docs/` named
|
||||
`<table_name>.yml` containing as much information as you know about the table.
|
||||
When adding a new table, create a new file under `db/docs/` for the `main` and `ci` databases.
|
||||
For the `geo` database use `ee/db/docs/`.
|
||||
Name the file as `<table_name>.yml`, containing as much information as you know about the table.
|
||||
|
||||
Include this file in the commit with the migration that creates the table.
|
||||
|
||||
## Dropping tables
|
||||
|
||||
When dropping a table, you must remove the metadata file from `db/docs/`
|
||||
in the same commit with the migration that drops the table.
|
||||
When dropping a table, you must remove the metadata file from `db/docs/` for `main` and `ci` databases.
|
||||
For the `geo` database, you must remove the file from `ee/db/docs/`.
|
||||
Use the same commit with the migration that drops the table.
|
||||
|
|
|
|||
|
|
@ -64,6 +64,20 @@ Review the details carefully before upgrading.
|
|||
The `gitlab.kas.metrics.port` has been deprecated in favor of the new `gitlab.kas.observability.port` configuration field for the [GitLab Helm Chart](https://gitlab.com/gitlab-org/charts/gitlab/-/merge_requests/2839).
|
||||
This port is used for much more than just metrics, which warranted this change to avoid confusion in configuration.
|
||||
|
||||
</div>
|
||||
|
||||
<div class="deprecation removal-1600 breaking-change">
|
||||
|
||||
### `POST ci/lint` API endpoint deprecated
|
||||
|
||||
Planned removal: GitLab <span class="removal-milestone">16.00</span> (2021-03-22)
|
||||
|
||||
WARNING:
|
||||
This is a [breaking change](https://docs.gitlab.com/ee/development/deprecation_guidelines/).
|
||||
Review the details carefully before upgrading.
|
||||
|
||||
The `POST ci/lint` API endpoint is deprecated in 15.7, and will be removed in 16.0. This endpoint does not validate the full range of CI/CD configuration options. Instead, use [`POST /projects/:id/ci/lint`](https://docs.gitlab.com/15.5/ee/api/lint.html#validate-a-ci-yaml-configuration-with-a-namespace), which properly validates CI/CD configuration.
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ type: reference
|
|||
GitLab allows users with the Owner role to set a project's or group's visibility as:
|
||||
|
||||
- **Public**
|
||||
- **Internal**
|
||||
- **[Internal](#internal-projects-and-groups)**
|
||||
- **Private**
|
||||
|
||||
These visibility levels affect who can see the project in the public access directory (`/public`
|
||||
|
|
@ -38,7 +38,7 @@ By default, `/public` is visible to unauthenticated users. However, if the
|
|||
[**Public** visibility level](admin_area/settings/visibility_and_access_controls.md#restrict-visibility-levels)
|
||||
is restricted, `/public` is visible only to signed-in users.
|
||||
|
||||
## Internal projects and groups
|
||||
## Internal projects and groups **(FREE SELF)**
|
||||
|
||||
Internal projects can be cloned by any signed-in user except
|
||||
[external users](permissions.md#external-users).
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ module API
|
|||
expose :status, documentation: { type: 'string', example: 'default' }
|
||||
|
||||
expose :_links do
|
||||
expose :web_path do |package|
|
||||
expose :web_path, if: ->(package) { package.default? } do |package|
|
||||
package_path(package)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -69,6 +69,8 @@ module API
|
|||
package = ::Packages::PackageFinder
|
||||
.new(user_project, params[:package_id]).execute
|
||||
|
||||
render_api_error!('Package not found', 404) unless package.default?
|
||||
|
||||
present package, with: ::API::Entities::Package, user: current_user, namespace: user_project.namespace
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -28485,6 +28485,9 @@ msgstr ""
|
|||
msgid "OnDemandScans|Timezone"
|
||||
msgstr ""
|
||||
|
||||
msgid "OnDemandScans|Verify configuration"
|
||||
msgstr ""
|
||||
|
||||
msgid "OnDemandScans|View results"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -35364,9 +35367,6 @@ msgstr ""
|
|||
msgid "Runners|Never expires"
|
||||
msgstr ""
|
||||
|
||||
msgid "Runners|New group runners view"
|
||||
msgstr ""
|
||||
|
||||
msgid "Runners|New registration token generated!"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -35576,12 +35576,6 @@ msgstr ""
|
|||
msgid "Runners|Tags control which type of jobs a runner can handle. By tagging a runner, you make sure shared runners only handle the jobs they are equipped to run."
|
||||
msgstr ""
|
||||
|
||||
msgid "Runners|Take me there!"
|
||||
msgstr ""
|
||||
|
||||
msgid "Runners|The new view gives you more space and better visibility into your fleet of runners."
|
||||
msgstr ""
|
||||
|
||||
msgid "Runners|The project, group or instance where the runner was registered. Instance runners are always owned by Administrator."
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -36719,6 +36713,9 @@ msgstr ""
|
|||
msgid "SecurityOrchestration|Select a project to store your security policies in. %{linkStart}More information.%{linkEnd}"
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityOrchestration|Select groups"
|
||||
msgstr ""
|
||||
|
||||
msgid "SecurityOrchestration|Select policy"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -46452,6 +46449,9 @@ msgstr ""
|
|||
msgid "WorkItem|Delete %{workItemType}"
|
||||
msgstr ""
|
||||
|
||||
msgid "WorkItem|Discard changes"
|
||||
msgstr ""
|
||||
|
||||
msgid "WorkItem|Due date"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -46521,12 +46521,18 @@ msgstr ""
|
|||
msgid "WorkItem|Requirements"
|
||||
msgstr ""
|
||||
|
||||
msgid "WorkItem|Save and overwrite"
|
||||
msgstr ""
|
||||
|
||||
msgid "WorkItem|Search existing %{workItemType}s"
|
||||
msgstr ""
|
||||
|
||||
msgid "WorkItem|Select type"
|
||||
msgstr ""
|
||||
|
||||
msgid "WorkItem|Someone edited the description at the same time you did. If you save it will overwrite their changes. Please confirm you'd like to save your edits."
|
||||
msgstr ""
|
||||
|
||||
msgid "WorkItem|Something went wrong when creating %{workItemType}. Please try again."
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -46593,6 +46599,9 @@ msgstr ""
|
|||
msgid "WorkItem|Use tasks to break down your work in an issue into smaller pieces. %{learnMoreLink}"
|
||||
msgstr ""
|
||||
|
||||
msgid "WorkItem|View current version"
|
||||
msgstr ""
|
||||
|
||||
msgid "WorkItem|Work Items"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
"@gitlab/at.js": "1.5.7",
|
||||
"@gitlab/favicon-overlay": "2.0.0",
|
||||
"@gitlab/svgs": "3.8.0",
|
||||
"@gitlab/ui": "49.10.0",
|
||||
"@gitlab/ui": "49.11.1",
|
||||
"@gitlab/visual-review-tools": "1.7.3",
|
||||
"@gitlab/web-ide": "0.0.1-dev-20221114183058",
|
||||
"@rails/actioncable": "6.1.4-7",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo '=> Generating code quality artifact...'
|
||||
echo
|
||||
|
||||
# Generate code quality artifact for Vale warnings only on changed files.
|
||||
# Only works on merged results pipelines, so first checks if a merged results CI variable is present.
|
||||
# If not present, runs on all files.
|
||||
|
||||
if [ -z "${CI_MERGE_REQUEST_TARGET_BRANCH_SHA}" ]
|
||||
then
|
||||
MD_DOC_PATH=${MD_DOC_PATH:-doc}
|
||||
echo "Merge request pipeline (detached) detected. Testing all files."
|
||||
else
|
||||
MERGE_BASE=$(git merge-base "${CI_MERGE_REQUEST_TARGET_BRANCH_SHA}" "${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA}")
|
||||
MD_DOC_PATH=$(git diff --diff-filter=d --name-only "${MERGE_BASE}..${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA}" -- 'doc/*.md')
|
||||
if [ -n "${MD_DOC_PATH}" ]
|
||||
then
|
||||
echo -e "Merged results pipeline detected. Testing only the following files: ${MD_DOC_PATH}"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "vale --output=doc/.vale/vale-json.tmpl --minAlertLevel warning ${MD_DOC_PATH} > gl-code-quality-report-docs.json"
|
||||
vale --output=doc/.vale/vale-json.tmpl --minAlertLevel warning ${MD_DOC_PATH} > gl-code-quality-report-docs.json
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe "Dashboard Issues Feed" do
|
||||
RSpec.describe "Dashboard Issues Feed", feature_category: :devops_reports do
|
||||
describe "GET /issues" do
|
||||
let!(:user) do
|
||||
user = create(:user, email: 'private1@example.com')
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe "Dashboard Feed" do
|
||||
RSpec.describe "Dashboard Feed", feature_category: :devops_reports do
|
||||
describe "GET /" do
|
||||
let!(:user) { create(:user, name: "Jonh") }
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe 'Issues Feed' do
|
||||
RSpec.describe 'Issues Feed', feature_category: :devops_reports do
|
||||
describe 'GET /issues' do
|
||||
let_it_be_with_reload(:user) do
|
||||
user = create(:user, email: 'private1@example.com')
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe 'Merge Requests Feed' do
|
||||
RSpec.describe 'Merge Requests Feed', feature_category: :devops_reports do
|
||||
describe 'GET /merge_requests' do
|
||||
let_it_be_with_reload(:user) { create(:user, email: 'private1@example.com') }
|
||||
let_it_be(:assignee) { create(:user, email: 'private2@example.com') }
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe "User Feed" do
|
||||
RSpec.describe "User Feed", feature_category: :devops_reports do
|
||||
describe "GET /" do
|
||||
let!(:user) { create(:user) }
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,10 @@ RSpec.describe 'Group issues page' do
|
|||
let(:project_with_issues_disabled) { create(:project, :issues_disabled, group: group) }
|
||||
let(:path) { issues_group_path(group) }
|
||||
|
||||
before do
|
||||
stub_feature_flags(or_issuable_queries: false)
|
||||
end
|
||||
|
||||
context 'with shared examples', :js do
|
||||
let(:issuable) { create(:issue, project: project, title: "this is my created issuable") }
|
||||
|
||||
|
|
|
|||
|
|
@ -23,11 +23,6 @@ RSpec.describe 'Group CI/CD settings' do
|
|||
visit group_settings_ci_cd_path(group)
|
||||
end
|
||||
|
||||
it 'displays the new group runners view banner' do
|
||||
expect(page).to have_content(s_('Runners|New group runners view'))
|
||||
expect(page).to have_link(href: group_runners_path(group))
|
||||
end
|
||||
|
||||
it 'has "Enable shared runners for this group" toggle', :js do
|
||||
expect(shared_runners_toggle).to have_content(_('Enable shared runners for this group'))
|
||||
end
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ RSpec.describe 'Groups > User sees users dropdowns in issuables list', :js do
|
|||
let!(:project) { create(:project, group: group) }
|
||||
|
||||
before do
|
||||
stub_feature_flags(or_issuable_queries: false)
|
||||
group.add_developer(user_in_dropdown)
|
||||
sign_in(user_in_dropdown)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ RSpec.describe 'Dropdown base', :js do
|
|||
let_it_be(:issue) { create(:issue, project: project) }
|
||||
|
||||
before do
|
||||
stub_feature_flags(or_issuable_queries: false)
|
||||
project.add_maintainer(user)
|
||||
sign_in(user)
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ RSpec.describe 'Dropdown emoji', :js do
|
|||
let_it_be(:award_emoji_star) { create(:award_emoji, name: 'star', user: user, awardable: issue) }
|
||||
|
||||
before do
|
||||
stub_feature_flags(or_issuable_queries: false)
|
||||
project.add_maintainer(user)
|
||||
create_list(:award_emoji, 2, user: user, name: 'thumbsup')
|
||||
create_list(:award_emoji, 1, user: user, name: 'thumbsdown')
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ RSpec.describe 'Dropdown label', :js do
|
|||
let_it_be(:label) { create(:label, project: project, title: 'bug-label') }
|
||||
|
||||
before do
|
||||
stub_feature_flags(or_issuable_queries: false)
|
||||
project.add_maintainer(user)
|
||||
sign_in(user)
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ RSpec.describe 'Dropdown milestone', :js do
|
|||
let_it_be(:issue) { create(:issue, project: project) }
|
||||
|
||||
before do
|
||||
stub_feature_flags(or_issuable_queries: false)
|
||||
project.add_maintainer(user)
|
||||
sign_in(user)
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ RSpec.describe 'Dropdown release', :js do
|
|||
let_it_be(:issue) { create(:issue, project: project) }
|
||||
|
||||
before do
|
||||
stub_feature_flags(or_issuable_queries: false)
|
||||
project.add_maintainer(user)
|
||||
sign_in(user)
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ RSpec.describe 'Labels Hierarchy', :js do
|
|||
let!(:project_label_1) { create(:label, project: project_1, title: 'Label_4') }
|
||||
|
||||
before do
|
||||
stub_feature_flags(or_issuable_queries: false)
|
||||
grandparent.add_owner(user)
|
||||
|
||||
sign_in(user)
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@ RSpec.describe 'User edit profile' do
|
|||
end
|
||||
end
|
||||
|
||||
it 'sets the users status to busy' do
|
||||
it 'sets the users status to busy', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/382965' do
|
||||
open_user_status_modal
|
||||
busy_status = find('[data-testid="user-availability-checkbox"]')
|
||||
|
||||
|
|
|
|||
|
|
@ -5,11 +5,13 @@ require 'spec_helper'
|
|||
RSpec.describe 'Work item', :js do
|
||||
let_it_be(:project) { create(:project, :public) }
|
||||
let_it_be(:user) { create(:user) }
|
||||
let_it_be(:other_user) { create(:user) }
|
||||
let_it_be(:work_item) { create(:work_item, project: project) }
|
||||
|
||||
context 'for signed in user' do
|
||||
before do
|
||||
project.add_developer(user)
|
||||
project.add_developer(other_user)
|
||||
|
||||
sign_in(user)
|
||||
|
||||
|
|
@ -28,6 +30,31 @@ RSpec.describe 'Work item', :js do
|
|||
expect(page).to have_text(user.name)
|
||||
end
|
||||
end
|
||||
|
||||
it 'shows conflict message when description changes', :aggregate_failures do
|
||||
click_button "Edit description"
|
||||
scroll_to(find('[aria-label="Description"]'))
|
||||
|
||||
# without this for some reason the test fails when running locally
|
||||
sleep 1
|
||||
|
||||
::WorkItems::UpdateService.new(
|
||||
project: work_item.project,
|
||||
current_user: other_user,
|
||||
params: { description: "oh no!" }
|
||||
).execute(work_item)
|
||||
|
||||
work_item.reload
|
||||
|
||||
find('[aria-label="Description"]').send_keys("oh yeah!")
|
||||
|
||||
warning = 'Someone edited the description at the same time you did.'
|
||||
expect(page.find('[data-testid="work-item-description-conflicts"]')).to have_text(warning)
|
||||
|
||||
click_button "Save and overwrite"
|
||||
|
||||
expect(page.find('[data-testid="work-item-description"]')).to have_text("oh yeah!")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -28,12 +28,9 @@
|
|||
},
|
||||
"_links": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"web_path"
|
||||
],
|
||||
"properties": {
|
||||
"details": {
|
||||
"type": "string"
|
||||
"web_path": {
|
||||
"type": ["string", "null"]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -111,6 +111,16 @@ describe('WorkItemDescription', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('has a subscription', async () => {
|
||||
createComponent();
|
||||
|
||||
await waitForPromises();
|
||||
|
||||
expect(subscriptionHandler).toHaveBeenCalledWith({
|
||||
issuableId: workItemQueryResponse.data.workItem.id,
|
||||
});
|
||||
});
|
||||
|
||||
describe('editing description', () => {
|
||||
it('shows edited by text', async () => {
|
||||
const lastEditedAt = '2022-09-21T06:18:42Z';
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ RSpec.describe GitlabSchema.types['CiRunner'] do
|
|||
id description created_at contacted_at maximum_timeout access_level active paused status
|
||||
version short_sha revision locked run_untagged ip_address runner_type tag_list
|
||||
project_count job_count admin_url edit_admin_url user_permissions executor_name architecture_name platform_name
|
||||
maintenance_note maintenance_note_html groups projects jobs token_expires_at owner_project
|
||||
maintenance_note maintenance_note_html groups projects jobs token_expires_at owner_project job_execution_status
|
||||
]
|
||||
|
||||
expect(described_class).to include_graphql_fields(*expected_fields)
|
||||
|
|
|
|||
|
|
@ -32,4 +32,12 @@ RSpec.describe API::Entities::Package do
|
|||
expect(subject[:_links][:web_path]).to match('/infrastructure_registry/')
|
||||
end
|
||||
end
|
||||
|
||||
context 'when package has no default status' do
|
||||
let(:package) { create(:package, :error) }
|
||||
|
||||
it 'does not expose web_path in _links' do
|
||||
expect(subject[:_links]).not_to have_key(:web_path)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -701,6 +701,32 @@ RSpec.describe Ci::Runner do
|
|||
it { is_expected.to eq([runner1]) }
|
||||
end
|
||||
|
||||
describe '.with_running_builds' do
|
||||
subject { described_class.with_running_builds }
|
||||
|
||||
let_it_be(:runner1) { create(:ci_runner) }
|
||||
|
||||
context 'with no builds running' do
|
||||
it { is_expected.to be_empty }
|
||||
end
|
||||
|
||||
context 'with single build running on runner2' do
|
||||
let(:runner2) { create(:ci_runner) }
|
||||
let(:runner3) { create(:ci_runner) }
|
||||
|
||||
before do
|
||||
project = create(:project, :repository)
|
||||
pipeline = create(:ci_pipeline, project: project)
|
||||
build2 = create(:ci_build, runner: runner2, pipeline: pipeline)
|
||||
create(:ci_running_build, build: build2, project: project, runner: runner2)
|
||||
build3 = create(:ci_build, runner: runner3, pipeline: pipeline)
|
||||
create(:ci_running_build, build: build3, project: project, runner: runner3)
|
||||
end
|
||||
|
||||
it { is_expected.to contain_exactly(runner2, runner3) }
|
||||
end
|
||||
end
|
||||
|
||||
describe '#matches_build?' do
|
||||
using RSpec::Parameterized::TableSyntax
|
||||
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ RSpec.describe 'Query.runner(id)' do
|
|||
'active' => runner.active,
|
||||
'paused' => !runner.active,
|
||||
'status' => runner.status('14.5').to_s.upcase,
|
||||
'jobExecutionStatus' => runner.running_builds.any? ? 'RUNNING' : 'IDLE',
|
||||
'maximumTimeout' => runner.maximum_timeout,
|
||||
'accessLevel' => runner.access_level.to_s.upcase,
|
||||
'runUntagged' => runner.run_untagged,
|
||||
|
|
@ -97,8 +98,12 @@ RSpec.describe 'Query.runner(id)' do
|
|||
'maintenanceNote' => runner.maintenance_note,
|
||||
'maintenanceNoteHtml' =>
|
||||
runner.maintainer_note.present? ? a_string_including('<strong>Test maintenance note</strong>') : '',
|
||||
'jobCount' => 0,
|
||||
'jobs' => a_hash_including("count" => 0, "nodes" => [], "pageInfo" => anything),
|
||||
'jobCount' => runner.running_builds.count,
|
||||
'jobs' => a_hash_including(
|
||||
"count" => runner.running_builds.count,
|
||||
"nodes" => an_instance_of(Array),
|
||||
"pageInfo" => anything
|
||||
),
|
||||
'projectCount' => nil,
|
||||
'adminUrl' => "http://localhost/admin/runners/#{runner.id}",
|
||||
'userPermissions' => {
|
||||
|
|
@ -179,6 +184,19 @@ RSpec.describe 'Query.runner(id)' do
|
|||
expect(runner_data).not_to include('tagList')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with build running' do
|
||||
before do
|
||||
project = create(:project, :repository)
|
||||
pipeline = create(:ci_pipeline, project: project)
|
||||
build = create(:ci_build, runner: runner, pipeline: pipeline)
|
||||
create(:ci_running_build, build: build, project: project, runner: runner)
|
||||
end
|
||||
|
||||
specify { expect(runner.running_builds.count).to eq 1 }
|
||||
|
||||
it_behaves_like 'runner details fetch'
|
||||
end
|
||||
end
|
||||
|
||||
describe 'for project runner' do
|
||||
|
|
|
|||
|
|
@ -226,5 +226,16 @@ RSpec.describe 'package details' do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'with package that has no default status' do
|
||||
before do
|
||||
composer_package.update!(status: :error)
|
||||
subject
|
||||
end
|
||||
|
||||
it "does not return package's details" do
|
||||
expect(package_details).to be_nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -350,6 +350,16 @@ RSpec.describe API::ProjectPackages do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when package has no default status' do
|
||||
let!(:package1) { create(:npm_package, :error, project: project) }
|
||||
|
||||
it 'returns 404' do
|
||||
subject
|
||||
|
||||
expect(response).to have_gitlab_http_status(:not_found)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'DELETE /projects/:id/packages/:package_id' do
|
||||
|
|
|
|||
|
|
@ -1585,13 +1585,6 @@
|
|||
- './ee/spec/lib/gitlab/slash_commands/presenters/issue_show_spec.rb'
|
||||
- './ee/spec/lib/gitlab/spdx/catalogue_gateway_spec.rb'
|
||||
- './ee/spec/lib/gitlab/spdx/catalogue_spec.rb'
|
||||
- './ee/spec/lib/gitlab/status_page/filter/image_filter_spec.rb'
|
||||
- './ee/spec/lib/gitlab/status_page/filter/mention_anonymization_filter_spec.rb'
|
||||
- './ee/spec/lib/gitlab/status_page/pipeline/post_process_pipeline_spec.rb'
|
||||
- './ee/spec/lib/gitlab/status_page_spec.rb'
|
||||
- './ee/spec/lib/gitlab/status_page/storage/s3_client_spec.rb'
|
||||
- './ee/spec/lib/gitlab/status_page/storage/s3_multipart_upload_spec.rb'
|
||||
- './ee/spec/lib/gitlab/status_page/storage_spec.rb'
|
||||
- './ee/spec/lib/gitlab/subscription_portal/clients/graphql_spec.rb'
|
||||
- './ee/spec/lib/gitlab/subscription_portal/client_spec.rb'
|
||||
- './ee/spec/lib/gitlab/subscription_portal/clients/rest_spec.rb'
|
||||
|
|
@ -2011,7 +2004,6 @@
|
|||
- './ee/spec/models/snippet_spec.rb'
|
||||
- './ee/spec/models/software_license_policy_spec.rb'
|
||||
- './ee/spec/models/software_license_spec.rb'
|
||||
- './ee/spec/models/status_page/project_setting_spec.rb'
|
||||
- './ee/spec/models/storage_shard_spec.rb'
|
||||
- './ee/spec/models/uploads/local_spec.rb'
|
||||
- './ee/spec/models/upload_spec.rb'
|
||||
|
|
@ -2539,7 +2531,6 @@
|
|||
- './ee/spec/serializers/security/license_policy_entity_spec.rb'
|
||||
- './ee/spec/serializers/security/vulnerability_report_data_entity_spec.rb'
|
||||
- './ee/spec/serializers/security/vulnerability_report_data_serializer_spec.rb'
|
||||
- './ee/spec/serializers/status_page/renderer_spec.rb'
|
||||
- './ee/spec/serializers/storage_shard_entity_spec.rb'
|
||||
- './ee/spec/serializers/test_reports_comparer_entity_spec.rb'
|
||||
- './ee/spec/serializers/test_reports_comparer_serializer_spec.rb'
|
||||
|
|
@ -3126,13 +3117,6 @@
|
|||
- './ee/spec/services/software_license_policies/create_service_spec.rb'
|
||||
- './ee/spec/services/software_license_policies/update_service_spec.rb'
|
||||
- './ee/spec/services/start_pull_mirroring_service_spec.rb'
|
||||
- './ee/spec/services/status_page/mark_for_publication_service_spec.rb'
|
||||
- './ee/spec/services/status_page/publish_attachments_service_spec.rb'
|
||||
- './ee/spec/services/status_page/publish_details_service_spec.rb'
|
||||
- './ee/spec/services/status_page/publish_list_service_spec.rb'
|
||||
- './ee/spec/services/status_page/publish_service_spec.rb'
|
||||
- './ee/spec/services/status_page/trigger_publish_service_spec.rb'
|
||||
- './ee/spec/services/status_page/unpublish_details_service_spec.rb'
|
||||
- './ee/spec/services/system_notes/epics_service_spec.rb'
|
||||
- './ee/spec/services/system_note_service_spec.rb'
|
||||
- './ee/spec/services/system_notes/escalations_service_spec.rb'
|
||||
|
|
@ -3443,7 +3427,6 @@
|
|||
- './ee/spec/workers/security/sync_scan_policies_worker_spec.rb'
|
||||
- './ee/spec/workers/security/track_secure_scans_worker_spec.rb'
|
||||
- './ee/spec/workers/set_user_status_based_on_user_cap_setting_worker_spec.rb'
|
||||
- './ee/spec/workers/status_page/publish_worker_spec.rb'
|
||||
- './ee/spec/workers/store_security_reports_worker_spec.rb'
|
||||
- './ee/spec/workers/sync_seat_link_request_worker_spec.rb'
|
||||
- './ee/spec/workers/sync_seat_link_worker_spec.rb'
|
||||
|
|
|
|||
|
|
@ -62,6 +62,21 @@ RSpec.shared_examples 'group and project packages query' do
|
|||
it 'returns the count of the packages' do
|
||||
expect(packages_count).to eq(4)
|
||||
end
|
||||
|
||||
context '_links' do
|
||||
let_it_be(:errored_package) { create(:maven_package, :error, project: project1) }
|
||||
|
||||
let(:package_web_paths) { graphql_data_at(resource_type, :packages, :nodes, :_links, :web_path) }
|
||||
|
||||
it 'does not contain the web path of errored package' do
|
||||
expect(package_web_paths.compact).to contain_exactly(
|
||||
"/#{project1.full_path}/-/packages/#{npm_package.id}",
|
||||
"/#{project1.full_path}/-/packages/#{maven_package.id}",
|
||||
"/#{project2.full_path}/-/packages/#{debian_package.id}",
|
||||
"/#{project2.full_path}/-/packages/#{composer_package.id}"
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the user does not have access to the resource' do
|
||||
|
|
|
|||
|
|
@ -14,12 +14,6 @@ RSpec.describe WaitableWorker do
|
|||
include ApplicationWorker
|
||||
prepend WaitableWorker
|
||||
|
||||
# This is a workaround for a Ruby 2.3.7 bug. rspec-mocks cannot restore
|
||||
# the visibility of prepended modules. See
|
||||
# https://github.com/rspec/rspec-mocks/issues/1231 for more details.
|
||||
def self.bulk_perform_inline(args_list)
|
||||
end
|
||||
|
||||
def perform(count = 0)
|
||||
self.class.counter += count
|
||||
end
|
||||
|
|
@ -37,27 +31,6 @@ RSpec.describe WaitableWorker do
|
|||
|
||||
worker.bulk_perform_and_wait(arguments)
|
||||
end
|
||||
|
||||
context 'when the feature flag `always_async_project_authorizations_refresh` is turned off' do
|
||||
before do
|
||||
stub_feature_flags(always_async_project_authorizations_refresh: false)
|
||||
end
|
||||
|
||||
it 'inlines the job' do
|
||||
args_list = [[1]]
|
||||
expect(worker).to receive(:bulk_perform_inline).with(args_list).and_call_original
|
||||
expect(Gitlab::AppJsonLogger).to(
|
||||
receive(:info).with(a_hash_including('message' => 'running inline',
|
||||
'class' => 'Gitlab::Foo::Bar::DummyWorker',
|
||||
'job_status' => 'running',
|
||||
'queue' => 'foo_bar_dummy'))
|
||||
.once)
|
||||
|
||||
worker.bulk_perform_and_wait(args_list)
|
||||
|
||||
expect(worker.counter).to eq(1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'between 2 and 3 jobs' do
|
||||
|
|
@ -81,22 +54,6 @@ RSpec.describe WaitableWorker do
|
|||
end
|
||||
end
|
||||
|
||||
describe '.bulk_perform_inline' do
|
||||
it 'runs the jobs inline' do
|
||||
expect(worker).not_to receive(:bulk_perform_async)
|
||||
|
||||
worker.bulk_perform_inline([[1], [2]])
|
||||
|
||||
expect(worker.counter).to eq(3)
|
||||
end
|
||||
|
||||
it 'enqueues jobs if an error is raised' do
|
||||
expect(worker).to receive(:bulk_perform_async).with([['foo']])
|
||||
|
||||
worker.bulk_perform_inline([[1], ['foo']])
|
||||
end
|
||||
end
|
||||
|
||||
describe '#perform' do
|
||||
shared_examples 'perform' do
|
||||
it 'notifies the JobWaiter when done if the key is provided' do
|
||||
|
|
|
|||
|
|
@ -1113,10 +1113,10 @@
|
|||
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-3.8.0.tgz#bc7fa51e345e26cff56fdff629ea439adfa1e0cb"
|
||||
integrity sha512-DUWeG2Vx+1ntZ/1GT6S36ZOtXvM5Wm02MtDRrQS4GuOX4rkTeG9aoutSJuwQ2h9BNtxl0U/jkf5GVBxacj18XA==
|
||||
|
||||
"@gitlab/ui@49.10.0":
|
||||
version "49.10.0"
|
||||
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-49.10.0.tgz#54715c18d3e06f313b572c5b9b807622f7a35b19"
|
||||
integrity sha512-hBkU5TIdc2bzqe4P2X/BZXgQQQa+Sp4A5eWiKK+FVuCx5l1To2q4EyHHPMn292AJx7Y23qM2jP4GMphbs2wtDg==
|
||||
"@gitlab/ui@49.11.1":
|
||||
version "49.11.1"
|
||||
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-49.11.1.tgz#ce18f23ac4f48159e8f57f8dedef2f05890a97f2"
|
||||
integrity sha512-iFhhi03Vrz+wxxUzwVmaaP1s0qeJtACCEpj7xESDVbevjDEqf1muMz/PTH10NslrVbf1VchqNwSC+Ww6C7yAKQ==
|
||||
dependencies:
|
||||
"@popperjs/core" "^2.11.2"
|
||||
bootstrap-vue "2.20.1"
|
||||
|
|
|
|||
Loading…
Reference in New Issue