-
Notifications
You must be signed in to change notification settings - Fork 3
Allow specifying multiple Marathon addresses and failover to each sequentially #74
Conversation
sequentially when making requests * This is what the Python Marathon API client does
Current coverage is 99.75% (diff: 100%)@@ develop #74 diff @@
==========================================
Files 17 18 +1
Lines 1570 1664 +94
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 1566 1660 +94
Misses 4 4
Partials 0 0
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good so far, just a couple of minor questions.
@@ -532,7 +605,7 @@ def test_get_json_field(self): | |||
|
|||
request = yield self.requests.get() | |||
self.assertThat(request, HasRequestProperties( | |||
method='GET', url=self.uri('/my-path'))) | |||
method='GET', url='http://localhost:8080/my-path')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make self.uri()
work for the common case instead of having to explicitly provide the full URI everywhere?
usage: marathon-acme [-h] [-a ACME] [-m MARATHON] [-l LB [LB ...]] [-g GROUP] | ||
[--listen LISTEN] | ||
usage: marathon-acme [-h] [-a ACME] [-m MARATHON [MARATHON ...]] | ||
[-l LB [LB ...]] [-g GROUP] [--listen LISTEN] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a huge fan of space-separated opts like -m foo bar baz
, because it looks like the extras are positional args.
Can we make these comma-separated or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I maybe do this in a separate PR and do it for --lb
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Fixes #48.
I basically copied what the "official" Marathon Python client does but in async.