Commit d95abc0b authored by GitLab Bot's avatar GitLab Bot

Add latest changes from gitlab-org/gitlab@master

parent 015663b7
......@@ -142,7 +142,7 @@ gem 'gitlab-markup', '~> 1.7.0'
gem 'github-markup', '~> 1.7.0', require: 'github/markup'
gem 'commonmarker', '~> 0.20'
gem 'RedCloth', '~> 4.3.2'
gem 'rdoc', '~> 6.0'
gem 'rdoc', '~> 6.1.2'
gem 'org-ruby', '~> 0.9.12'
gem 'creole', '~> 0.5.0'
gem 'wikicloth', '0.8.1'
......
......@@ -823,7 +823,7 @@ GEM
ffi (>= 1.0.6)
msgpack (>= 0.4.3)
optimist (>= 3.0.0)
rdoc (6.0.4)
rdoc (6.1.2)
re2 (1.1.1)
recaptcha (4.13.1)
json
......@@ -1308,7 +1308,7 @@ DEPENDENCIES
raindrops (~> 0.18)
rblineprof (~> 0.3.6)
rbtrace (~> 0.4)
rdoc (~> 6.0)
rdoc (~> 6.1.2)
re2 (~> 1.1.1)
recaptcha (~> 4.11)
redis (~> 4.0)
......
# frozen_string_literal: true
class Projects::ErrorTracking::BaseController < Projects::ApplicationController
POLLING_INTERVAL = 1_000
def set_polling_interval
Gitlab::PollingInterval.set_header(response, interval: POLLING_INTERVAL)
end
end
......@@ -2,10 +2,10 @@
module Projects
module ErrorTracking
class StackTracesController < Projects::ApplicationController
class StackTracesController < Projects::ErrorTracking::BaseController
respond_to :json
before_action :authorize_read_sentry_issue!
before_action :authorize_read_sentry_issue!, :set_polling_interval
def index
result = fetch_latest_event_issue
......
# frozen_string_literal: true
class Projects::ErrorTrackingController < Projects::ApplicationController
class Projects::ErrorTrackingController < Projects::ErrorTracking::BaseController
before_action :authorize_read_sentry_issue!
before_action :set_issue_id, only: :details
POLLING_INTERVAL = 10_000
def index
respond_to do |format|
format.html
......@@ -20,6 +18,7 @@ class Projects::ErrorTrackingController < Projects::ApplicationController
respond_to do |format|
format.html
format.json do
set_polling_interval
render_issue_detail_json
end
end
......@@ -74,10 +73,6 @@ class Projects::ErrorTrackingController < Projects::ApplicationController
@issue_id = issue_details_params[:issue_id]
end
def set_polling_interval
Gitlab::PollingInterval.set_header(response, interval: POLLING_INTERVAL)
end
def serialize_errors(errors)
ErrorTracking::ErrorSerializer
.new(project: project, user: current_user)
......
......@@ -7,9 +7,10 @@ module Members
raise Gitlab::Access::AccessDeniedError unless can?(current_user, action_member_permission(permission, member), member)
old_access_level = member.human_access
old_expiry = member.expires_at
if member.update(params)
after_execute(action: permission, old_access_level: old_access_level, member: member)
after_execute(action: permission, old_access_level: old_access_level, old_expiry: old_expiry, member: member)
# Deletes only confidential issues todos for guests
enqueue_delete_todos(member) if downgrading_to_guest?
......
---
title: Update rdoc to 6.1.2
merge_request: 22434
author:
type: security
......@@ -22106,6 +22106,9 @@ msgstr ""
msgid "needs to be between 10 minutes and 1 month"
msgstr ""
msgid "never expires"
msgstr ""
msgid "new merge request"
msgstr ""
......@@ -22388,5 +22391,11 @@ msgstr ""
msgid "with %{additions} additions, %{deletions} deletions."
msgstr ""
msgid "with expiry changing from %{old_expiry} to %{new_expiry}"
msgstr ""
msgid "with expiry remaining unchanged at %{old_expiry}"
msgstr ""
msgid "yaml invalid"
msgstr ""
......@@ -34,6 +34,8 @@ describe Projects::ErrorTracking::StackTracesController do
it 'responds with no data' do
expect(response).to have_gitlab_http_status(:no_content)
end
it_behaves_like 'sets the polling header'
end
context 'service result is successful' do
......@@ -53,6 +55,8 @@ describe Projects::ErrorTracking::StackTracesController do
Gitlab::ErrorTracking::StackTraceHighlightDecorator.decorate(error_event).as_json
)
end
it_behaves_like 'sets the polling header'
end
context 'service result is erroneous' do
......
......@@ -91,13 +91,13 @@ describe Projects::ErrorTrackingController do
.and_return(status: :success, issues: [error], pagination: {})
expect(list_issues_service).to receive(:external_url)
.and_return(external_url)
get :index, params: params
end
let(:error) { build(:error_tracking_error) }
it 'returns a list of errors' do
get :index, params: params
expect(response).to have_gitlab_http_status(:ok)
expect(response).to match_response_schema('error_tracking/index')
expect(json_response).to eq(
......@@ -106,6 +106,8 @@ describe Projects::ErrorTrackingController do
'external_url' => external_url
)
end
it_behaves_like 'sets the polling header'
end
end
......@@ -201,30 +203,33 @@ describe Projects::ErrorTrackingController do
before do
expect(issue_details_service).to receive(:execute)
.and_return(status: :error, http_status: :no_content)
get :details, params: issue_params(issue_id: issue_id, format: :json)
end
it 'returns no data' do
get :details, params: issue_params(issue_id: issue_id, format: :json)
expect(response).to have_gitlab_http_status(:no_content)
end
it_behaves_like 'sets the polling header'
end
context 'service result is successful' do
before do
expect(issue_details_service).to receive(:execute)
.and_return(status: :success, issue: error)
get :details, params: issue_params(issue_id: issue_id, format: :json)
end
let(:error) { build(:detailed_error_tracking_error) }
it 'returns an error' do
get :details, params: issue_params(issue_id: issue_id, format: :json)
expect(response).to have_gitlab_http_status(:ok)
expect(response).to match_response_schema('error_tracking/issue_detailed')
expect(json_response['error']).to eq(error.as_json)
end
it_behaves_like 'sets the polling header'
end
context 'service result is erroneous' do
......
# frozen_string_literal: true
shared_examples 'sets the polling header' do
subject { response.headers[Gitlab::PollingInterval::HEADER_NAME] }
it { is_expected.to eq '1000'}
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment