Skip to content

MarathonHealthCheck class doesn't support 0.8.2  #34

@mrtheb

Description

@mrtheb

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions