Taragolis commented on code in PR #33614:
URL: https://github.com/apache/airflow/pull/33614#discussion_r1301884066


##########
airflow/providers/amazon/aws/operators/appflow.py:
##########
@@ -58,29 +59,33 @@ class AppflowBaseOperator(BaseOperator):
 
     ui_color = "#2bccbd"
 
+    template_fields = ("flow_name", "source", "source_field", "filter_date")
+
     UPDATE_PROPAGATION_TIME: int = 15
 
     def __init__(
         self,
-        source: str,
         flow_name: str,
         flow_update: bool,
+        source: str | None = None,

Review Comment:
   Operators/Sensors `__init__` constructor use only keyword-arguments, even if 
user provide positional, than error would happen. So change order in operators 
it is pretty safe. Unfortunetly you can't do the same things in Hooks 😢 
   
   
https://github.com/apache/airflow/blob/41d9be072abacc47393f700aa8fb98bc2b9a3713/airflow/models/baseoperator.py#L389-L396



##########
airflow/providers/amazon/aws/operators/appflow.py:
##########
@@ -58,29 +59,33 @@ class AppflowBaseOperator(BaseOperator):
 
     ui_color = "#2bccbd"
 
+    template_fields = ("flow_name", "source", "source_field", "filter_date")
+
     UPDATE_PROPAGATION_TIME: int = 15
 
     def __init__(
         self,
-        source: str,
         flow_name: str,
         flow_update: bool,
+        source: str | None = None,

Review Comment:
   Operators/Sensors `__init__` constructor use only keyword-arguments, even if 
user provide positional, than error would happen. So change order in operators 
it is pretty safe. Unfortunetly you can't do the same things in Hooks 😢 
   
   
https://github.com/apache/airflow/blob/41d9be072abacc47393f700aa8fb98bc2b9a3713/airflow/models/baseoperator.py#L389-L396



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