Shopify / pyoozie

Library for querying and scheduling with Apache Oozie
https://py-oozie.readthedocs.io
MIT License
11 stars 12 forks source link

Add ability to update a coordinator's definition #42

Closed sabidib closed 7 years ago

sabidib commented 7 years ago

This adds the ability to update a coordinator's definition without killing and recreating the coordinator.

According to the docs a coordinator's definition can only be updated if the following are not changed:

If any of these are changed, then there should be a hard failure on the request.

I couldn't find anything specific on what coordinator states allow for an update so I assumed we would only want to update coordinators that are active or running or suspended.

Curious if updating a coordinator in a suspended state makes sense. @kmtaylor-github @cfournie Thoughts?

kmtaylor-github commented 7 years ago

Curious if updating a coordinator in a suspended state makes sense.

Yes! This is actually a really important usecase. A deploy shouldn't skip a suspended coord, nor should it resume it.

sabidib commented 7 years ago

I gave this a test spin with a local instance of oozie and switched a coordinator between the minimal coordinator and the full coordinator successfully. The diffs made sense as well. It also handled "updating" to the same coordinator xml showing an empty diff.

kmtaylor-github commented 7 years ago

It also handled "updating" to the same coordinator xml showing an empty diff.

Presumably this was with identical config data?

sabidib commented 7 years ago

Presumably this was with identical config data?

Yes, the configuration was the same.

sabidib commented 7 years ago

Any outstanding comments left?