Skip to content

Possibility to send the full object to Marathon on update#20

Merged
mbabineau merged 1 commit intothefactory:masterfrom
wndhydrnt:send_empty_collections
Mar 10, 2015
Merged

Possibility to send the full object to Marathon on update#20
mbabineau merged 1 commit intothefactory:masterfrom
wndhydrnt:send_empty_collections

Conversation

@wndhydrnt
Copy link
Copy Markdown
Contributor

Prior to this change setting the value of some keys of an application
(like 'health_checks' or 'constraints') from a collection that contains objects
to an empty collection and then calling MarathonClient.update_app to update the
application resulted in health checks or constraints never being updated.

The cause of this was that MarathonClient.update_app always called
app.to_json(minmal=True) which kicks out all empty collections.

This change lets the developer choose whether minimal should be True or False.
It retains the original behaviour through a default.

Prior to this change setting the value of some keys of an application
(like 'health_checks' or 'constraints') from a collection that contains objects
to an empty collection and then calling `MarathonClient.update_app` to update the
application resulted in health checks or constraints never being updated.

The cause of this was that `MarathonClient.update_app` always called
`app.to_json(minmal=True)` which kicks out all empty collections.

This change lets the developer choose whether `minimal` should be `True` or `False`.
It retains the original behaviour through a default.
@mbabineau
Copy link
Copy Markdown
Member

Great catch, sorry for the delay. Thanks for the PR!

mbabineau added a commit that referenced this pull request Mar 10, 2015
Possibility to send the full object to Marathon on update
@mbabineau mbabineau merged commit 57f50f4 into thefactory:master Mar 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants