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 2021/01/09 17:37:54 UTC

[GitHub] [airflow] mik-laj commented on a change in pull request #11843: Fix issue with moving end_date in elastic dag

mik-laj commented on a change in pull request #11843:
URL: https://github.com/apache/airflow/pull/11843#discussion_r554452022



##########
File path: tests/test_utils/perf/dags/elastic_dag.py
##########
@@ -51,6 +51,24 @@ def parse_time_delta(time_str: str):
     return timedelta(**time_params)  # type: ignore
 
 
+def parse_start_date():
+    """
+    Returns the start date for the elastic DAGs and string to be used as part of their ids.
+
+    :return Tuple[datetime.datetime, str]: A tuple of datetime.datetime object to be used
+        as a start_date and a string that should be used as part of the dag_id.
+    """
+
+    if "PERF_START_DATE" in os.environ:

Review comment:
       It will be ignored without any explicit message to the user, which may cause problems. I prefer to add one more check than then diagnose non-obvious behavior.




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

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