Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
59a640a8
Commit
59a640a8
authored
Jul 05, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
611bf7e7
c0e193db
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
5 deletions
+19
-5
app/models/project_services/drone_ci_service.rb
app/models/project_services/drone_ci_service.rb
+2
-2
changelogs/unreleased/64176-fix-error-handling.yml
changelogs/unreleased/64176-fix-error-handling.yml
+5
-0
lib/gitlab/http.rb
lib/gitlab/http.rb
+3
-3
spec/models/project_services/drone_ci_service_spec.rb
spec/models/project_services/drone_ci_service_spec.rb
+9
-0
No files found.
app/models/project_services/drone_ci_service.rb
View file @
59a640a8
...
...
@@ -46,7 +46,7 @@ class DroneCiService < CiService
end
def
commit_status
(
sha
,
ref
)
with_reactive_cache
(
sha
,
ref
)
{
|
cached
|
cached
[
:commit_status
]
}
with_reactive_cache
(
sha
,
ref
)
{
|
cached
|
cached
[
:commit_status
]
}
end
def
calculate_reactive_cache
(
sha
,
ref
)
...
...
@@ -68,7 +68,7 @@ class DroneCiService < CiService
end
{
commit_status:
status
}
rescue
Errno
::
ECONNREFUSED
rescue
*
Gitlab
::
HTTP
::
HTTP_ERRORS
{
commit_status: :error
}
end
...
...
changelogs/unreleased/64176-fix-error-handling.yml
0 → 100644
View file @
59a640a8
---
title
:
Fix invalid SSL certificate errors on Drone CI service
merge_request
:
30422
author
:
type
:
fixed
lib/gitlab/http.rb
View file @
59a640a8
...
...
@@ -10,9 +10,9 @@ module Gitlab
RedirectionTooDeep
=
Class
.
new
(
StandardError
)
HTTP_ERRORS
=
[
SocketError
,
OpenSSL
::
SSL
::
SSLError
,
Errno
::
ECONNRESET
,
Errno
::
ECONNRE
FUSED
,
Errno
::
EHOSTUNREACH
,
Net
::
OpenTimeout
,
Net
::
ReadTimeout
,
Gitlab
::
HTTP
::
BlockedUrlError
,
SocketError
,
OpenSSL
::
SSL
::
SSLError
,
OpenSSL
::
OpenSSLError
,
Errno
::
ECONNRE
SET
,
Errno
::
ECONNREFUSED
,
Errno
::
EHOSTUNREACH
,
Net
::
OpenTimeout
,
Net
::
ReadTimeout
,
Gitlab
::
HTTP
::
BlockedUrlError
,
Gitlab
::
HTTP
::
RedirectionTooDeep
].
freeze
...
...
spec/models/project_services/drone_ci_service_spec.rb
View file @
59a640a8
...
...
@@ -101,6 +101,15 @@ describe DroneCiService, :use_clean_rails_memory_store_caching do
is_expected
.
to
eq
(
:error
)
end
Gitlab
::
HTTP
::
HTTP_ERRORS
.
each
do
|
http_error
|
it
"sets commit status to :error with a
#{
http_error
.
name
}
error"
do
WebMock
.
stub_request
(
:get
,
commit_status_path
)
.
to_raise
(
http_error
)
is_expected
.
to
eq
(
:error
)
end
end
{
"killed"
=>
:canceled
,
"failure"
=>
:failed
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment