-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
AIP-84 Migrate Clear Dag Run public endpoint to FastAPI #42975
AIP-84 Migrate Clear Dag Run public endpoint to FastAPI #42975
Conversation
a418bcf
to
4fc16f1
Compare
…API-84/clear_dag_run
…API-84/clear_dag_run
…API-84/clear_dag_run
…API-84/clear_dag_run
@pierrejeambrun , I noticed that in legacy implementation, for clear dag run endpoint with dry_run=True, the response is supposed to be a TaskInstanceCollection. However, the response only includes few attributes of TI. Below is an example response :
Related schema: TaskInstanceReferenceSchema I tried to return all details. But, to do that, it seems I can't reuse the methods in the legacy implementation as it is causing the following error.
I guess, I just need to use joinload. But, thinking if I should update here or just rewrite a select query within clear_dag_run method |
I think we can do the same and return a partial response. There is a way to do that in fastapi specifying the response model. And we need to document it in the swagger with example responses. DetachedInstance error is most certainly due to a bad session handling. (session used to fetch objects is closed too early or something similar) |
…API-84/clear_dag_run
…API-84/clear_dag_run
…API-84/clear_dag_run
I went with returning the entire object. Is that fine? If not, I can return the partial response. I already looked into how to do it |
…API-84/clear_dag_run
…API-84/clear_dag_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.
Nice!
A few suggestions/questions
Co-authored-by: Pierre Jeambrun <[email protected]>
Co-authored-by: Pierre Jeambrun <[email protected]>
…API-84/clear_dag_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.
Nice, a few minor suggestions and ready to merge, thanks
related to #42701