diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-21 06:08:23 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-21 06:08:23 +0300 |
commit | 11d02c98dccbbb145ba5229846c575759efb813f (patch) | |
tree | c517a491d99b40cb5b7e8a80b343322f6fba07e7 /app | |
parent | 6f0cd7387e3d1b380f478b66b4edfec2894ec32a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/oauth/jira_dvcs/authorizations_controller.rb (renamed from app/controllers/oauth/jira/authorizations_controller.rb) | 6 | ||||
-rw-r--r-- | app/controllers/projects/branches_controller.rb | 6 | ||||
-rw-r--r-- | app/controllers/projects/commit_controller.rb | 4 | ||||
-rw-r--r-- | app/workers/container_registry/migration/enqueuer_worker.rb | 2 |
4 files changed, 10 insertions, 8 deletions
diff --git a/app/controllers/oauth/jira/authorizations_controller.rb b/app/controllers/oauth/jira_dvcs/authorizations_controller.rb index 8169b5fcbb0..613999f4ca7 100644 --- a/app/controllers/oauth/jira/authorizations_controller.rb +++ b/app/controllers/oauth/jira_dvcs/authorizations_controller.rb @@ -4,7 +4,7 @@ # flow routes for Jira DVCS integration. # See https://gitlab.com/gitlab-org/gitlab/issues/2381 # -class Oauth::Jira::AuthorizationsController < ApplicationController +class Oauth::JiraDvcs::AuthorizationsController < ApplicationController skip_before_action :authenticate_user! skip_before_action :verify_authenticity_token @@ -17,7 +17,7 @@ class Oauth::Jira::AuthorizationsController < ApplicationController redirect_to oauth_authorization_path(client_id: params['client_id'], response_type: 'code', scope: normalize_scope(params['scope']), - redirect_uri: oauth_jira_callback_url) + redirect_uri: oauth_jira_dvcs_callback_url) end # 2. Handle the callback call as we were a Github Enterprise instance client. @@ -33,7 +33,7 @@ class Oauth::Jira::AuthorizationsController < ApplicationController # 3. Rewire and adjust access_token request accordingly. def access_token # We have to modify request.parameters because Doorkeeper::Server reads params from there - request.parameters[:redirect_uri] = oauth_jira_callback_url + request.parameters[:redirect_uri] = oauth_jira_dvcs_callback_url strategy = Doorkeeper::Server.new(self).token_request('authorization_code') response = strategy.authorize diff --git a/app/controllers/projects/branches_controller.rb b/app/controllers/projects/branches_controller.rb index dad73c37fea..6264f10ce2d 100644 --- a/app/controllers/projects/branches_controller.rb +++ b/app/controllers/projects/branches_controller.rb @@ -34,11 +34,9 @@ class Projects::BranchesController < Projects::ApplicationController Gitlab::GitalyClient.allow_n_plus_1_calls do render end - rescue Gitlab::Git::CommandError => e - Gitlab::ErrorTracking.track_exception(e) - + rescue Gitlab::Git::CommandError @gitaly_unavailable = true - render + render status: :service_unavailable end format.json do branches = BranchesFinder.new(@repository, params).execute diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index 0c26b402876..90d823423f3 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -106,6 +106,8 @@ class Projects::CommitController < Projects::ApplicationController end def revert + return render_404 unless @commit + assign_change_commit_vars return render_404 if @start_branch.blank? @@ -117,6 +119,8 @@ class Projects::CommitController < Projects::ApplicationController end def cherry_pick + return render_404 unless @commit + assign_change_commit_vars return render_404 if @start_branch.blank? diff --git a/app/workers/container_registry/migration/enqueuer_worker.rb b/app/workers/container_registry/migration/enqueuer_worker.rb index 5feaba870e6..0dbbd27e309 100644 --- a/app/workers/container_registry/migration/enqueuer_worker.rb +++ b/app/workers/container_registry/migration/enqueuer_worker.rb @@ -10,7 +10,7 @@ module ContainerRegistry data_consistency :always feature_category :container_registry urgency :low - deduplicate :until_executing, including_scheduled: true + deduplicate :until_executed, including_scheduled: true idempotent! def perform |