dabla commented on code in PR #55068:
URL: https://github.com/apache/airflow/pull/55068#discussion_r2318629345
##########
airflow-core/src/airflow/models/dagbag.py:
##########
@@ -633,6 +675,285 @@ def dagbag_report(self):
return report
+class AsyncDagBag(DagBag):
Review Comment:
> So I think the Lambda example is where this is needed. If we don't allow a
lambda then all the template example could be made to work without needing to
load the dag.
>
> Getting a Context from a RuntimeTI without the task is doable -- it will
be lacking the `task` attribute, but I think for the reduction in complexity
it's worth saying that -- wand the MSGraphAsyncOperator could validate that
when start_from_trigger is True that none of the templated args are callable at
construction time (meaning if you tried it would result in a Dag parse error).
Do take into account though, that for the multiple event yielding (e.g.
AIP-88), I need this to work also, as per yielded event, the next_method has to
be called on the operator (that's not an issue) which also needs the context
and maybe will also need the task to be present in the context, unless you can
confirm it isn't needed also there.
Regarding the lambda's, yes we could add a validation on the
start_from_trigger to check if lambda's are present, and raise an Exception
that lambda's aren't allowed with start from trigger.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]