schubergphilis / towerlib

A python library to interface with ansible tower's (awx) api.
MIT License
43 stars 39 forks source link

Implement Job, Workflow and Project Update Monitoring #92

Closed jitterjuice closed 2 years ago

jitterjuice commented 2 years ago

This PR implements standard Template Job Event monitoring, workflow task monitoring and project update monitoring.

Job template events and project update events can display the stdout as seen in AWX/Ansible Tower. Workflow's are a bit more complex, but this first round will display the current running status of workflow jobs and their overall status.

Updated to include some supporting properties.

costastf commented 2 years ago

Thank you very much for this, it's a lot of work! I need to block some time to go over it next week, I hope that's ok.

jitterjuice commented 2 years ago

Thank you very much for this, it's a lot of work! I need to block some time to go over it next week, I hope that's ok.

Of course :) I made a change to the return of the project.update() method, purely to allow project update monitor calling. This is a deviation from your standard return. I also could not get the tests to work locally, however have been using it in development with my local AWX instance which hasnt reported any issues.

Keen to hear your thoughts and feedback! I didnt quite understand how to tie some of the Entity's together, and whether a new Entity would have been needed for any changes.

jitterjuice commented 2 years ago

Hi @costastf , have you managed to have the above reviewed? I would like to implement some of the recommendations you suggested, however will require some assistance to implement the context-manager for job/workflow monitoring and output streaming

costastf commented 2 years ago

Hi, I have been away on parental leave but should be back to partly working from next week. I will ping you to try to set something up for us to go over details, is that ok @jitterjuice ?

jitterjuice commented 2 years ago

Hi @costastf , not a problem at all. Please reach out so we can go over the details :)

costastf commented 2 years ago

@jitterjuice do you have any medium that we could get on a chat like keybase?

jitterjuice commented 2 years ago

@costastf my apologies, I do not have a preference. I am available on slack, could install keybase if you wish to use that?

costastf commented 2 years ago

Hi @jitterjuice i think keybase is nice to not deal with slack channels and such.