-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Feature: API for task run counts by state #12244
Feature: API for task run counts by state #12244
Conversation
✅ Deploy Preview for prefect-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Solid!
I think I might be missing something about how to set up fixtures for postgres (or maybe my implementation is incorrect) - anyone able to help me get these tests in a good state? |
start_time=now, | ||
end_time=now, | ||
), | ||
) |
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'm wondering why the tests are failing, is that the case locally?
Do we need to commit these, e.g.
await session.commit()
?
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.
Oo maybe that's the missing piece
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't believe that's all it was missing, you're a genius @serinamarie, thanks for the help! |
This PR introduces a new route to the UI-API that counts task runs by state according to a given Union filter set. The intent is to fulfill the requirements for #12102, though the implementation is more generic, allowing us to pass any union filter.
Example
Hitting:
/api/ui/task_runs/count
with or without a union filter returns:Checklist
<link to issue>
"maintenance
,fix
,feature
,enhancement
,docs
.For new functions or classes in the Python SDK: