From 0704d5dada4b45f4c70c0edf4c3ef91d065b3ab7 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 5 Jun 2024 12:24:46 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .gitlab-ci.yml | 4 +- .gitlab/ci/docs.gitlab-ci.yml | 28 ++-- .gitlab/ci/rules.gitlab-ci.yml | 2 +- .../Revert To Resolve Incident.md | 2 +- .rubocop_todo/gitlab/strong_memoize_attr.yml | 2 - .rubocop_todo/rspec/context_wording.yml | 1 - .rubocop_todo/rspec/feature_category.yml | 1 - .rubocop_todo/rspec/named_subject.yml | 1 - .rubocop_todo/rspec/scattered_let.yml | 1 - .rubocop_todo/rspec/verified_doubles.yml | 1 - .rubocop_todo/style/if_unless_modifier.yml | 2 - GITLAB_PAGES_VERSION | 2 +- Gemfile | 2 +- Gemfile.checksum | 2 +- Gemfile.lock | 4 +- .../components/app.vue | 2 +- .../javascripts/issues/list/constants.js | 21 +++ .../reviewers/reviewer_dropdown.vue | 2 +- .../components/merge_requests_list_app.vue | 16 +++ .../queries/get_merge_requests.query.graphql | 2 + .../filtered_search_bar/constants.js | 1 + .../concerns/finder_with_group_hierarchy.rb | 5 + app/models/ci/pipeline.rb | 4 +- app/models/concerns/enums/sbom.rb | 4 +- app/models/group.rb | 2 +- .../preloaders/group_policy_preloader.rb | 5 + app/models/user.rb | 2 +- app/policies/group_policy.rb | 23 ++- .../use_ids_for_markdown_upload_urls.yml | 9 -- ...ate_ci_used_minutes_by_runner_daily_mv2.rb | 50 +++++++ ...fill_ml_experiment_metadata_project_id.yml | 9 ++ db/docs/ml_experiment_metadata.yml | 1 + .../requirements_management_test_reports.yml | 4 +- db/docs/subscription_add_on_purchases.yml | 2 +- db/fixtures/development/33_triage_ops.rb | 3 +- ...ion_id_to_subscription_add_on_purchases.rb | 13 ++ ..._index_on_subscription_add_on_purchases.rb | 17 +++ ..._id_fk_to_subscription_add_on_purchases.rb | 25 ++++ ...dd_project_id_to_ml_experiment_metadata.rb | 9 ++ ...ex_ml_experiment_metadata_on_project_id.rb | 16 +++ ...dd_ml_experiment_metadata_project_id_fk.rb | 16 +++ ..._experiment_metadata_project_id_trigger.rb | 25 ++++ ...kfill_ml_experiment_metadata_project_id.rb | 40 ++++++ db/schema_migrations/20240528142856 | 1 + db/schema_migrations/20240528145914 | 1 + db/schema_migrations/20240529123246 | 1 + db/schema_migrations/20240604074200 | 1 + db/schema_migrations/20240604074201 | 1 + db/schema_migrations/20240604074202 | 1 + db/schema_migrations/20240604074203 | 1 + db/schema_migrations/20240604074204 | 1 + db/structure.sql | 30 ++++ .../reference_architectures/1k_users.md | 2 +- doc/api/graphql/reference/index.md | 59 ++++++++ doc/api/members.md | 4 + doc/ci/docker/using_docker_build.md | 12 +- doc/development/pipelines/index.md | 6 +- doc/update/versions/gitlab_16_changes.md | 109 ++++++++++++++ .../secret_detection/pipeline/index.md | 13 +- doc/user/group/import/index.md | 2 + doc/user/img/explain_code_experiment.png | Bin 109217 -> 0 bytes doc/user/project/merge_requests/changes.md | 37 +++-- doc/user/project/repository/code_explain.md | 36 +++-- .../code_suggestions/troubleshooting.md | 13 ++ .../repository/img/explain_code_v17_1.png | Bin 0 -> 18520 bytes doc/user/workspace/index.md | 6 +- keeps/quarantine_flaky_tests.rb | 2 +- lib/api/entities/project_upload.rb | 20 +-- lib/banzai/filter/upload_link_filter.rb | 12 +- lib/click_house/write_buffer.rb | 17 ++- ...l_epic_basic_fields_to_work_item_record.rb | 22 ++- ...kfill_ml_experiment_metadata_project_id.rb | 10 ++ .../backfill_work_item_hierarchy_for_epics.rb | 24 ++-- .../ci/pipeline/chain/build/associations.rb | 4 +- .../ci/pipeline/chain/config/process.rb | 4 +- .../pipeline/chain/evaluate_workflow_rules.rb | 12 +- lib/gitlab/ci/pipeline/chain/helpers.rb | 21 ++- .../ci/pipeline/chain/limit/active_jobs.rb | 2 +- .../ci/pipeline/chain/limit/deployments.rb | 2 +- lib/gitlab/ci/pipeline/chain/populate.rb | 6 +- lib/gitlab/ci/pipeline/chain/seed.rb | 23 ++- .../ci/pipeline/chain/validate/external.rb | 4 +- locale/gitlab.pot | 2 +- package.json | 4 +- scripts/lint-doc.sh | 2 +- scripts/pipeline/set_pipeline_name.rb | 48 ++++--- spec/controllers/groups_controller_spec.rb | 2 +- spec/features/admin/admin_hooks_spec.rb | 2 +- spec/features/expand_collapse_diffs_spec.rb | 3 +- spec/features/groups_spec.rb | 2 +- .../projects/commits/multi_view_diff_spec.rb | 2 +- spec/features/projects/new_project_spec.rb | 2 +- .../settings/monitor_settings_spec.rb | 2 +- .../merge_requests_list_app_spec.js | 16 ++- .../banzai/filter/upload_link_filter_spec.rb | 38 ----- spec/lib/click_house/write_buffer_spec.rb | 22 +-- ..._ml_experiment_metadata_project_id_spec.rb | 15 ++ .../gitlab/ci/pipeline/chain/helpers_spec.rb | 134 +++++++++--------- spec/lib/gitlab/database/sharding_key_spec.rb | 1 - .../project/relation_factory_spec.rb | 2 +- .../import_export/project/tree_saver_spec.rb | 2 +- ..._ml_experiment_metadata_project_id_spec.rb | 33 +++++ spec/models/ci/pipeline_spec.rb | 4 +- spec/models/group_spec.rb | 14 +- spec/policies/group_policy_spec.rb | 12 ++ spec/policies/upload_policy_spec.rb | 2 +- .../project_export_presenter_spec.rb | 2 +- spec/requests/api/user_runners_spec.rb | 2 +- .../pipeline/set_pipeline_name_spec.rb | 30 +++- .../ci/runners/create_runner_service_spec.rb | 2 +- .../create_service_spec.rb | 2 +- spec/support/matchers/access_matchers.rb | 4 +- .../access_matchers_for_controller.rb | 2 +- spec/support/rspec_order_todo.yml | 1 - .../runners_resolver_shared_context.rb | 2 +- .../policies/group_policy_shared_context.rb | 4 +- .../models/member_shared_examples.rb | 4 +- .../requests/admin_mode_shared_examples.rb | 2 +- spec/tooling/danger/stable_branch_spec.rb | 6 +- tooling/danger/stable_branch.rb | 12 +- yarn.lock | 106 +++++++------- 121 files changed, 992 insertions(+), 460 deletions(-) delete mode 100644 config/feature_flags/gitlab_com_derisk/use_ids_for_markdown_upload_urls.yml create mode 100644 db/click_house/migrate/main/20240605104100_recreate_ci_used_minutes_by_runner_daily_mv2.rb create mode 100644 db/docs/batched_background_migrations/backfill_ml_experiment_metadata_project_id.yml create mode 100644 db/migrate/20240528142856_add_organization_id_to_subscription_add_on_purchases.rb create mode 100644 db/migrate/20240528145914_add_organization_id_index_on_subscription_add_on_purchases.rb create mode 100644 db/migrate/20240529123246_add_organization_id_fk_to_subscription_add_on_purchases.rb create mode 100644 db/migrate/20240604074200_add_project_id_to_ml_experiment_metadata.rb create mode 100644 db/post_migrate/20240604074201_index_ml_experiment_metadata_on_project_id.rb create mode 100644 db/post_migrate/20240604074202_add_ml_experiment_metadata_project_id_fk.rb create mode 100644 db/post_migrate/20240604074203_add_ml_experiment_metadata_project_id_trigger.rb create mode 100644 db/post_migrate/20240604074204_queue_backfill_ml_experiment_metadata_project_id.rb create mode 100644 db/schema_migrations/20240528142856 create mode 100644 db/schema_migrations/20240528145914 create mode 100644 db/schema_migrations/20240529123246 create mode 100644 db/schema_migrations/20240604074200 create mode 100644 db/schema_migrations/20240604074201 create mode 100644 db/schema_migrations/20240604074202 create mode 100644 db/schema_migrations/20240604074203 create mode 100644 db/schema_migrations/20240604074204 delete mode 100644 doc/user/img/explain_code_experiment.png create mode 100644 doc/user/project/repository/img/explain_code_v17_1.png create mode 100644 lib/gitlab/background_migration/backfill_ml_experiment_metadata_project_id.rb create mode 100644 spec/lib/gitlab/background_migration/backfill_ml_experiment_metadata_project_id_spec.rb create mode 100644 spec/migrations/20240604074204_queue_backfill_ml_experiment_metadata_project_id_spec.rb diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f150c57c84a35..995b0d0d339f3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -265,13 +265,13 @@ include: - local: .gitlab/ci/includes/as-if-jh.gitlab-ci.yml rules: # Only run as-if-jh triggerred pipelines for gitlab.com/gitlab-org/gitlab MRs that don't target stable branches - # and that don't have the quarantine or pipeline:expedite labels. + # and that don't have the quarantine or pipeline::expedited labels. - if: '$CI_PROJECT_URL != "https://gitlab.com/gitlab-org/gitlab"' when: never - if: '$CI_MERGE_REQUEST_ID == null' when: never - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ /^[\d-]+-stable(-ee|-jh)?$/' when: never - - if: '$CI_MERGE_REQUEST_LABELS =~ /quarantine/ || $CI_MERGE_REQUEST_LABELS =~ /pipeline:expedite/' + - if: '$CI_MERGE_REQUEST_LABELS =~ /quarantine/ || $CI_MERGE_REQUEST_LABELS =~ /pipeline::expedited/ || $CI_MERGE_REQUEST_LABELS =~ /pipeline:expedite/' when: never - when: always diff --git a/.gitlab/ci/docs.gitlab-ci.yml b/.gitlab/ci/docs.gitlab-ci.yml index c693e6f047abf..c441bcae93b49 100644 --- a/.gitlab/ci/docs.gitlab-ci.yml +++ b/.gitlab/ci/docs.gitlab-ci.yml @@ -39,26 +39,9 @@ review-docs-cleanup: script: - ./scripts/trigger-build.rb docs cleanup -docs-lint links: - extends: - - .docs:rules:docs-lint - image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-docs/lint-html:alpine-3.19-ruby-3.2.3-acbeb4ef - stage: lint - needs: [] - script: - # Prepare docs for build - # The path must be 'ee/' because we have hardcoded links relying on it - # https://gitlab.com/gitlab-org/gitlab-docs/-/blob/887850752fc0e72856da6632db132f005ba77f16/content/index.erb#L44-63 - - mv doc/ /tmp/gitlab-docs/content/ee - - cd /tmp/gitlab-docs - # Build HTML from Markdown - - make compile - # Check the internal links and anchors (in parallel) - - "parallel time bundle exec nanoc check ::: internal_links internal_anchors" - .docs-markdown-lint-image: # When updating the image version here, update it in /scripts/lint-doc.sh too. - image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-docs/lint-markdown:alpine-3.19-vale-3.0.7-markdownlint-0.39.0-markdownlint2-0.12.1 + image: ${REGISTRY_HOST}/${REGISTRY_GROUP}/gitlab-docs/lint-markdown:alpine-3.20-vale-3.4.2-markdownlint2-0.13.0-lychee-0.15.1 docs-lint markdown: extends: @@ -103,6 +86,15 @@ docs code_quality: expire_in: 2 weeks when: always +docs-lint links: + extends: + - .docs:rules:docs-lint + - .docs-markdown-lint-image + stage: lint + needs: [] + script: + - lychee --offline --include-fragments doc/**/*.md + ui-docs-links lint: extends: - .docs:rules:docs-lint diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index ca9dcdccad9e6..66504979af37a 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -105,7 +105,7 @@ if: '($CI_MERGE_REQUEST_EVENT_TYPE == "merged_result" || $CI_MERGE_REQUEST_EVENT_TYPE == "detached") && $CI_MERGE_REQUEST_LABELS =~ /group::global search/' .if-merge-request-labels-pipeline-expedite: &if-merge-request-labels-pipeline-expedite - if: '($CI_MERGE_REQUEST_EVENT_TYPE == "merged_result" || $CI_MERGE_REQUEST_EVENT_TYPE == "detached") && $CI_MERGE_REQUEST_LABELS =~ /pipeline:expedite/' + if: '($CI_MERGE_REQUEST_EVENT_TYPE == "merged_result" || $CI_MERGE_REQUEST_EVENT_TYPE == "detached") && ($CI_MERGE_REQUEST_LABELS =~ /pipeline::expedited/ || $CI_MERGE_REQUEST_LABELS =~ /pipeline:expedite/)' .if-merge-request-labels-frontend-and-feature-flag: &if-merge-request-labels-frontend-and-feature-flag if: '($CI_MERGE_REQUEST_EVENT_TYPE == "merged_result" || $CI_MERGE_REQUEST_EVENT_TYPE == "detached") && $CI_MERGE_REQUEST_LABELS =~ /frontend/ && $CI_MERGE_REQUEST_LABELS =~ /feature flag/' diff --git a/.gitlab/merge_request_templates/Revert To Resolve Incident.md b/.gitlab/merge_request_templates/Revert To Resolve Incident.md index cbf708447e939..241f8c91d231f 100644 --- a/.gitlab/merge_request_templates/Revert To Resolve Incident.md +++ b/.gitlab/merge_request_templates/Revert To Resolve Incident.md @@ -23,7 +23,7 @@ ### Related issues and merge requests -/label ~"pipeline:expedite" ~"master:broken" ~"Pick into auto-deploy" ~"severity::1" ~"priority::1" +/label ~"pipeline::expedited" ~"master:broken" ~"Pick into auto-deploy" ~"severity::1" ~"priority::1"