Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MarathonHealthCheck class doesn't support 0.8.2 #34

Closed
mrtheb opened this issue Jun 17, 2015 · 0 comments · Fixed by #36
Closed

MarathonHealthCheck class doesn't support 0.8.2 #34

mrtheb opened this issue Jun 17, 2015 · 0 comments · Fixed by #36

Comments

@mrtheb
Copy link
Contributor

mrtheb commented Jun 17, 2015

Marathon 0.8.2 added a new http health check option called ignoreHttp1xx. Calling list_apps or get_app for an http app raises the following exception.

  File "/usr/local/lib/python2.7/dist-packages/marathon/client.py", line 135, in list_apps
    apps = self._parse_response(response, MarathonApp, is_list=True, resource_name='apps')
  File "/usr/local/lib/python2.7/dist-packages/marathon/client.py", line 50, in _parse_response
    return [clazz.from_json(resource) for resource in target]
  File "/usr/local/lib/python2.7/dist-packages/marathon/models/base.py", line 30, in from_json
    return cls(**{to_snake_case(k): v for k,v in attributes.iteritems()})
  File "/usr/local/lib/python2.7/dist-packages/marathon/models/app.py", line 101, in __init__
    for hc in (health_checks or [])
  File "/usr/local/lib/python2.7/dist-packages/marathon/models/base.py", line 30, in from_json
    return cls(**{to_snake_case(k): v for k,v in attributes.iteritems()})
TypeError: __init__() got an unexpected keyword argument 'ignore_http1xx'

This fix to support an additional arg in MarathonHealthCheck is easy and I'll do a PR shortly.

The main question is, is there another way to get this right w/o having to add this argument?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant