From 2aea9a0c91723b8800b016335930c59390cda7c9 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 14 Jul 2023 15:07:17 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- Gemfile.lock | 4 +- .../batch_comments/components/submit_dropdown.vue | 4 + .../ci/runner/admin_runners/admin_runners_app.vue | 2 +- .../registration/registration_dropdown.vue | 60 ++-- .../components/registration/registration_token.vue | 1 + .../registration_token_reset_dropdown_item.vue | 34 +-- .../ci/runner/group_runners/group_runners_app.vue | 2 +- .../design_description/description_form.vue | 9 +- app/assets/javascripts/emoji/components/picker.vue | 5 +- app/assets/javascripts/issuable/issuable_form.js | 15 + .../issues/show/components/fields/description.vue | 11 +- .../javascripts/notes/components/comment_form.vue | 6 + .../javascripts/notes/components/note_actions.vue | 5 +- .../javascripts/notes/components/note_form.vue | 6 + .../pages/shared/wikis/components/wiki_form.vue | 7 +- .../javascripts/pages/shared/wikis/constants.js | 1 - .../vue_shared/components/awards_list.vue | 1 - .../vue_shared/components/markdown/tracking.js | 14 + app/assets/stylesheets/framework/selects.scss | 6 + app/controllers/concerns/onboarding/status.rb | 41 +++ .../registrations/welcome_controller.rb | 50 ++-- app/graphql/types/ide_type.rb | 17 ++ app/graphql/types/user_interface.rb | 6 + app/models/personal_access_token.rb | 1 + .../revoke_token_family_service.rb | 36 +++ .../personal_access_tokens/rotate_service.rb | 1 + app/views/projects/find_file/show.html.haml | 8 +- app/views/shared/wikis/show.html.haml | 17 +- .../feature_flags/development/command_palette.yml | 2 +- .../development/content_editor_on_issues.yml | 2 +- ...sonal_access_token_to_personal_access_tokens.rb | 13 + ..._tokens_on_previous_personal_access_token_id.rb | 15 + ..._tokens_on_previous_personal_access_token_id.rb | 19 ++ db/schema_migrations/20230630101337 | 1 + db/schema_migrations/20230630101342 | 1 + db/schema_migrations/20230630101347 | 1 + db/structure.sql | 8 +- doc/api/graphql/reference/index.md | 16 ++ doc/api/groups.md | 2 +- doc/user/project/repository/branches/default.md | 2 +- doc/user/search/command_palette.md | 8 +- gems/activerecord-gitlab/.rubocop.yml | 16 ++ gems/activerecord-gitlab/Gemfile.lock | 22 +- .../activerecord-gitlab.gemspec | 3 +- .../lib/active_record/gitlab_patches.rb | 1 + .../active_record/gitlab_patches/partitioning.rb | 43 +++ .../associations/builder/association.rb | 21 ++ .../gitlab_patches/partitioning/base.rb | 49 ++++ .../partitioning/reflection/abstract_reflection.rb | 25 ++ .../reflection/association_reflection.rb | 17 ++ .../partitioning/reflection/macro_reflection.rb | 19 ++ .../lib/active_record/gitlab_patches/version.rb | 2 +- .../partitioning/associations/belongs_to_spec.rb | 52 ++++ .../partitioning/associations/has_many_spec.rb | 115 ++++++++ .../partitioning/associations/has_one_spec.rb | 101 +++++++ .../gitlab_patches/partitioning/joins_spec.rb | 41 +++ .../gitlab_patches/partitioning/preloads_spec.rb | 241 ++++++++++++++++ .../partitioning/single_model_queries_spec.rb | 110 ++++++++ .../gitlab_patches/rescue_from_spec.rb | 6 +- gems/activerecord-gitlab/spec/spec_helper.rb | 16 ++ gems/activerecord-gitlab/spec/support/database.rb | 29 ++ gems/activerecord-gitlab/spec/support/models.rb | 50 ++++ .../spec/support/query_recorder.rb | 21 ++ lib/gitlab/auth/auth_finders.rb | 6 + locale/gitlab.pot | 24 +- .../controllers/concerns/onboarding/status_spec.rb | 106 +++++++ .../registrations/welcome_controller_spec.rb | 2 +- .../components/submit_dropdown_spec.js | 17 ++ .../registration/registration_dropdown_spec.js | 42 ++- .../registration_token_reset_dropdown_item_spec.js | 4 +- .../registration/registration_token_spec.js | 6 + .../design_description/description_form_spec.js | 34 ++- .../__snapshots__/design_note_spec.js.snap | 307 --------------------- .../components/design_notes/design_note_spec.js | 4 - spec/frontend/issuable/issuable_form_spec.js | 35 +++ .../show/components/fields/description_spec.js | 38 ++- .../frontend/notes/components/comment_form_spec.js | 18 ++ spec/frontend/notes/components/note_form_spec.js | 18 ++ spec/frontend/notes/mock_data.js | 2 +- .../shared/wikis/components/wiki_form_spec.js | 35 ++- spec/graphql/types/ide_type_spec.rb | 15 + spec/graphql/types/user_type_spec.rb | 41 ++- spec/lib/gitlab/auth/auth_finders_spec.rb | 20 ++ spec/models/personal_access_token_spec.rb | 6 + .../revoke_token_family_service_spec.rb | 18 ++ .../personal_access_tokens/rotate_service_spec.rb | 7 + ...ge_request_interactions_type_shared_examples.rb | 1 + .../registrations/welcome/show.html.haml_spec.rb | 2 +- 88 files changed, 1776 insertions(+), 492 deletions(-) create mode 100644 app/assets/javascripts/vue_shared/components/markdown/tracking.js create mode 100644 app/controllers/concerns/onboarding/status.rb create mode 100644 app/graphql/types/ide_type.rb create mode 100644 app/services/personal_access_tokens/revoke_token_family_service.rb create mode 100644 db/migrate/20230630101337_add_previous_personal_access_token_to_personal_access_tokens.rb create mode 100644 db/migrate/20230630101342_add_index_to_personal_access_tokens_on_previous_personal_access_token_id.rb create mode 100644 db/migrate/20230630101347_add_fk_to_personal_access_tokens_on_previous_personal_access_token_id.rb create mode 100644 db/schema_migrations/20230630101337 create mode 100644 db/schema_migrations/20230630101342 create mode 100644 db/schema_migrations/20230630101347 create mode 100644 gems/activerecord-gitlab/lib/active_record/gitlab_patches/partitioning.rb create mode 100644 gems/activerecord-gitlab/lib/active_record/gitlab_patches/partitioning/associations/builder/association.rb create mode 100644 gems/activerecord-gitlab/lib/active_record/gitlab_patches/partitioning/base.rb create mode 100644 gems/activerecord-gitlab/lib/active_record/gitlab_patches/partitioning/reflection/abstract_reflection.rb create mode 100644 gems/activerecord-gitlab/lib/active_record/gitlab_patches/partitioning/reflection/association_reflection.rb create mode 100644 gems/activerecord-gitlab/lib/active_record/gitlab_patches/partitioning/reflection/macro_reflection.rb create mode 100644 gems/activerecord-gitlab/spec/active_record/gitlab_patches/partitioning/associations/belongs_to_spec.rb create mode 100644 gems/activerecord-gitlab/spec/active_record/gitlab_patches/partitioning/associations/has_many_spec.rb create mode 100644 gems/activerecord-gitlab/spec/active_record/gitlab_patches/partitioning/associations/has_one_spec.rb create mode 100644 gems/activerecord-gitlab/spec/active_record/gitlab_patches/partitioning/joins_spec.rb create mode 100644 gems/activerecord-gitlab/spec/active_record/gitlab_patches/partitioning/preloads_spec.rb create mode 100644 gems/activerecord-gitlab/spec/active_record/gitlab_patches/partitioning/single_model_queries_spec.rb create mode 100644 gems/activerecord-gitlab/spec/support/database.rb create mode 100644 gems/activerecord-gitlab/spec/support/models.rb create mode 100644 gems/activerecord-gitlab/spec/support/query_recorder.rb create mode 100644 spec/controllers/concerns/onboarding/status_spec.rb delete mode 100644 spec/frontend/design_management/components/design_notes/__snapshots__/design_note_spec.js.snap create mode 100644 spec/graphql/types/ide_type_spec.rb create mode 100644 spec/services/personal_access_tokens/revoke_token_family_service_spec.rb diff --git a/Gemfile.lock b/Gemfile.lock index 542591f657c..6193a196c86 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,8 +1,8 @@ PATH remote: gems/activerecord-gitlab specs: - activerecord-gitlab (0.1.0) - activerecord (>= 6.1.7.3) + activerecord-gitlab (0.2.0) + activerecord (>= 7) PATH remote: gems/click_house-client diff --git a/app/assets/javascripts/batch_comments/components/submit_dropdown.vue b/app/assets/javascripts/batch_comments/components/submit_dropdown.vue index 2721851f03b..96889f0059c 100644 --- a/app/assets/javascripts/batch_comments/components/submit_dropdown.vue +++ b/app/assets/javascripts/batch_comments/components/submit_dropdown.vue @@ -8,6 +8,7 @@ import { scrollToElement } from '~/lib/utils/common_utils'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import { CLEAR_AUTOSAVE_ENTRY_EVENT } from '~/vue_shared/constants'; import markdownEditorEventHub from '~/vue_shared/components/markdown/eventhub'; +import { trackSavedUsingEditor } from '~/vue_shared/components/markdown/tracking'; export default { components: { @@ -80,6 +81,8 @@ export default { async submitReview() { this.isSubmitting = true; + trackSavedUsingEditor(this.$refs.markdownEditor.isContentEditorActive, 'MergeRequest_review'); + try { await this.publishReview(this.noteData); @@ -131,6 +134,7 @@ export default {
diff --git a/app/assets/javascripts/ci/runner/components/registration/registration_dropdown.vue b/app/assets/javascripts/ci/runner/components/registration/registration_dropdown.vue index cb5b3076301..0154cd2a3ec 100644 --- a/app/assets/javascripts/ci/runner/components/registration/registration_dropdown.vue +++ b/app/assets/javascripts/ci/runner/components/registration/registration_dropdown.vue @@ -1,5 +1,11 @@ diff --git a/app/assets/javascripts/ci/runner/components/registration/registration_token.vue b/app/assets/javascripts/ci/runner/components/registration/registration_token.vue index b196bccf66f..339c92a427f 100644 --- a/app/assets/javascripts/ci/runner/components/registration/registration_token.vue +++ b/app/assets/javascripts/ci/runner/components/registration/registration_token.vue @@ -31,6 +31,7 @@ export default { onCopy() { // value already in the clipboard, simply notify the user this.$toast?.show(s__('Runners|Registration token copied!')); + this.$emit('copy'); }, }, I18N_COPY_BUTTON_TITLE: s__('Runners|Copy registration token'), diff --git a/app/assets/javascripts/ci/runner/components/registration/registration_token_reset_dropdown_item.vue b/app/assets/javascripts/ci/runner/components/registration/registration_token_reset_dropdown_item.vue index 6ce88fc54de..47ca3ed6227 100644 --- a/app/assets/javascripts/ci/runner/components/registration/registration_token_reset_dropdown_item.vue +++ b/app/assets/javascripts/ci/runner/components/registration/registration_token_reset_dropdown_item.vue @@ -1,5 +1,5 @@ diff --git a/app/assets/javascripts/ci/runner/group_runners/group_runners_app.vue b/app/assets/javascripts/ci/runner/group_runners/group_runners_app.vue index 9e69137d382..71584c40a38 100644 --- a/app/assets/javascripts/ci/runner/group_runners/group_runners_app.vue +++ b/app/assets/javascripts/ci/runner/group_runners/group_runners_app.vue @@ -235,7 +235,7 @@ export default { class="gl-ml-3" :registration-token="registrationToken" :type="$options.GROUP_TYPE" - right + placement="right" /> diff --git a/app/assets/javascripts/design_management/components/design_description/description_form.vue b/app/assets/javascripts/design_management/components/design_description/description_form.vue index 890d7f80f8d..413442074f0 100644 --- a/app/assets/javascripts/design_management/components/design_description/description_form.vue +++ b/app/assets/javascripts/design_management/components/design_description/description_form.vue @@ -1,6 +1,5 @@ @@ -63,6 +69,7 @@ export default {
diff --git a/app/assets/javascripts/notes/components/comment_form.vue b/app/assets/javascripts/notes/components/comment_form.vue index 97444bb1129..c6d94a3b7b7 100644 --- a/app/assets/javascripts/notes/components/comment_form.vue +++ b/app/assets/javascripts/notes/components/comment_form.vue @@ -16,6 +16,7 @@ import { sprintf } from '~/locale'; import MarkdownEditor from '~/vue_shared/components/markdown/markdown_editor.vue'; import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; +import { trackSavedUsingEditor } from '~/vue_shared/components/markdown/tracking'; import * as constants from '../constants'; import eventHub from '../event_hub'; @@ -255,6 +256,11 @@ export default { this.isSubmitting = true; + trackSavedUsingEditor( + this.$refs.markdownEditor.isContentEditorActive, + `${this.noteableType}_${this.noteType}`, + ); + this.saveNote(noteData) .then(() => { this.restartPolling(); diff --git a/app/assets/javascripts/notes/components/note_actions.vue b/app/assets/javascripts/notes/components/note_actions.vue index 47e0ace1ea7..d17db6c6b4c 100644 --- a/app/assets/javascripts/notes/components/note_actions.vue +++ b/app/assets/javascripts/notes/components/note_actions.vue @@ -318,6 +318,8 @@ export default { />