From 7eb03d3ceb6585f2c80a5bb77e9045e0cc368cc2 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 12 Mar 2025 09:09:57 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .gitlab/ci/docs.gitlab-ci.yml | 30 ++++++--- .gitlab/ci/frontend.gitlab-ci.yml | 67 +++++++++++++++---- .../credentials_filter_sort_app.vue | 3 +- .../concerns/diffs_stream_resource.rb | 17 ----- .../concerns/rapid_diffs_resource.rb | 34 ++++++++++ app/controllers/projects/commit_controller.rb | 6 +- .../projects/compare_controller.rb | 5 ++ .../merge_requests/creations_controller.rb | 5 ++ .../projects/merge_requests_controller.rb | 6 +- .../work_items/widgets/status_resolver.rb | 17 ----- app/graphql/types/group_type.rb | 4 -- app/graphql/types/namespace_type.rb | 4 -- app/graphql/types/project_type.rb | 4 -- .../work_items/widget_definition_interface.rb | 6 +- .../widget_definitions/status_type.rb | 21 ------ .../types/work_items/widget_interface.rb | 1 - .../types/work_items/widgets/status_type.rb | 43 ------------ app/models/merge_request.rb | 6 ++ app/models/work_items/widget_definition.rb | 2 +- app/models/work_items/widgets/status.rb | 25 ------- .../work_items/data_sync/widgets/status.rb | 12 ---- .../sidekiq_concurrency_limit_middleware.yml | 2 +- config/routes/merge_requests.rb | 2 + config/routes/repository.rb | 2 + db/docs/instance_type_ci_runner_machines.yml | 3 +- ..._project_id_to_merge_request_diff_files.rb | 8 ++- ...ect_id_fk_from_merge_request_diff_files.rb | 20 ++++++ db/schema_migrations/20250312061803 | 1 + db/structure.sql | 3 - doc/api/graphql/reference/_index.md | 4 +- .../merge_request_approval_policies.md | 2 +- scripts/utils.sh | 4 +- ...e_spec.rb => rapid_diffs_resource_spec.rb} | 16 ++++- .../projects/compare_controller_spec.rb | 27 ++++++++ spec/db/schema_spec.rb | 2 +- .../widgets/status_resolver_spec.rb | 53 --------------- spec/graphql/types/group_type_spec.rb | 2 +- spec/graphql/types/namespace_type_spec.rb | 2 +- spec/graphql/types/project_type_spec.rb | 4 +- .../widget_definition_interface_spec.rb | 6 -- .../types/work_items/widget_interface_spec.rb | 1 - .../work_items/widgets/status_type_spec.rb | 13 ---- .../work_items/widget_definition_spec.rb | 4 +- spec/requests/api/graphql/work_item_spec.rb | 31 --------- .../organizations_controller_spec.rb | 9 ++- .../projects/commit_controller_spec.rb | 28 ++++++++ .../projects/merge_requests/creations_spec.rb | 30 +++++++++ .../merge_requests_controller_spec.rb | 22 ++++++ .../work_item_types_shared_context.rb | 56 ---------------- .../diff_files_metadata_shared_examples.rb | 30 +++++++++ .../work_item_type_list_shared_examples.rb | 19 ------ 51 files changed, 344 insertions(+), 380 deletions(-) delete mode 100644 app/controllers/concerns/diffs_stream_resource.rb create mode 100644 app/controllers/concerns/rapid_diffs_resource.rb delete mode 100644 app/graphql/resolvers/work_items/widgets/status_resolver.rb delete mode 100644 app/graphql/types/work_items/widget_definitions/status_type.rb delete mode 100644 app/graphql/types/work_items/widgets/status_type.rb delete mode 100644 app/models/work_items/widgets/status.rb delete mode 100644 app/services/work_items/data_sync/widgets/status.rb create mode 100644 db/migrate/20250312061803_remove_project_id_fk_from_merge_request_diff_files.rb create mode 100644 db/schema_migrations/20250312061803 rename spec/controllers/concerns/{diffs_stream_resource_spec.rb => rapid_diffs_resource_spec.rb} (75%) delete mode 100644 spec/graphql/resolvers/work_items/widgets/status_resolver_spec.rb delete mode 100644 spec/graphql/types/work_items/widgets/status_type_spec.rb create mode 100644 spec/support/shared_examples/diff_files_metadata_shared_examples.rb diff --git a/.gitlab/ci/docs.gitlab-ci.yml b/.gitlab/ci/docs.gitlab-ci.yml index 7cec66e2408..18cb4ba3d7f 100644 --- a/.gitlab/ci/docs.gitlab-ci.yml +++ b/.gitlab/ci/docs.gitlab-ci.yml @@ -47,10 +47,15 @@ docs-lint markdown: needs: [] script: - source ./scripts/utils.sh - - yarn_install_script - - install_gitlab_gem - - scripts/lint-doc.sh - - scripts/lint/check_mermaid.mjs + - | + function docs_lint_markdown() { + yarn_install_script + install_gitlab_gem + scripts/lint-doc.sh + scripts/lint/check_mermaid.mjs + } + + run_with_custom_exit_code docs_lint_markdown docs code_quality: extends: @@ -97,8 +102,10 @@ docs-lint links: - .docs-markdown-lint-image stage: lint needs: [] + before_script: + - source scripts/utils.sh script: - - lychee --offline --no-progress --include-fragments doc + - run_with_custom_exit_code lychee --offline --no-progress --include-fragments doc docs-lint deprecations-and-removals: variables: @@ -111,8 +118,13 @@ docs-lint deprecations-and-removals: stage: lint needs: [] script: - - bundle exec rake gitlab:docs:check_deprecations - - bundle exec rake gitlab:docs:check_windows + - | + function docs_lint_deprecations_and_removals() { + bundle exec rake gitlab:docs:check_deprecations + bundle exec rake gitlab:docs:check_windows + } + + run_with_custom_exit_code docs_lint_deprecations_and_removals docs-lint redirects: image: ${GITLAB_DEPENDENCY_PROXY_ADDRESS}ruby:${RUBY_VERSION}-alpine @@ -121,5 +133,7 @@ docs-lint redirects: - .default-retry - .docs:rules:redirect-check needs: [] + before_script: + - source scripts/utils.sh script: - - ./scripts/lint-docs-redirects.rb + - run_with_custom_exit_code ./scripts/lint-docs-redirects.rb diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml index 770e50c7c67..fcf40a5a61c 100644 --- a/.gitlab/ci/frontend.gitlab-ci.yml +++ b/.gitlab/ci/frontend.gitlab-ci.yml @@ -334,7 +334,7 @@ jest: junit: junit_jest.xml parallel: 11 script: - - run_timed_command scripts/frontend/jest_ci.js + - run_with_custom_exit_code run_timed_command scripts/frontend/jest_ci.js jest-with-fixtures: extends: @@ -348,7 +348,7 @@ jest-with-fixtures: - !reference [.with-fixtures-needs, needs] parallel: 2 script: - - run_timed_command "scripts/frontend/jest_ci.js --fixtures" + - run_with_custom_exit_code run_timed_command "scripts/frontend/jest_ci.js --fixtures" jest vue3: extends: @@ -388,7 +388,7 @@ jest vue3 mr: - junit_jest.xml parallel: 6 script: - - run_timed_command "scripts/frontend/jest_ci.js --vue3" + - run_with_custom_exit_code run_timed_command "scripts/frontend/jest_ci.js --vue3" allow_failure: false jest-with-fixtures vue3 mr: @@ -408,7 +408,7 @@ jest-with-fixtures vue3 mr: - junit_jest.xml parallel: 1 script: - - run_timed_command "scripts/frontend/jest_ci.js --vue3 --fixtures" + - run_with_custom_exit_code run_timed_command "scripts/frontend/jest_ci.js --vue3 --fixtures" jest predictive: extends: @@ -418,7 +418,15 @@ jest predictive: - !reference [jest, needs] - "detect-tests" script: - - if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then run_timed_command "scripts/frontend/jest_ci.js --predictive"; fi + - | + function jest_predictive() { + if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then + run_timed_command "scripts/frontend/jest_ci.js --predictive" + fi + } + + run_with_custom_exit_code jest_predictive + parallel: 4 jest-with-fixtures predictive: @@ -429,7 +437,14 @@ jest-with-fixtures predictive: - !reference [jest-with-fixtures, needs] - "detect-tests" script: - - if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then run_timed_command "scripts/frontend/jest_ci.js --predictive --fixtures"; fi + - | + function jest_with_fixtures_predictive() { + if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then + run_timed_command "scripts/frontend/jest_ci.js --predictive --fixtures" + fi + } + + run_with_custom_exit_code jest_with_fixtures_predictive jest vue3 predictive: extends: @@ -439,7 +454,14 @@ jest vue3 predictive: - !reference [jest vue3 mr, needs] - "detect-tests" script: - - if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then run_timed_command "scripts/frontend/jest_ci.js --vue3 --predictive"; fi + - | + function jest_vue3_predictive() { + if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then + run_timed_command "scripts/frontend/jest_ci.js --vue3 --predictive" + fi + } + + run_with_custom_exit_code jest_vue3_predictive jest-with-fixtures vue3 predictive: extends: @@ -449,7 +471,14 @@ jest-with-fixtures vue3 predictive: - !reference [jest-with-fixtures vue3 mr, needs] - "detect-tests" script: - - if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then run_timed_command "scripts/frontend/jest_ci.js --vue3 --predictive --fixtures"; fi + - | + function jest_with_fixtures_vue3_predictive() { + if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then + run_timed_command "scripts/frontend/jest_ci.js --vue3 --predictive --fixtures"; + fi + } + + run_with_custom_exit_code jest_with_fixtures_vue3_predictive allow_failure: false jest vue3 check quarantined predictive: @@ -460,7 +489,14 @@ jest vue3 check quarantined predictive: - !reference [jest vue3 mr, needs] - "detect-tests" script: - - if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then run_timed_command "./scripts/frontend/check_jest_vue3_quarantine.js"; fi + - | + function jest_vue_check_quarantined_predictive() { + if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then + run_timed_command "./scripts/frontend/check_jest_vue3_quarantine.js" + fi + } + + run_with_custom_exit_code jest_vue_check_quarantined_predictive parallel: 4 artifacts: name: quarantined_tests_output @@ -483,7 +519,14 @@ jest vue3 check quarantined: - .frontend:rules:jest-vue3-check-quarantined parallel: 4 script: - - if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then run_timed_command "./scripts/frontend/check_jest_vue3_quarantine.js --all"; fi + - | + function jest_vue3_check_quarantined() { + if [[ -s "$RSPEC_CHANGED_FILES_PATH" ]] || [[ -s "$RSPEC_MATCHING_JS_FILES_PATH" ]]; then + run_timed_command "./scripts/frontend/check_jest_vue3_quarantine.js --all" + fi + } + + run_with_custom_exit_code jest_vue3_check_quarantined jest-with-fixtures vue3 check quarantined: extends: @@ -498,7 +541,7 @@ jest-integration: - .repo-from-artifacts - .frontend:rules:jest-integration script: - - run_timed_command "yarn jest:integration --ci" + - run_with_custom_exit_code run_timed_command "yarn jest:integration --ci" needs: # it's ok to wait for the repo artifact as we're waiting for the fixtures (which wait for the repo artifact) anyway - !reference [.repo-from-artifacts, needs] @@ -550,7 +593,7 @@ jest-linters: - .frontend:rules:jest-linters needs: [] script: - - run_timed_command "yarn jest:eslint --ci" + - run_with_custom_exit_code run_timed_command "yarn jest:eslint --ci" coverage-frontend: extends: diff --git a/app/assets/javascripts/credentials/components/credentials_filter_sort_app.vue b/app/assets/javascripts/credentials/components/credentials_filter_sort_app.vue index a1c5979ffe1..f4904e51209 100644 --- a/app/assets/javascripts/credentials/components/credentials_filter_sort_app.vue +++ b/app/assets/javascripts/credentials/components/credentials_filter_sort_app.vue @@ -56,6 +56,7 @@ export default {