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
40363f4b
Commit
40363f4b
authored
Aug 11, 2020
by
Matthias Kaeppler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop http_default_timeouts feature flag
parent
91950c18
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
12 deletions
+6
-12
changelogs/unreleased/233109-drop-feature-flag.yml
changelogs/unreleased/233109-drop-feature-flag.yml
+5
-0
lib/gitlab/http.rb
lib/gitlab/http.rb
+1
-1
spec/lib/gitlab/http_spec.rb
spec/lib/gitlab/http_spec.rb
+0
-11
No files found.
changelogs/unreleased/233109-drop-feature-flag.yml
0 → 100644
View file @
40363f4b
---
title
:
Stricter default timeouts for outgoing HTTP requests
merge_request
:
39188
author
:
type
:
other
lib/gitlab/http.rb
View file @
40363f4b
...
...
@@ -35,7 +35,7 @@ module Gitlab
def
self
.
perform_request
(
http_method
,
path
,
options
,
&
block
)
log_info
=
options
.
delete
(
:extra_log_info
)
options_with_timeouts
=
if
!
options
.
has_key?
(
:timeout
)
&&
Feature
.
enabled?
(
:http_default_timeouts
)
if
!
options
.
has_key?
(
:timeout
)
options
.
with_defaults
(
DEFAULT_TIMEOUT_OPTIONS
)
else
options
...
...
spec/lib/gitlab/http_spec.rb
View file @
40363f4b
...
...
@@ -157,17 +157,6 @@ RSpec.describe Gitlab::HTTP do
described_class
.
put
(
'http://example.org'
,
write_timeout:
1
)
end
end
context
'when default timeouts feature is disabled'
do
it
'does not apply any defaults'
do
stub_feature_flags
(
http_default_timeouts:
false
)
expect
(
described_class
).
to
receive
(
:httparty_perform_request
).
with
(
Net
::
HTTP
::
Get
,
'http://example.org'
,
open_timeout:
1
).
and_call_original
described_class
.
get
(
'http://example.org'
,
open_timeout:
1
)
end
end
end
describe
'.try_get'
do
...
...
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