diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-01 03:10:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-01 03:10:35 +0300 |
commit | 57ac0bc8f74b1e21cdc58607e217b79d307e1e40 (patch) | |
tree | d7fa9e0f79573748e7484d9f36c91325d499473d | |
parent | 7942fe679107b5e73e0b359f000946dbbf2feb35 (diff) |
Add latest changes from gitlab-org/gitlab@master
-rw-r--r-- | app/controllers/admin/runners_controller.rb | 1 | ||||
-rw-r--r-- | app/services/auto_merge/merge_when_pipeline_succeeds_service.rb | 2 | ||||
-rw-r--r-- | app/services/projects/after_rename_service.rb | 3 | ||||
-rw-r--r-- | app/views/admin/runners/update.js.haml | 2 | ||||
-rw-r--r-- | changelogs/unreleased/remove_skip_hashed_storage_upgrade_feature_flag.yml | 5 | ||||
-rw-r--r-- | changelogs/unreleased/rmv-mwps-feature-flag.yml | 5 | ||||
-rw-r--r-- | doc/administration/gitaly/praefect.md | 8 | ||||
-rw-r--r-- | doc/user/permissions.md | 7 | ||||
-rw-r--r-- | doc/user/profile/notifications.md | 1 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | spec/controllers/projects_controller_spec.rb | 31 | ||||
-rw-r--r-- | spec/services/auto_merge/merge_when_pipeline_succeeds_service_spec.rb | 12 | ||||
-rw-r--r-- | spec/services/projects/after_rename_service_spec.rb | 2 | ||||
-rw-r--r-- | spec/services/projects/update_service_spec.rb | 27 | ||||
-rw-r--r-- | yarn.lock | 8 |
15 files changed, 49 insertions, 67 deletions
diff --git a/app/controllers/admin/runners_controller.rb b/app/controllers/admin/runners_controller.rb index 2449fa3128c..7a377a33d41 100644 --- a/app/controllers/admin/runners_controller.rb +++ b/app/controllers/admin/runners_controller.rb @@ -17,7 +17,6 @@ class Admin::RunnersController < Admin::ApplicationController def update if Ci::UpdateRunnerService.new(@runner).update(runner_params) respond_to do |format| - format.js format.html { redirect_to admin_runner_path(@runner) } end else diff --git a/app/services/auto_merge/merge_when_pipeline_succeeds_service.rb b/app/services/auto_merge/merge_when_pipeline_succeeds_service.rb index 7e0298432ac..d18f2935d92 100644 --- a/app/services/auto_merge/merge_when_pipeline_succeeds_service.rb +++ b/app/services/auto_merge/merge_when_pipeline_succeeds_service.rb @@ -38,8 +38,6 @@ module AutoMerge private def notify(merge_request) - return unless Feature.enabled?(:mwps_notification, project) - notification_service.async.merge_when_pipeline_succeeds(merge_request, current_user) if merge_request.saved_change_to_auto_merge_enabled? end end diff --git a/app/services/projects/after_rename_service.rb b/app/services/projects/after_rename_service.rb index 4abe83868b3..ab406e5b3c9 100644 --- a/app/services/projects/after_rename_service.rb +++ b/app/services/projects/after_rename_service.rb @@ -126,8 +126,7 @@ module Projects def migrate_to_hashed_storage? Gitlab::CurrentSettings.hashed_storage_enabled? && - project.storage_upgradable? && - Feature.disabled?(:skip_hashed_storage_upgrade) + project.storage_upgradable? end def send_move_instructions? diff --git a/app/views/admin/runners/update.js.haml b/app/views/admin/runners/update.js.haml deleted file mode 100644 index 2b7d3067e20..00000000000 --- a/app/views/admin/runners/update.js.haml +++ /dev/null @@ -1,2 +0,0 @@ -:plain - $("#runner_#{@runner.id}").replaceWith("#{escape_javascript(render(@runner))}") diff --git a/changelogs/unreleased/remove_skip_hashed_storage_upgrade_feature_flag.yml b/changelogs/unreleased/remove_skip_hashed_storage_upgrade_feature_flag.yml new file mode 100644 index 00000000000..493d0ac6f81 --- /dev/null +++ b/changelogs/unreleased/remove_skip_hashed_storage_upgrade_feature_flag.yml @@ -0,0 +1,5 @@ +--- +title: Remove skip_hased_storage_upgrade feature flag +merge_request: 29364 +author: Lee Tickett +type: other diff --git a/changelogs/unreleased/rmv-mwps-feature-flag.yml b/changelogs/unreleased/rmv-mwps-feature-flag.yml new file mode 100644 index 00000000000..35a2c95218a --- /dev/null +++ b/changelogs/unreleased/rmv-mwps-feature-flag.yml @@ -0,0 +1,5 @@ +--- +title: Send notification when merge request is set to merge when pipeline succeeds +merge_request: 39297 +author: Ravishankar Gnanaprakasam +type: added diff --git a/doc/administration/gitaly/praefect.md b/doc/administration/gitaly/praefect.md index 9be5d555baa..7e39ae616ec 100644 --- a/doc/administration/gitaly/praefect.md +++ b/doc/administration/gitaly/praefect.md @@ -995,8 +995,12 @@ information, see the [strong consistency epic](https://gitlab.com/groups/gitlab- To enable strong consistency: -- In GitLab 13.3 and later, reference transactions are enabled by default with - a primary-wins strategy. This strategy causes all transactions to succeed for +- In GitLab 13.4 and later, the strong consistency voting strategy has been + improved. Instead of requiring all nodes to agree, only the primary and half + of the secondaries need to agree. To enable this strategy, disable the + `:gitaly_reference_transactions_primary_wins` feature flag. +- In GitLab 13.3, reference transactions are enabled by default with a + primary-wins strategy. This strategy causes all transactions to succeed for the primary and thus does not ensure strong consistency. To enable strong consistency, disable the `:gitaly_reference_transactions_primary_wins` feature flag. diff --git a/doc/user/permissions.md b/doc/user/permissions.md index ed9cc44f22e..c8ebbba27f9 100644 --- a/doc/user/permissions.md +++ b/doc/user/permissions.md @@ -212,11 +212,8 @@ Find the current permissions on the Value Stream Analytics dashboard, as describ ### Issue Board permissions -Developers and users with higher permission level can use all -the functionality of the Issue Board, that is create/delete lists -and drag issues around. Read through the -[documentation on Issue Boards permissions](project/issue_board.md#permissions) -to learn more. +Find the current permissions for interacting with the Issue Board feature in the +[Issue Boards permissions page](project/issue_board.md#permissions). ### File Locking permissions **(PREMIUM)** diff --git a/doc/user/profile/notifications.md b/doc/user/profile/notifications.md index 1ec09639694..dfa57bfb25f 100644 --- a/doc/user/profile/notifications.md +++ b/doc/user/profile/notifications.md @@ -184,6 +184,7 @@ To minimize the number of notifications that do not require any action, from [Gi | Close merge request | | | Reopen merge request | | | Merge merge request | | +| Merge when pipeline succeeds ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/211961) in GitLab 13.4) | | | Change milestone merge request | Subscribers, participants mentioned, and Custom notification level with this event selected | | Remove milestone merge request | Subscribers, participants mentioned, and Custom notification level with this event selected | | New comment | The above, plus anyone mentioned by `@username` in the comment, with notification level "Mention" or higher | diff --git a/package.json b/package.json index f5d00f3e904..9a802bc1bca 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@babel/preset-env": "^7.10.1", "@gitlab/at.js": "1.5.5", "@gitlab/svgs": "1.161.0", - "@gitlab/ui": "20.12.0", + "@gitlab/ui": "20.12.1", "@gitlab/visual-review-tools": "1.6.1", "@rails/actioncable": "^6.0.3-1", "@sentry/browser": "^5.10.2", diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb index d0e7045e9e0..e4374a8f104 100644 --- a/spec/controllers/projects_controller_spec.rb +++ b/spec/controllers/projects_controller_spec.rb @@ -568,25 +568,42 @@ RSpec.describe ProjectsController do end context 'when only renaming a project path' do - it "sets the repository to the right path after a rename" do + it "doesnt change the disk_path when using hashed storage" do + skip unless project.hashed_storage?(:repository) + + hashed_storage_path = ::Storage::Hashed.new(project).disk_path original_repository_path = Gitlab::GitalyClient::StorageSettings.allow_disk_access do project.repository.path end - expect { update_project path: 'renamed_path' } - .to change { project.reload.path } + expect { update_project path: 'renamed_path' }.to change { project.reload.path } expect(project.path).to include 'renamed_path' assign_repository_path = Gitlab::GitalyClient::StorageSettings.allow_disk_access do assigns(:repository).path end - if project.hashed_storage?(:repository) - expect(assign_repository_path).to eq(original_repository_path) - else - expect(assign_repository_path).to include(project.path) + expect(original_repository_path).to include(hashed_storage_path) + expect(assign_repository_path).to include(hashed_storage_path) + end + + it "upgrades and move project to hashed storage when project was originally legacy" do + skip if project.hashed_storage?(:repository) + + hashed_storage_path = Storage::Hashed.new(project).disk_path + original_repository_path = Gitlab::GitalyClient::StorageSettings.allow_disk_access do + project.repository.path + end + + expect { update_project path: 'renamed_path' }.to change { project.reload.path } + expect(project.path).to include 'renamed_path' + + assign_repository_path = Gitlab::GitalyClient::StorageSettings.allow_disk_access do + assigns(:repository).path end + expect(original_repository_path).not_to include(hashed_storage_path) + expect(assign_repository_path).to include(hashed_storage_path) expect(response).to have_gitlab_http_status(:found) end end diff --git a/spec/services/auto_merge/merge_when_pipeline_succeeds_service_spec.rb b/spec/services/auto_merge/merge_when_pipeline_succeeds_service_spec.rb index 3bf59f6a2d1..7b428550768 100644 --- a/spec/services/auto_merge/merge_when_pipeline_succeeds_service_spec.rb +++ b/spec/services/auto_merge/merge_when_pipeline_succeeds_service_spec.rb @@ -91,18 +91,6 @@ RSpec.describe AutoMerge::MergeWhenPipelineSucceedsService do end end - context 'without feature enabled' do - it 'does not send notification' do - stub_feature_flags(mwps_notification: false) - - allow(merge_request) - .to receive_messages(head_pipeline: pipeline, actual_head_pipeline: pipeline) - expect(MailScheduler::NotificationServiceWorker).not_to receive(:perform_async) - - service.execute(merge_request) - end - end - context 'already approved' do let(:service) { described_class.new(project, user, should_remove_source_branch: true) } let(:build) { create(:ci_build, ref: mr_merge_if_green_enabled.source_branch) } diff --git a/spec/services/projects/after_rename_service_spec.rb b/spec/services/projects/after_rename_service_spec.rb index 89971a3edfb..a6bde5b86f6 100644 --- a/spec/services/projects/after_rename_service_spec.rb +++ b/spec/services/projects/after_rename_service_spec.rb @@ -22,7 +22,6 @@ RSpec.describe Projects::AfterRenameService do # call. This makes testing a bit easier. allow(project).to receive(:gitlab_shell).and_return(gitlab_shell) - stub_feature_flags(skip_hashed_storage_upgrade: false) stub_application_setting(hashed_storage_enabled: false) end @@ -151,7 +150,6 @@ RSpec.describe Projects::AfterRenameService do # call. This makes testing a bit easier. allow(project).to receive(:gitlab_shell).and_return(gitlab_shell) - stub_feature_flags(skip_hashed_storage_upgrade: false) stub_application_setting(hashed_storage_enabled: true) end diff --git a/spec/services/projects/update_service_spec.rb b/spec/services/projects/update_service_spec.rb index 30017feac0c..dbe7f88a451 100644 --- a/spec/services/projects/update_service_spec.rb +++ b/spec/services/projects/update_service_spec.rb @@ -325,20 +325,9 @@ RSpec.describe Projects::UpdateService do expect(project.errors.messages[:base]).to include('There is already a repository with that name on disk') end - it 'renames the project without upgrading it' do - result = update_project(project, admin, path: 'new-path') - - expect(result).not_to include(status: :error) - expect(project).to be_valid - expect(project.errors).to be_empty - expect(project.disk_path).to include('new-path') - expect(project.reload.hashed_storage?(:repository)).to be_falsey - end - context 'when hashed storage is enabled' do before do stub_application_setting(hashed_storage_enabled: true) - stub_feature_flags(skip_hashed_storage_upgrade: false) end it 'migrates project to a hashed storage instead of renaming the repo to another legacy name' do @@ -349,22 +338,6 @@ RSpec.describe Projects::UpdateService do expect(project.errors).to be_empty expect(project.reload.hashed_storage?(:repository)).to be_truthy end - - context 'when skip_hashed_storage_upgrade feature flag is enabled' do - before do - stub_feature_flags(skip_hashed_storage_upgrade: true) - end - - it 'renames the project without upgrading it' do - result = update_project(project, admin, path: 'new-path') - - expect(result).not_to include(status: :error) - expect(project).to be_valid - expect(project.errors).to be_empty - expect(project.disk_path).to include('new-path') - expect(project.reload.hashed_storage?(:repository)).to be_falsey - end - end end end diff --git a/yarn.lock b/yarn.lock index 09b1dd7f50e..cb02879d4cc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -848,10 +848,10 @@ resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.161.0.tgz#661e8d19862dfba0e4c558e2eb6d64b402c1453e" integrity sha512-qsbboEICn08ZoEoAX/TuYygsFaXlzsCY+CfmdOzqvJbOdfHhVXmrJBxd2hP2qqjTZm2PkbRRmn+03+ce1jvatQ== -"@gitlab/ui@20.12.0": - version "20.12.0" - resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-20.12.0.tgz#694cfe9793b8dd9f24e16373321bf25bd9b4f9c0" - integrity sha512-5QgWFjOoWsTbMq7LqE7w1hmgSE4N8Z08vDmAg+HNsn50mtPQeIRKofYmyvfXCpRoL7e0a/HHfLU0HqctZLILGQ== +"@gitlab/ui@20.12.1": + version "20.12.1" + resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-20.12.1.tgz#7ff01a52c777168feac764f94a9d9e024c157b02" + integrity sha512-X7ICu/gVK48ok3SQyH9bOE5zaVGIb8nN0Oz+pKhTz2PoZz7e3Js5ZSQFrb4UQmkQGYIOZiSj+NCeKlpmzPYk2g== dependencies: "@babel/standalone" "^7.0.0" "@gitlab/vue-toasted" "^1.3.0" |