From d0713b807555cbd970ce712d5c0812daee371e2b Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 30 Nov 2023 15:15:02 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .gitlab/ci/rails.gitlab-ci.yml | 10 +- .gitlab/ci/rails/shared.gitlab-ci.yml | 20 +- .gitlab/ci/rules.gitlab-ci.yml | 3 +- .rubocop_todo/gitlab/namespaced_class.yml | 1 - .rubocop_todo/rspec/feature_category.yml | 1 - .rubocop_todo/rspec/named_subject.yml | 1 - .../boards/components/board_app.vue | 27 +- .../boards/components/board_card_inner.vue | 7 - .../board_card_move_to_position.vue | 23 +- .../boards/components/board_column.vue | 47 +--- .../boards/components/board_content.vue | 43 +-- .../components/board_filtered_search.vue | 11 +- .../boards/components/board_form.vue | 26 +- .../boards/components/board_list.vue | 3 +- .../boards/components/board_list_header.vue | 92 +++--- .../boards/components/board_new_issue.vue | 28 +- .../boards/components/board_top_bar.vue | 4 - .../sidebar/board_sidebar_title.vue | 35 +-- app/assets/javascripts/boards/index.js | 2 +- .../header/pipeline_editor_mini_graph.vue | 5 + .../components/feature_flags.vue | 3 +- .../ide/components/commit_sidebar/list.vue | 9 +- app/assets/javascripts/tracking/tracking.js | 9 +- .../components/project_storage_app.vue | 9 +- ...ost_factored_project_storage.query.graphql | 23 ++ .../filtered_search_bar_root.vue | 114 ++++---- .../graphql/group_work_items.query.graphql | 1 + .../graphql/project_work_items.query.graphql | 2 + app/assets/stylesheets/page_bundles/ide.scss | 9 +- .../themes/dark_mode_overrides.scss | 72 ----- app/assets/stylesheets/themes/theme_blue.scss | 8 - app/assets/stylesheets/themes/theme_gray.scss | 8 - .../stylesheets/themes/theme_green.scss | 8 - .../stylesheets/themes/theme_helper.scss | 265 ------------------ .../stylesheets/themes/theme_indigo.scss | 8 - .../stylesheets/themes/theme_light_blue.scss | 8 - .../stylesheets/themes/theme_light_gray.scss | 104 +------ .../stylesheets/themes/theme_light_green.scss | 8 - .../themes/theme_light_indigo.scss | 8 - .../stylesheets/themes/theme_light_red.scss | 8 - app/assets/stylesheets/themes/theme_red.scss | 8 - .../external_redirect_controller.rb | 1 - app/controllers/ide_controller.rb | 2 +- .../web_ide/remote_ide_controller.rb | 2 +- app/models/event.rb | 1 - app/models/group.rb | 2 +- app/models/user.rb | 3 - app/models/user_interacted_project.rb | 39 --- app/views/ide/_show.html.haml | 8 + app/views/layouts/fullscreen.html.haml | 6 - .../ci_guard_for_catalog_resource_scope.yml | 2 +- config/gitlab_loose_foreign_keys.yml | 4 + danger/qa_selector/Dangerfile | 2 +- ...i_beta_features_enabled_to_app_settings.rb | 9 + ...users_project_authorizations_user_id_fk.rb | 21 ++ db/schema_migrations/20231124112409 | 1 + db/schema_migrations/20231128174345 | 1 + db/structure.sql | 4 +- doc/architecture/blueprints/cells/index.md | 38 +-- .../blueprints/cells/routing-service.md | 96 +++++++ doc/ci/pipelines/merge_request_pipelines.md | 2 +- doc/development/ai_features/duo_chat.md | 5 + doc/development/ai_features/index.md | 10 +- .../database/understanding_explain_plans.md | 4 +- doc/development/development_seed_files.md | 1 + .../graphql/loaders/full_path_model_loader.rb | 1 - locale/gitlab.pot | 3 - .../decomposition/generate-loose-foreign-key | 4 +- scripts/review_apps/base-config.yaml | 2 - .../admin/admin_abuse_reports_spec.rb | 18 +- spec/features/admin/admin_runners_spec.rb | 4 +- spec/features/dashboard/issues_filter_spec.rb | 3 +- .../features/dashboard/merge_requests_spec.rb | 8 +- spec/features/groups/issues_spec.rb | 4 +- spec/features/issuables/sorting_list_spec.rb | 4 +- .../features/issues/user_sorts_issues_spec.rb | 4 +- .../user_sorts_merge_requests_spec.rb | 6 +- .../work_items/work_item_children_spec.rb | 27 ++ spec/features/user_sorts_things_spec.rb | 5 +- spec/frontend/boards/board_card_inner_spec.js | 32 --- .../boards/components/board_app_spec.js | 87 ++---- .../board_card_move_to_position_spec.js | 69 +---- .../boards/components/board_column_spec.js | 52 +--- .../boards/components/board_content_spec.js | 143 ++++------ .../components/board_filtered_search_spec.js | 101 +++---- .../boards/components/board_form_spec.js | 74 +---- .../components/board_list_header_spec.js | 159 +++++------ .../boards/components/board_new_issue_spec.js | 117 ++------ .../boards/components/board_top_bar_spec.js | 81 +++--- .../sidebar/board_sidebar_title_spec.js | 93 +++--- .../pipeline_editor_home_spec.js | 23 +- .../runner_filtered_search_bar_spec.js | 27 +- .../components/repo_commit_section_spec.js | 7 +- .../components/jira_trigger_fields_spec.js | 18 +- .../edit/components/trigger_field_spec.js | 17 +- .../edit/components/trigger_fields_spec.js | 17 +- .../components/project_storage_app_spec.js | 32 ++- .../filtered_search_bar_root_spec.js | 187 ++++++------ spec/frontend/work_items/mock_data.js | 11 + .../database/no_cross_db_foreign_keys_spec.rb | 1 - spec/models/event_spec.rb | 9 - spec/models/group_spec.rb | 9 +- spec/models/member_spec.rb | 4 +- spec/models/ml/candidate_spec.rb | 4 +- spec/models/namespace_spec.rb | 4 +- spec/models/notification_setting_spec.rb | 4 +- spec/models/project_authorization_spec.rb | 7 + spec/models/route_spec.rb | 4 +- spec/models/user_interacted_project_spec.rb | 52 ---- spec/requests/ide_controller_spec.rb | 36 ++- .../helpers/features/sorting_helpers.rb | 8 +- spec/support/rspec_order_todo.yml | 1 - .../layouts/fullscreen.html.haml_spec.rb | 20 -- 113 files changed, 978 insertions(+), 1970 deletions(-) create mode 100644 app/assets/javascripts/usage_quotas/storage/queries/cost_factored_project_storage.query.graphql delete mode 100644 app/models/user_interacted_project.rb create mode 100644 db/migrate/20231124112409_add_instance_level_ai_beta_features_enabled_to_app_settings.rb create mode 100644 db/post_migrate/20231128174345_remove_users_project_authorizations_user_id_fk.rb create mode 100644 db/schema_migrations/20231124112409 create mode 100644 db/schema_migrations/20231128174345 create mode 100644 doc/architecture/blueprints/cells/routing-service.md delete mode 100644 spec/models/user_interacted_project_spec.rb diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml index c96628f72a2..937bfc7e93d 100644 --- a/.gitlab/ci/rails.gitlab-ci.yml +++ b/.gitlab/ci/rails.gitlab-ci.yml @@ -774,11 +774,19 @@ rspec-ee unit gitlab-duo-chat-zeroshot pg14: rspec-ee unit gitlab-duo-chat-qa-fast pg14: extends: - .rspec-ee-base-gitlab-duo - - .rails:rules:ee-gitlab-duo-chat-qa-fast + - .rails:rules:ee-gitlab-duo-chat-always script: - !reference [.base-script, script] - rspec_paralellized_job "--tag fast_chat_qa_evaluation" +rspec-ee unit gitlab-duo pg14: + extends: + - .rspec-ee-base-gitlab-duo + - .rails:rules:ee-gitlab-duo-chat-always + script: + - !reference [.base-script, script] + - rspec_paralellized_job "--tag gitlab_duo" + rspec-ee unit gitlab-duo-chat-qa pg14: variables: QA_EVAL_REPORT_FILENAME: "qa_evaluation_report.md" diff --git a/.gitlab/ci/rails/shared.gitlab-ci.yml b/.gitlab/ci/rails/shared.gitlab-ci.yml index 90289faef0d..77b0e336c9a 100644 --- a/.gitlab/ci/rails/shared.gitlab-ci.yml +++ b/.gitlab/ci/rails/shared.gitlab-ci.yml @@ -85,13 +85,27 @@ include: - bundle exec gem list gitlab_quality-test_tooling - | if [ "$CREATE_RAILS_TEST_FAILURE_ISSUES" == "true" ]; then - bundle exec relate-failure-issue --input-files "rspec/rspec-*.json" --system-log-files "log" --project "gitlab-org/gitlab" --token "${TEST_FAILURES_PROJECT_TOKEN}" --related-issues-file "rspec/${CI_JOB_ID}-failed-test-issues.json"; + bundle exec relate-failure-issue \ + --token "${TEST_FAILURES_PROJECT_TOKEN}" \ + --project "gitlab-org/gitlab" \ + --input-files "rspec/rspec-*.json" \ + --exclude-labels-for-search "QA,rspec:slow test" \ + --system-log-files "log" \ + --related-issues-file "rspec/${CI_JOB_ID}-failed-test-issues.json"; fi if [ "$CREATE_RAILS_SLOW_TEST_ISSUES" == "true" ]; then - bundle exec slow-test-issues --input-files "rspec/rspec-*.json" --project "gitlab-org/gitlab" --token "${TEST_FAILURES_PROJECT_TOKEN}" --related-issues-file "rspec/${CI_JOB_ID}-slow-test-issues.json"; + bundle exec slow-test-issues \ + --token "${TEST_FAILURES_PROJECT_TOKEN}" \ + --project "gitlab-org/gitlab" \ + --input-files "rspec/rspec-*.json" \ + --related-issues-file "rspec/${CI_JOB_ID}-slow-test-issues.json"; fi if [ "$ADD_SLOW_TEST_NOTE_TO_MERGE_REQUEST" == "true" ]; then - bundle exec slow-test-merge-request-report-note --input-files "rspec/rspec-*.json" --project "gitlab-org/gitlab" --merge_request_iid "$CI_MERGE_REQUEST_IID" --token "${TEST_SLOW_NOTE_PROJECT_TOKEN}"; + bundle exec slow-test-merge-request-report-note \ + --token "${TEST_SLOW_NOTE_PROJECT_TOKEN}" \ + --project "gitlab-org/gitlab" \ + --input-files "rspec/rspec-*.json" \ + --merge_request_iid "$CI_MERGE_REQUEST_IID"; fi - echo -e "\e[0Ksection_end:`date +%s`:report_results_section\r\e[0K" - tooling/bin/push_job_metrics || true diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index 22e0531dd27..9e9f24d37bc 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -372,6 +372,7 @@ .ai-patterns: &ai-patterns - "{,ee/,jh/}lib/gitlab/llm/**/*" - "{,ee/,jh/}{,spec/}lib/gitlab/llm/**/*" + - "{,ee/,jh/}lib/gitlab/duo/**/*" # DB patterns + .ci-patterns .db-patterns: &db-patterns @@ -2166,7 +2167,7 @@ when: manual allow_failure: true -.rails:rules:ee-gitlab-duo-chat-qa-fast: +.rails:rules:ee-gitlab-duo-chat-always: rules: - !reference [".rails:rules:ee-gitlab-duo-chat-base", rules] - <<: *if-merge-request diff --git a/.rubocop_todo/gitlab/namespaced_class.yml b/.rubocop_todo/gitlab/namespaced_class.yml index ea2e52b028a..19f31b94a6a 100644 --- a/.rubocop_todo/gitlab/namespaced_class.yml +++ b/.rubocop_todo/gitlab/namespaced_class.yml @@ -326,7 +326,6 @@ Gitlab/NamespacedClass: - 'app/models/user_custom_attribute.rb' - 'app/models/user_detail.rb' - 'app/models/user_highest_role.rb' - - 'app/models/user_interacted_project.rb' - 'app/models/user_mention.rb' - 'app/models/user_preference.rb' - 'app/models/user_status.rb' diff --git a/.rubocop_todo/rspec/feature_category.yml b/.rubocop_todo/rspec/feature_category.yml index afc5e9d55c7..5cf13baf9e5 100644 --- a/.rubocop_todo/rspec/feature_category.yml +++ b/.rubocop_todo/rspec/feature_category.yml @@ -4754,7 +4754,6 @@ RSpec/FeatureCategory: - 'spec/models/user_custom_attribute_spec.rb' - 'spec/models/user_detail_spec.rb' - 'spec/models/user_highest_role_spec.rb' - - 'spec/models/user_interacted_project_spec.rb' - 'spec/models/user_mentions/commit_user_mention_spec.rb' - 'spec/models/user_mentions/issue_user_mention_spec.rb' - 'spec/models/user_mentions/merge_request_user_mention_spec.rb' diff --git a/.rubocop_todo/rspec/named_subject.yml b/.rubocop_todo/rspec/named_subject.yml index 16784226de8..1802675827d 100644 --- a/.rubocop_todo/rspec/named_subject.yml +++ b/.rubocop_todo/rspec/named_subject.yml @@ -2858,7 +2858,6 @@ RSpec/NamedSubject: - 'spec/models/uploads/fog_spec.rb' - 'spec/models/uploads/local_spec.rb' - 'spec/models/user_custom_attribute_spec.rb' - - 'spec/models/user_interacted_project_spec.rb' - 'spec/models/user_spec.rb' - 'spec/models/user_status_spec.rb' - 'spec/models/users/credit_card_validation_spec.rb' diff --git a/app/assets/javascripts/boards/components/board_app.vue b/app/assets/javascripts/boards/components/board_app.vue index 4d915ff341a..2c8aa1cbe21 100644 --- a/app/assets/javascripts/boards/components/board_app.vue +++ b/app/assets/javascripts/boards/components/board_app.vue @@ -1,6 +1,4 @@ @@ -101,17 +68,11 @@ export default { > - + diff --git a/app/assets/javascripts/boards/components/board_content.vue b/app/assets/javascripts/boards/components/board_content.vue index a6ff1653c17..9560f0e5fef 100644 --- a/app/assets/javascripts/boards/components/board_content.vue +++ b/app/assets/javascripts/boards/components/board_content.vue @@ -3,8 +3,6 @@ import { GlAlert } from '@gitlab/ui'; import { sortBy } from 'lodash'; import produce from 'immer'; import Draggable from 'vuedraggable'; -// eslint-disable-next-line no-restricted-imports -import { mapState, mapActions } from 'vuex'; import BoardAddNewColumn from 'ee_else_ce/boards/components/board_add_new_column.vue'; import { s__ } from '~/locale'; import { defaultSortableOptions } from '~/sortable/constants'; @@ -29,15 +27,7 @@ export default { EpicsSwimlanes: () => import('ee_component/boards/components/epics_swimlanes.vue'), GlAlert, }, - inject: [ - 'boardType', - 'canAdminList', - 'isIssueBoard', - 'isEpicBoard', - 'disabled', - 'issuableType', - 'isApolloBoard', - ], + inject: ['boardType', 'canAdminList', 'isIssueBoard', 'isEpicBoard', 'disabled', 'issuableType'], props: { boardId: { type: String, @@ -51,7 +41,7 @@ export default { type: Boolean, required: true, }, - boardListsApollo: { + boardLists: { type: Object, required: false, default: () => {}, @@ -77,12 +67,11 @@ export default { }; }, computed: { - ...mapState(['boardLists', 'error']), boardListsById() { - return this.isApolloBoard ? this.boardListsApollo : this.boardLists; + return this.boardLists; }, boardListsToUse() { - const lists = this.isApolloBoard ? this.boardListsApollo : this.boardLists; + const lists = this.boardLists; return sortBy([...Object.values(lists)], 'position'); }, canDragColumns() { @@ -109,11 +98,10 @@ export default { return this.canDragColumns ? options : {}; }, errorToDisplay() { - return this.apolloError || this.error || null; + return this.apolloError || null; }, }, methods: { - ...mapActions(['moveList', 'unsetError']), afterFormEnters() { const el = this.canDragColumns ? this.$refs.list.$el : this.$refs.list; el.scrollTo({ left: el.scrollWidth, behavior: 'smooth' }); @@ -126,11 +114,7 @@ export default { }, flashAnimationDuration); }, dismissError() { - if (this.isApolloBoard) { - setError({ message: null, captureError: false }); - } else { - this.unsetError(); - } + setError({ message: null, captureError: false }); }, async updateListPosition({ item: { @@ -139,17 +123,6 @@ export default { newIndex, to: { children }, }) { - if (!this.isApolloBoard) { - this.moveList({ - item: { - dataset: { listId: movedListId, draggableItemType }, - }, - newIndex, - to: { children }, - }); - return; - } - if (draggableItemType !== DraggableItemTypes.list) { return; } @@ -199,7 +172,7 @@ export default { __typename: 'UpdateBoardListPayload', errors: [], list: { - ...this.boardListsApollo[movedListId], + ...this.boardLists[movedListId], position: targetPosition, }, }, @@ -240,7 +213,7 @@ export default { :board-id="boardId" :list="list" :filters="filterParams" - :highlighted-lists-apollo="highlightedLists" + :highlighted-lists="highlightedLists" :data-draggable-item-type="$options.draggableItemTypes.list" :class="{ 'gl-display-none! gl-sm-display-inline-block!': addColumnFormVisible }" @setActiveList="$emit('setActiveList', $event)" diff --git a/app/assets/javascripts/boards/components/board_filtered_search.vue b/app/assets/javascripts/boards/components/board_filtered_search.vue index 9443154999b..faaef226c21 100644 --- a/app/assets/javascripts/boards/components/board_filtered_search.vue +++ b/app/assets/javascripts/boards/components/board_filtered_search.vue @@ -1,7 +1,5 @@