ashb commented on code in PR #53009:
URL: https://github.com/apache/airflow/pull/53009#discussion_r2192165544


##########
providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/msgraph.py:
##########
@@ -108,8 +125,17 @@ class MSGraphAsyncOperator(BaseOperator):
         the message from the event, otherwise the response from the event 
payload is returned.
     :param serializer: Class which handles response serialization (default is 
ResponseSerializer).
         Bytes will be base64 encoded into a string, so it can be stored as an 
XCom.
+    :param start_from_trigger: If set to True, the operator will start 
directly from the triggerer without going into the worker first.
     """
 
+    start_trigger_args = StartTriggerArgs(
+        trigger_cls=f"{MSGraphTrigger.__module__}.{MSGraphTrigger.__name__}",
+        trigger_kwargs={},
+        next_method="execute_complete",
+        next_kwargs=None,
+        timeout=None,
+    )
+    start_from_trigger = False

Review Comment:
   Is there a reason you we wouldn't want this to be true by default? Given all 
the execute does is defer, I don't even think this needs to be an option -- 
just set it to true always? And then `execute()` is only called for when 
running on older versions of Airflow



##########
providers/microsoft/azure/src/airflow/providers/microsoft/azure/operators/msgraph.py:
##########
@@ -35,6 +37,21 @@
 from airflow.providers.microsoft.azure.version_compat import BaseOperator
 from airflow.utils.xcom import XCOM_RETURN_KEY
 
+try:
+    from airflow.triggers.base import StartTriggerArgs
+except ImportError:
+    # TODO: Remove this when min airflow version is 2.10.0 for standard 
provider

Review Comment:
   ```suggestion
       # TODO: Remove this when min airflow version is 2.10.0
   ```



-- 
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]

Reply via email to