Skip to content
This repository was archived by the owner on May 6, 2020. It is now read-only.

ref(scheduler): add HTTP functions in KubeHTTPClient#1019

Merged
bacongobbler merged 1 commit intodeis:masterfrom
bacongobbler:1008-use-generic-session-methods
Sep 9, 2016
Merged

ref(scheduler): add HTTP functions in KubeHTTPClient#1019
bacongobbler merged 1 commit intodeis:masterfrom
bacongobbler:1008-use-generic-session-methods

Conversation

@bacongobbler
Copy link
Copy Markdown
Member

These functions properly handle connection errors and clean up some of the child/parent class
relations when making a request.

closes #1008

@deis-bot
Copy link
Copy Markdown

@helgi is a potential reviewer of this pull request based on my analysis of git blame information. Thanks @bacongobbler!

@bacongobbler bacongobbler force-pushed the 1008-use-generic-session-methods branch from 185c229 to 03c1d25 Compare August 27, 2016 21:35
@codecov-io
Copy link
Copy Markdown

codecov-io commented Aug 27, 2016

Current coverage is 86.83% (diff: 79.74%)

Merging #1019 into master will decrease coverage by 0.03%

@@             master      #1019   diff @@
==========================================
  Files            42         41     -1   
  Lines          3565       3509    -56   
  Methods           0          0          
  Messages          0          0          
  Branches        607        578    -29   
==========================================
- Hits           3097       3047    -50   
+ Misses          309        307     -2   
+ Partials        159        155     -4   

Powered by Codecov. Last update f10d0a3...03c1d25

@helgi helgi added the LGTM1 label Aug 28, 2016
@helgi
Copy link
Copy Markdown
Contributor

helgi commented Aug 28, 2016

Awesome, wonder if we should handle the ConnectTimeout and ReadTimeout exceptions requests has? There is also a SSLError one but that's perhaps a step too far.

Btw this can go into 2.5 since it was delayed.

# ensure that connection errors get raised as a KubeException
self.adapter.add_matcher(connection_refused_matcher)
with self.assertRaises(exceptions.KubeException):
self.scheduler.http_head(self.path)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be http_head when it is in test_get?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch. will fix

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all fixed.

these functions properly handle connection errors and clean up some of the child/parent class
relations when making a request.
@bacongobbler bacongobbler force-pushed the 1008-use-generic-session-methods branch from 228e00c to fd95fa0 Compare September 9, 2016 18:33
@bacongobbler bacongobbler merged commit 3e1f9d6 into deis:master Sep 9, 2016
@bacongobbler bacongobbler deleted the 1008-use-generic-session-methods branch September 9, 2016 22:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gracefully handle cases when the k8s api server refuses connections

6 participants