jedcunningham commented on code in PR #31712:
URL: https://github.com/apache/airflow/pull/31712#discussion_r1222082136


##########
airflow/providers/microsoft/azure/sensors/wasb.py:
##########
@@ -26,6 +26,13 @@
 from airflow.providers.microsoft.azure.triggers.wasb import 
WasbBlobSensorTrigger, WasbPrefixSensorTrigger
 from airflow.sensors.base import BaseSensorOperator
 
+try:
+    from airflow.models.abstractoperator import DEFAULT_DEFERRABLE
+except ImportError:
+    from airflow.configuration import conf
+
+    DEFAULT_DEFERRABLE = conf.getboolean("operators", "default_deferrable", 
fallback=False)
+

Review Comment:
   Wouldn't that mean it this would only function on 2.7+ only? I think 2.4+ 
makes more sense, and a comment as a reminder for 2.7 makes sense too. That 
said, what do folks think about just having line 34 above in each provider 
file. Similar to the alt solution in the pr description. That'd be my vote I 
think.



##########
airflow/serialization/schema.json:
##########


Review Comment:
   Can you undo all the formatting changes here? Makes this tough to review.



##########
airflow/models/abstractoperator.py:
##########
@@ -50,6 +50,7 @@
     from airflow.models.taskinstance import TaskInstance
 
 DEFAULT_OWNER: str = conf.get_mandatory_value("operators", "default_owner")
+DEFAULT_DEFERRABLE: bool = conf.getboolean("operators", "default_deferrable", 
fallback=False)

Review Comment:
   ```suggestion
   DEFAULT_DEFERRABLE: bool = conf.getboolean("operators", "default_deferrable")
   ```
   
   You don't need a fallback here. If we try to get this config option in core, 
it's default will already be available. Fallback is a lot more useful for 
providers.



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