-
Notifications
You must be signed in to change notification settings - Fork 4
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
Update prefect query functions #177
Conversation
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.
This is great!
I had two small questions, but are they are not an obstacle to merging this.
async def _flow_run_query(tags, flow_run_name=None): | ||
flow_runs_by_name = [] | ||
async def _flow_run_query( | ||
tags=None, flow_run_name=None, parent_flow_run_id=None, sort="START_TIME_DESC" |
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.
I do not think we will ever use the function in this way, but what happens if all parameters are None
, do we filter nothing and retrieve all flows?
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.
It retrieves all flows, I just did a quick test at my end.
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.
Ok, good to know!
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.
Nice, being able to trust the project_name
in the tag makes logic around result retrieval simpler too.
This PR updated the query-related functions according to mlexchange/mlex_prefect_worker#16 In particular, it adds:
START_TIME_ASC
by default, with the child flow that started first being at the beginning of the list