diff options
author | Ash McKenzie <amckenzie@gitlab.com> | 2019-06-24 02:18:31 +0000 |
---|---|---|
committer | Ash McKenzie <amckenzie@gitlab.com> | 2019-06-24 02:18:31 +0000 |
commit | dadb8f2ada5030830ea37fd793ad5d2211adc063 (patch) | |
tree | 1197efdcf08d435dc4b158bbfffa346cf683f6be | |
parent | 771e390351ac64e261218c502fe60edea7ab2100 (diff) | |
parent | 3016719338e3cab69891198510e16e1fe4b6b3a1 (diff) | |
download | gitlab-ce-dadb8f2ada5030830ea37fd793ad5d2211adc063.tar.gz |
Merge branch 'sh-enable-ref-name-caching-discussions' into 'master'
Enable Gitaly ref name caching for discussions.json
See merge request gitlab-org/gitlab-ce!29951
3 files changed, 8 insertions, 1 deletions
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 9e7e3ed5afb..2695f8a3192 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -16,7 +16,7 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo before_action :authenticate_user!, only: [:assign_related_issues] before_action :check_user_can_push_to_source_branch!, only: [:rebase] - around_action :allow_gitaly_ref_name_caching, only: [:index, :show] + around_action :allow_gitaly_ref_name_caching, only: [:index, :show, :discussions] def index @merge_requests = @issuables diff --git a/changelogs/unreleased/sh-enable-ref-name-caching-discussions.yml b/changelogs/unreleased/sh-enable-ref-name-caching-discussions.yml new file mode 100644 index 00000000000..12f4a5a499d --- /dev/null +++ b/changelogs/unreleased/sh-enable-ref-name-caching-discussions.yml @@ -0,0 +1,5 @@ +--- +title: Enable Gitaly ref name caching for discussions.json +merge_request: 29951 +author: +type: performance diff --git a/spec/controllers/projects/merge_requests_controller_spec.rb b/spec/controllers/projects/merge_requests_controller_spec.rb index 34cbf0c8723..0eca663a683 100644 --- a/spec/controllers/projects/merge_requests_controller_spec.rb +++ b/spec/controllers/projects/merge_requests_controller_spec.rb @@ -1001,6 +1001,8 @@ describe Projects::MergeRequestsController do before do project.add_developer(user) sign_in(user) + + expect(::Gitlab::GitalyClient).to receive(:allow_ref_name_caching).and_call_original end it 'returns 200' do |