-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Move grid_data endpoint to REST API #23417
Comments
@bbovenzi I can take this. Please add a permalink to the github code that you want to migrate to rest API . I couldn't find |
oh yes, we renamed it to We probably don't need to return the |
Semi-related: #23772 Either before or after this issue we should try to optimize the function to generate this grid data. |
This should be an internal API endpoint, not a public one. Being in the webserver and views.py is fine for now. |
I would appreciate if this was available through the REST API as well, it is a very concise way of knowing about the historical context around task instances, and it avoids sending many separate requests to get the same information. @bbovenzi would you oppose this being part of the public API? |
@karakanb what is your use-case? I would still want to keep it separate so that we can quickly iterate on the grid view. But maybe the existing task instances REST API endpoints can be improved. |
My usecase is to integrate our Airflow pipelines with some of internal tooling, and grid view has been the perfect way to do so. Currently, since there is no grid endpoint, what I have to do is:
This means many requests, and especially when there are many task instances it takes many seconds to fetch the data because of additional pagination in the requests, whereas the grid endpoint can do this very quickly. Increasing the page sizes don't help much either for some reason, which means we are stuck with very slow loading times compared to the grid view data. I might also be doing something wrong, therefore if you have recommendations please let me know. |
I think "Generic" bulk retrieval of Airflow tasks (not optimized for UI but for bulk retrieval of data) could be added. Maybe you would like to design and contribute such an endpoint @karakanb - you seem to know hat you are doing with Python, adding yet another API endpoint should be easy following the exisitng ones and if you get it "generic" enough, it would be useful for others too. |
I could try to do that, for sure; however, it'd be pretty much the same as the grid data endpoint, no? alternatively, we could expand the |
The difference is that we might want to change grid data endpoint in a backwards-incompatible way in the future, to serve Airflow UI better. It might have some optimisations and more (or less) data retrieved to speed-UI responsiveness. And eventually we might make it an async endpoint as well. Contrary to that I am talking about "bullk "retrieval of the data" that should be stable. I think extending "dagRuns" is not great because it follows REST semantics, so in principle it only shoudl return dagRuns. I think having separate endpoint to retrieve "joined data" might be better. But I also know @bbovenzi and others discussed about the APIs we need so maybe they have other ideas. |
Description
Migrate the
object/grid_data
endpoint here to the REST API.With #23415, we can simplify this endpoint too and only return the
groups
object.Use case/motivation
No response
Related issues
No response
Are you willing to submit a PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: