diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-04 06:09:13 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-04 06:09:13 +0000 |
commit | cebee31a0483ef7f2cade3d6dde0a53a68e86cc6 (patch) | |
tree | b818a3e84bde169e6b2a9c96d9b794b6b8708094 | |
parent | 7ec2694360b4d4bd9a4b00ef5166a77c854d9d4f (diff) | |
download | gitlab-ce-cebee31a0483ef7f2cade3d6dde0a53a68e86cc6.tar.gz |
Add latest changes from gitlab-org/gitlab@master
-rw-r--r-- | app/assets/javascripts/ide/components/commit_sidebar/form.vue | 1 | ||||
-rw-r--r-- | app/controllers/registrations_controller.rb | 2 | ||||
-rw-r--r-- | app/models/repository.rb | 4 | ||||
-rw-r--r-- | changelogs/unreleased/29077-remove-two_step_rebase-feature-flag.yml | 5 | ||||
-rw-r--r-- | doc/api/group_boards.md | 25 | ||||
-rw-r--r-- | doc/integration/img/jira_dev_panel_jira_setup_1-1.png | bin | 0 -> 45848 bytes | |||
-rw-r--r-- | doc/integration/jira_development_panel.md | 5 | ||||
-rw-r--r-- | spec/models/repository_spec.rb | 95 | ||||
-rw-r--r-- | spec/services/merge_requests/rebase_service_spec.rb | 24 |
9 files changed, 63 insertions, 98 deletions
diff --git a/app/assets/javascripts/ide/components/commit_sidebar/form.vue b/app/assets/javascripts/ide/components/commit_sidebar/form.vue index 9d5473a1201..491814bb408 100644 --- a/app/assets/javascripts/ide/components/commit_sidebar/form.vue +++ b/app/assets/javascripts/ide/components/commit_sidebar/form.vue @@ -102,7 +102,6 @@ export default { this.componentHeight = null; }, }, - activityBarViews, }; </script> diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index 55f06df6bb0..30589694e3f 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -35,7 +35,7 @@ class RegistrationsController < Devise::RegistrationsController end # Do not show the signed_up notice message when the signup_flow experiment is enabled. - # Instead, show it after succesfully updating the role. + # Instead, show it after successfully updating the role. flash[:notice] = nil if experiment_enabled?(:signup_flow) rescue Gitlab::Access::AccessDeniedError redirect_to(new_user_session_path) diff --git a/app/models/repository.rb b/app/models/repository.rb index c6573e0bad2..9807aed07a9 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -1091,10 +1091,6 @@ class Repository end def rebase(user, merge_request, skip_ci: false) - if Feature.disabled?(:two_step_rebase, default_enabled: true) - return rebase_deprecated(user, merge_request) - end - push_options = [] push_options << Gitlab::PushOptions::CI_SKIP if skip_ci diff --git a/changelogs/unreleased/29077-remove-two_step_rebase-feature-flag.yml b/changelogs/unreleased/29077-remove-two_step_rebase-feature-flag.yml new file mode 100644 index 00000000000..02960de75b5 --- /dev/null +++ b/changelogs/unreleased/29077-remove-two_step_rebase-feature-flag.yml @@ -0,0 +1,5 @@ +--- +title: Update rebasing to use the new two-phase Gitaly Rebase RPC +merge_request: 23546 +author: +type: changed diff --git a/doc/api/group_boards.md b/doc/api/group_boards.md index f4d45f8f402..dfa430cca8b 100644 --- a/doc/api/group_boards.md +++ b/doc/api/group_boards.md @@ -484,20 +484,29 @@ POST /groups/:id/boards/:board_id/lists | `label_id` | integer | yes | The ID of a label | ```shell -curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/5/boards/1/lists?label_id=5 +curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/4/boards/12/lists?milestone_id=7 ``` Example response: ```json { - "id" : 1, - "label" : { - "name" : "Testing", - "color" : "#F0AD4E", - "description" : null - }, - "position" : 1 + "id": 9, + "label": null, + "position": 0, + "milestone": { + "id": 7, + "iid": 3, + "group_id": 12, + "title": "Milestone with due date", + "description": "", + "state": "active", + "created_at": "2017-09-03T07:16:28.596Z", + "updated_at": "2017-09-03T07:16:49.521Z", + "due_date": null, + "start_date": null, + "web_url": "https://gitlab.example.com/groups/issue-reproduce/-/milestones/3" + } } ``` diff --git a/doc/integration/img/jira_dev_panel_jira_setup_1-1.png b/doc/integration/img/jira_dev_panel_jira_setup_1-1.png Binary files differnew file mode 100644 index 00000000000..e3c6c01c153 --- /dev/null +++ b/doc/integration/img/jira_dev_panel_jira_setup_1-1.png diff --git a/doc/integration/jira_development_panel.md b/doc/integration/jira_development_panel.md index 02cfdc32abb..05a83e0987a 100644 --- a/doc/integration/jira_development_panel.md +++ b/doc/integration/jira_development_panel.md @@ -65,11 +65,10 @@ There are no special requirements if you are using GitLab.com. ## Jira Configuration -1. In Jira, from the gear menu at the top right, go to `Applications`. Navigate to `DVCS accounts` - from the left navigation menu. Click `Link GitHub account` to start creating a new integration. +1. In Jira, go to **Jira Settings > Applications > DVCS accounts**, then click **Link GitHub Enterprise account** to start creating a new integration. (We are pretending to be GitHub in this integration until there is further platform support from Jira.) - ![Jira DVCS from Dashboard](img/jira_dev_panel_jira_setup_1.png) + ![Jira Settings](img/jira_dev_panel_jira_setup_1-1.png) 1. Complete the form diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index 3d28adade05..679e6142416 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -1618,79 +1618,58 @@ describe Repository do end end - context 'when two_step_rebase feature is enabled' do - before do - stub_feature_flags(two_step_rebase: true) - end - - it_behaves_like 'a method that can rebase successfully' - - it 'executes the new Gitaly RPC' do - expect_any_instance_of(Gitlab::GitalyClient::OperationService).to receive(:rebase) - expect_any_instance_of(Gitlab::GitalyClient::OperationService).not_to receive(:user_rebase) - - repository.rebase(user, merge_request) - end - - describe 'rolling back the `rebase_commit_sha`' do - let(:new_sha) { Digest::SHA1.hexdigest('foo') } + it_behaves_like 'a method that can rebase successfully' - it 'does not rollback when there are no errors' do - second_response = double(pre_receive_error: nil, git_error: nil) - mock_gitaly(second_response) + it 'executes the new Gitaly RPC' do + expect_any_instance_of(Gitlab::GitalyClient::OperationService).to receive(:rebase) + expect_any_instance_of(Gitlab::GitalyClient::OperationService).not_to receive(:user_rebase) - repository.rebase(user, merge_request) + repository.rebase(user, merge_request) + end - expect(merge_request.reload.rebase_commit_sha).to eq(new_sha) - end + describe 'rolling back the `rebase_commit_sha`' do + let(:new_sha) { Digest::SHA1.hexdigest('foo') } - it 'does rollback when a PreReceiveError is encountered in the second step' do - second_response = double(pre_receive_error: 'my_error', git_error: nil) - mock_gitaly(second_response) + it 'does not rollback when there are no errors' do + second_response = double(pre_receive_error: nil, git_error: nil) + mock_gitaly(second_response) - expect do - repository.rebase(user, merge_request) - end.to raise_error(Gitlab::Git::PreReceiveError) + repository.rebase(user, merge_request) - expect(merge_request.reload.rebase_commit_sha).to be_nil - end + expect(merge_request.reload.rebase_commit_sha).to eq(new_sha) + end - it 'does rollback when a GitError is encountered in the second step' do - second_response = double(pre_receive_error: nil, git_error: 'git error') - mock_gitaly(second_response) + it 'does rollback when a PreReceiveError is encountered in the second step' do + second_response = double(pre_receive_error: 'my_error', git_error: nil) + mock_gitaly(second_response) - expect do - repository.rebase(user, merge_request) - end.to raise_error(Gitlab::Git::Repository::GitError) + expect do + repository.rebase(user, merge_request) + end.to raise_error(Gitlab::Git::PreReceiveError) - expect(merge_request.reload.rebase_commit_sha).to be_nil - end + expect(merge_request.reload.rebase_commit_sha).to be_nil + end - def mock_gitaly(second_response) - responses = [ - double(rebase_sha: new_sha).as_null_object, - second_response - ] + it 'does rollback when a GitError is encountered in the second step' do + second_response = double(pre_receive_error: nil, git_error: 'git error') + mock_gitaly(second_response) - expect_any_instance_of( - Gitaly::OperationService::Stub - ).to receive(:user_rebase_confirmable).and_return(responses.each) - end - end - end + expect do + repository.rebase(user, merge_request) + end.to raise_error(Gitlab::Git::Repository::GitError) - context 'when two_step_rebase feature is disabled' do - before do - stub_feature_flags(two_step_rebase: false) + expect(merge_request.reload.rebase_commit_sha).to be_nil end - it_behaves_like 'a method that can rebase successfully' - - it 'executes the deprecated Gitaly RPC' do - expect_any_instance_of(Gitlab::GitalyClient::OperationService).to receive(:user_rebase) - expect_any_instance_of(Gitlab::GitalyClient::OperationService).not_to receive(:rebase) + def mock_gitaly(second_response) + responses = [ + double(rebase_sha: new_sha).as_null_object, + second_response + ] - repository.rebase(user, merge_request) + expect_any_instance_of( + Gitaly::OperationService::Stub + ).to receive(:user_rebase_confirmable).and_return(responses.each) end end end diff --git a/spec/services/merge_requests/rebase_service_spec.rb b/spec/services/merge_requests/rebase_service_spec.rb index 184f3f37339..22df3b84243 100644 --- a/spec/services/merge_requests/rebase_service_spec.rb +++ b/spec/services/merge_requests/rebase_service_spec.rb @@ -71,14 +71,6 @@ describe MergeRequests::RebaseService do it_behaves_like 'sequence of failure and success' - context 'with deprecated step rebase feature' do - before do - stub_feature_flags(two_step_rebase: false) - end - - it_behaves_like 'sequence of failure and success' - end - context 'when unexpected error occurs' do before do allow(repository).to receive(:gitaly_operation_client).and_raise('Something went wrong') @@ -140,21 +132,7 @@ describe MergeRequests::RebaseService do end end - context 'when the two_step_rebase feature is enabled' do - before do - stub_feature_flags(two_step_rebase: true) - end - - it_behaves_like 'a service that can execute a successful rebase' - end - - context 'when the two_step_rebase feature is disabled' do - before do - stub_feature_flags(two_step_rebase: false) - end - - it_behaves_like 'a service that can execute a successful rebase' - end + it_behaves_like 'a service that can execute a successful rebase' context 'when skip_ci flag is set' do let(:skip_ci) { true } |