diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-25 09:09:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-25 09:09:52 +0300 |
commit | cb1040e0bfd5b2aa1345b1bcf82ecbfb2d69218c (patch) | |
tree | 460b35f60c3577a6bd58467d5d92e3a6e5d4bcf8 | |
parent | 227d1917aeb7b8407564d6c1321dfbd8abb63657 (diff) |
Add latest changes from gitlab-org/gitlab@master
12 files changed, 81 insertions, 5 deletions
diff --git a/app/assets/javascripts/merge_requests/components/compare_app.vue b/app/assets/javascripts/merge_requests/components/compare_app.vue index c7c16e91e4c..538aa090aa8 100644 --- a/app/assets/javascripts/merge_requests/components/compare_app.vue +++ b/app/assets/javascripts/merge_requests/components/compare_app.vue @@ -32,6 +32,9 @@ export default { toggleClass: { default: () => ({}), }, + compareSide: { + default: null, + }, }, props: { currentBranch: { @@ -116,6 +119,7 @@ export default { :input-name="inputs.branch.name" :default="currentBranch" :toggle-class="toggleClass.branch" + :data-qa-compare-side="compareSide" data-testid="compare-dropdown" @selected="selectBranch" /> diff --git a/app/assets/javascripts/merge_requests/components/compare_dropdown.vue b/app/assets/javascripts/merge_requests/components/compare_dropdown.vue index 2855d704507..20989206a51 100644 --- a/app/assets/javascripts/merge_requests/components/compare_dropdown.vue +++ b/app/assets/javascripts/merge_requests/components/compare_dropdown.vue @@ -137,7 +137,6 @@ export default { 'gl-align-items-flex-start! gl-justify-content-start! mr-compare-dropdown', toggleClass, ]" - data-testid="source-branch-dropdown" @shown="fetchData" @search="searchData" @select="selectItem" diff --git a/app/assets/javascripts/pages/projects/merge_requests/creations/new/index.js b/app/assets/javascripts/pages/projects/merge_requests/creations/new/index.js index d23a0615bb8..8cb1462c883 100644 --- a/app/assets/javascripts/pages/projects/merge_requests/creations/new/index.js +++ b/app/assets/javascripts/pages/projects/merge_requests/creations/new/index.js @@ -43,6 +43,7 @@ if (mrNewCompareNode) { project: 'js-source-project', branch: 'js-source-branch gl-font-monospace', }, + compareSide: 'source', }, methods: { async selectedBranch(branchName) { diff --git a/db/docs/vs_code_settings.yml b/db/docs/vs_code_settings.yml index 8ec29aa1f66..65409037edc 100644 --- a/db/docs/vs_code_settings.yml +++ b/db/docs/vs_code_settings.yml @@ -1,7 +1,7 @@ --- table_name: vs_code_settings classes: -- VsCode::VSCodeSetting +- VsCode::VsCodeSetting feature_categories: - web_ide description: VSCode Settings diff --git a/db/post_migrate/20230906102738_sync_index_for_ci_sources_pipelines_pipeline_id_bigint.rb b/db/post_migrate/20230906102738_sync_index_for_ci_sources_pipelines_pipeline_id_bigint.rb new file mode 100644 index 00000000000..a4c76528a22 --- /dev/null +++ b/db/post_migrate/20230906102738_sync_index_for_ci_sources_pipelines_pipeline_id_bigint.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +class SyncIndexForCiSourcesPipelinesPipelineIdBigint < Gitlab::Database::Migration[2.1] + disable_ddl_transaction! + + TABLE_NAME = :ci_sources_pipelines + INDEXES = { + 'index_ci_sources_pipelines_on_pipeline_id_bigint' => [ + [:pipeline_id_convert_to_bigint], {} + ], + 'index_ci_sources_pipelines_on_source_pipeline_id_bigint' => [ + [:source_pipeline_id_convert_to_bigint], {} + ] + } + + def up + INDEXES.each do |index_name, (columns, options)| + add_concurrent_index TABLE_NAME, columns, name: index_name, **options + end + end + + def down + INDEXES.each do |index_name, (_columns, _options)| + remove_concurrent_index_by_name TABLE_NAME, index_name + end + end +end diff --git a/db/post_migrate/20230918143333_finalize_backfill_workspace_personal_access_token.rb b/db/post_migrate/20230918143333_finalize_backfill_workspace_personal_access_token.rb new file mode 100644 index 00000000000..c31c7b1c405 --- /dev/null +++ b/db/post_migrate/20230918143333_finalize_backfill_workspace_personal_access_token.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +class FinalizeBackfillWorkspacePersonalAccessToken < Gitlab::Database::Migration[2.1] + MIGRATION = 'BackfillWorkspacePersonalAccessToken' + disable_ddl_transaction! + + restrict_gitlab_migration gitlab_schema: :gitlab_main + + def up + ensure_batched_background_migration_is_finished( + job_class_name: MIGRATION, + table_name: :workspaces, + column_name: :id, + job_arguments: [], + finalize: true + ) + end + + def down + # no-op + end +end diff --git a/db/post_migrate/20230918145641_add_not_null_constraint_personal_access_token_in_workspaces.rb b/db/post_migrate/20230918145641_add_not_null_constraint_personal_access_token_in_workspaces.rb new file mode 100644 index 00000000000..84f0ad11e32 --- /dev/null +++ b/db/post_migrate/20230918145641_add_not_null_constraint_personal_access_token_in_workspaces.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class AddNotNullConstraintPersonalAccessTokenInWorkspaces < Gitlab::Database::Migration[2.1] + disable_ddl_transaction! + + def up + add_not_null_constraint :workspaces, :personal_access_token_id, validate: false + end + + def down + remove_not_null_constraint :workspaces, :personal_access_token_id + end +end diff --git a/db/schema_migrations/20230906102738 b/db/schema_migrations/20230906102738 new file mode 100644 index 00000000000..0faea537b22 --- /dev/null +++ b/db/schema_migrations/20230906102738 @@ -0,0 +1 @@ +80a334bdf72924dbd3e2cb5d6dc7de5d44fc3dbf4aff7796d5020adad7f6e2fc
\ No newline at end of file diff --git a/db/schema_migrations/20230918143333 b/db/schema_migrations/20230918143333 new file mode 100644 index 00000000000..63dae73cc5d --- /dev/null +++ b/db/schema_migrations/20230918143333 @@ -0,0 +1 @@ +28ad98bd0151a3dac1b1495fd773ee8641ffd3c50df5f3e41ca5a0df58daa826
\ No newline at end of file diff --git a/db/schema_migrations/20230918145641 b/db/schema_migrations/20230918145641 new file mode 100644 index 00000000000..61753f36469 --- /dev/null +++ b/db/schema_migrations/20230918145641 @@ -0,0 +1 @@ +f20056555ebccab049b57176ada21e61dc63b30061321786c6ec946e8ac951ec
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index d2f3d5023df..13e77a40ce5 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -27635,6 +27635,9 @@ ALTER TABLE ONLY chat_names ALTER TABLE ONLY chat_teams ADD CONSTRAINT chat_teams_pkey PRIMARY KEY (id); +ALTER TABLE workspaces + ADD CONSTRAINT check_2a89035b04 CHECK ((personal_access_token_id IS NOT NULL)) NOT VALID; + ALTER TABLE vulnerability_scanners ADD CONSTRAINT check_37608c9db5 CHECK ((char_length(vendor) <= 255)) NOT VALID; @@ -31620,6 +31623,8 @@ CREATE INDEX index_ci_secure_files_on_project_id ON ci_secure_files USING btree CREATE INDEX index_ci_sources_pipelines_on_pipeline_id ON ci_sources_pipelines USING btree (pipeline_id); +CREATE INDEX index_ci_sources_pipelines_on_pipeline_id_bigint ON ci_sources_pipelines USING btree (pipeline_id_convert_to_bigint); + CREATE INDEX index_ci_sources_pipelines_on_project_id ON ci_sources_pipelines USING btree (project_id); CREATE INDEX index_ci_sources_pipelines_on_source_job_id ON ci_sources_pipelines USING btree (source_job_id); @@ -31628,6 +31633,8 @@ CREATE INDEX index_ci_sources_pipelines_on_source_partition_id_source_job_id ON CREATE INDEX index_ci_sources_pipelines_on_source_pipeline_id ON ci_sources_pipelines USING btree (source_pipeline_id); +CREATE INDEX index_ci_sources_pipelines_on_source_pipeline_id_bigint ON ci_sources_pipelines USING btree (source_pipeline_id_convert_to_bigint); + CREATE INDEX index_ci_sources_pipelines_on_source_project_id ON ci_sources_pipelines USING btree (source_project_id); CREATE INDEX index_ci_sources_projects_on_pipeline_id ON ci_sources_projects USING btree (pipeline_id); diff --git a/qa/qa/page/merge_request/new.rb b/qa/qa/page/merge_request/new.rb index 6a59440fc28..6a97a643a77 100644 --- a/qa/qa/page/merge_request/new.rb +++ b/qa/qa/page/merge_request/new.rb @@ -14,8 +14,8 @@ module QA element 'compare-branches-button' end - view 'app/assets/javascripts/merge_requests/components/compare_dropdown.vue' do - element 'source-branch-dropdown', ':data-testid="testid"' # rubocop:disable QA/ElementWithPattern + view 'app/assets/javascripts/merge_requests/components/compare_app.vue' do + element 'compare-dropdown' end view 'app/views/projects/merge_requests/creations/_new_submit.html.haml' do @@ -50,7 +50,7 @@ module QA end def select_source_branch(branch) - click_element('source-branch-dropdown') + click_element('compare-dropdown', 'compare-side': 'source') search_and_select(branch) end end |