-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Select deadlines by id so that deadlines associated with other dagruns of same run_id are not pruned. #58574
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
Conversation
|
For some reason |
|
You've said you were able to recreate the issue; I presume you've tested this change and it fixes the issue? |
|
Yes, the tests also fail when the query is changed giving the traceback as reported in the issue. The issue can be reproduced with 2 dags with a deadline and task of time.sleep(10) and time.sleep(100) respectively My question was that tests required session.merge but testing it manually in the UI with above setup didn't require it. |
|
I'm a little scattered right now, just got back from vacation and getting pulled in a few directions. I THINK the issue is that the dag_maker fixture doesn't merge. Try the same tests but creating the DAG from scratch like some of the others in that file do. I'm pretty sure that was the fix when I ran into it in the past. |
|
@amoghrajesh @potiuk can we please have this backported for 3.1.4 once it is merged? |
ramitkataria
left a comment
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.
Other than the current thread about the session.merge, looks good to me!
…s of same run_id are not pruned.
|
I took some from help from AI and looked at https://docs.sqlalchemy.org/en/20/orm/session_state_management.html#session-object-states |
ferruzzi
left a comment
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, thanks!
|
Make sense! |
…other dagruns of same run_id are not pruned. (#58574) * Select deadlines by id so that deadlines associated with other dagruns of same run_id are not pruned. * Track updates to dagrun attribute by session.add . (cherry picked from commit c9d0fab) Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
…other dagruns of same run_id are not pruned. (#58574) (#58910) * Select deadlines by id so that deadlines associated with other dagruns of same run_id are not pruned. * Track updates to dagrun attribute by session.add . (cherry picked from commit c9d0fab) Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
…other dagruns of same run_id are not pruned. (#58574) (#58910) * Select deadlines by id so that deadlines associated with other dagruns of same run_id are not pruned. * Track updates to dagrun attribute by session.add . (cherry picked from commit c9d0fab) Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
…s of same run_id are not pruned. (apache#58574) * Select deadlines by id so that deadlines associated with other dagruns of same run_id are not pruned. * Track updates to dagrun attribute by session.add .
…s of same run_id are not pruned. (apache#58574) * Select deadlines by id so that deadlines associated with other dagruns of same run_id are not pruned. * Track updates to dagrun attribute by session.add .
…s of same run_id are not pruned. (apache#58574) * Select deadlines by id so that deadlines associated with other dagruns of same run_id are not pruned. * Track updates to dagrun attribute by session.add .
Filtering by
DagRun.run_idresults in fetching other dagruns of samerun_idwhich could be in running state withend_dateas None. Filter byDagRun.idto get only the dagrun relevant and prune deadlines associated with it.Closes #58560