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:21:18 UTC

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

olchas commented on a change in pull request #11843:
URL: https://github.com/apache/airflow/pull/11843#discussion_r554450379



##########
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:
       Currently, if `PERF_START_DATE` is defined, then the value of `PERF_START_AGO` (if defined as well) will simply be ignored. Are you sure we should throw an exception if both of them are defined? They are mutually exclusive, but having both of them defined does not prevent parsing the dag file.




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