Uh oh!
There was an error while loading. Please reload this page.
Return dag-specified results in dag run wait API - #64577
Conversation
bugraoz93
left a comment
There was a problem hiding this comment.
Look good to me! It could be good to include unit test for the new conditional. Even though behavior not changed, we have new statements to test accordong to resulset
There was a problem hiding this comment.
Pull request overview
This PR aims to change the DAG run “wait” API behavior so that, when result_task_ids is not explicitly provided, the API returns XCom values marked as DAG results (dag_result=True) instead of returning no results.
Changes:
- Update XCom query selection to default to
dag_result=TrueXComs whenresult_task_ids is None. - Add SQLAlchemy
true()import to build the newdag_resultfilter.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
9a86866 to
812c4d9Compareuranusjr
commented
Apr 2, 2026
Test added (and rebased to resolve conflict) |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
We need to adjust the permission check. (People that cannot read xcom shouldn't be able to access that, and currently the check is only performed when result_task_ids is explicitly set. #64415 (And add a test for that)
812c4d9 to
833c650Compareuranusjr
commented
Apr 8, 2026
I adjusted the logic to not return any results if the API user does not have perm to view XComs (but still can view the dag run’s state) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
833c650 to
080ae5fCompareWhen result_task_ids is not explicitly set, default to return XCom values with dag_results set to true, which are values set by tasks with the returns_dag_result flag set. The behavior is unchanged if result_task_ids is explicitly set (values from those tasks are returned instead), or if there are not tasks authored to return dag results (the "results" dict will be absent).
080ae5f to
e1bc70eCompareUh oh!
There was an error while loading. Please reload this page.
For #51711 (comment).
When result_task_ids is not explicitly set, default to return XCom values with dag_results set to true, which are values set by tasks with the returns_dag_result flag set.
The behavior is unchanged if result_task_ids is explicitly set (values from those tasks are returned instead), or if there are not tasks authored to return dag results (the "results" dict will be absent).