uranusjr commented on code in PR #26925:
URL: https://github.com/apache/airflow/pull/26925#discussion_r991775913


##########
airflow/operators/trigger_dagrun.py:
##########
@@ -108,42 +111,49 @@ def __init__(
         self.allowed_states = allowed_states or [State.SUCCESS]
         self.failed_states = failed_states or [State.FAILED]
 
-        if execution_date is not None and not isinstance(execution_date, (str, 
datetime.datetime)):
+        if execution_date:
+            logical_date = execution_date
+            warnings.warn(
+                "Parameter ``execution_date`` is deprecated. Use 
``logical_date``.",
+                RemovedInAirflow3Warning,
+            )

Review Comment:
   ```suggestion
               warnings.warn(
                   "Parameter ``execution_date`` is deprecated. Use 
``logical_date``.",
                   RemovedInAirflow3Warning,
                   stacklevel=2
               )
   ```



##########
airflow/operators/trigger_dagrun.py:
##########
@@ -108,42 +111,49 @@ def __init__(
         self.allowed_states = allowed_states or [State.SUCCESS]
         self.failed_states = failed_states or [State.FAILED]
 
-        if execution_date is not None and not isinstance(execution_date, (str, 
datetime.datetime)):
+        if execution_date:
+            logical_date = execution_date
+            warnings.warn(
+                "Parameter ``execution_date`` is deprecated. Use 
``logical_date``.",
+                RemovedInAirflow3Warning,
+            )

Review Comment:
   ```suggestion
               warnings.warn(
                   "Parameter ``execution_date`` is deprecated. Use 
``logical_date``.",
                   RemovedInAirflow3Warning,
                   stacklevel=2,
               )
   ```



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