diff --git a/app/controllers/admin/runners_controller.rb b/app/controllers/admin/runners_controller.rb index 2449fa3128ce8f9e1b16268e5d2abf48920c595d..7a377a33d41952b8165e91e0f3cb2b6cfec729f3 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 7e0298432ac5f85b13dcae920bbac8ff821de92b..d18f2935d92a6f2fb0e128b9bba39bdd12efdef8 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 4abe83868b3fb11b6edd292f81e043703fa60600..ab406e5b3c9ea1a4564f7da58e0be1d1155a86ff 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 2b7d3067e2006e7b390b30cc87b69643d679e08a..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..493d0ac6f818f8d7855e04c7575f950732ef51ee --- /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 0000000000000000000000000000000000000000..35a2c95218a27f753a8857eac07add57888550e7 --- /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 9be5d555baa2db0c8587b88e1b6c2beae6850eb2..7e39ae616ec88d66b9a50dc604b37d67c3c080e8 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 ed9cc44f22e3c604d966d4f9986a73cfce1dd931..c8ebbba27f9d5e8c22cf4eebe501753bf5da331f 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 1ec09639694d9d8b914776ad46dc522db0f71740..dfa57bfb25fc028188dacf49796389b9dd12701d 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 f5d00f3e9048e45b299215bec34a4967b63f1177..9a802bc1bca01f37d9159fdb3305e995ae850542 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 d0e7045e9e073d6001cd3a918f6fb9b8ce8143b6..e4374a8f1045566e2f7412eefebac2cde49d1379 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 3bf59f6a2d1a65d94b737082e5556f765947227a..7b428550768a18e6864cfed90e57fb94f87fc48e 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 89971a3edfbc1fe995634797b818e749b17d30d8..a6bde5b86f61231fbb4b216f00fbb3cdada546d3 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 30017feac0c19f35afccaa5e1d0c5a451943da87..dbe7f88a45148633ce534e9a3c116de41ff63314 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 09b1dd7f50e998657315ec8f315f607eb6d66960..cb02879d4cc3d68fc001e23e7aaf542d57e8216e 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"