You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/10/11 03:11:02 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #26925: TriggerDagRunOperator porting execution_date to logical_date

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


##########
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,
+            )
+
+        if logical_date is not None and not isinstance(logical_date, (str, datetime.datetime)):
             raise TypeError(
-                f"Expected str or datetime.datetime type for execution_date.Got {type(execution_date)}"
+                f"Expected str or datetime.datetime type for logical_date.Got {type(logical_date)}"

Review Comment:
   ```suggestion
                   f"Expected str or datetime.datetime type for logical_date. Got {type(logical_date)}"
   ```



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org