-
Notifications
You must be signed in to change notification settings - Fork 45
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
Allow optional end-date in get_execution_stats() #155
Allow optional end-date in get_execution_stats() #155
Conversation
@IMC07 Looks like the format needs to be changed for the files |
@asingamaneni I forgot to run black, done now. Please check again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Can you try to run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution
Description
Add optional parameter of max end date for TaskDependcySensor get_execution_stats(). This is a minor change in order to not introduce a breaking change. However, if you agree I think it is more beautiful to have: 1) a function that returns the latest state of the run to be used for the 'poking' sensor, and have another 2) functionality that allows to query the API in a more flexible manner and allows to return more from the json response.
This way we are more flexible, so we can use the start/end/state details to trigger different paths in the Brickflow DAGs (with IfElseConditionTask tasks) for instance. E.g. if the Airflow dependency was finished before time x, then branch in this direction, otherwise y direction. Or if latest run had status 'failed', then branch in direction z etc.
Right now it could be used like this:
Related Issue
#154
Motivation and Context
See issue/above.
How Has This Been Tested?
Tested locally and with unit tests.
Screenshots (if appropriate):
Types of changes
Checklist: