[
https://issues.apache.org/jira/browse/AIRFLOW-4740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ash Berlin-Taylor resolved AIRFLOW-4740.
----------------------------------------
Resolution: Fixed
Fix Version/s: 1.10.4
> default args end_date should be as permissive as start_date
> -----------------------------------------------------------
>
> Key: AIRFLOW-4740
> URL: https://issues.apache.org/jira/browse/AIRFLOW-4740
> Project: Apache Airflow
> Issue Type: Improvement
> Components: DAG, models
> Affects Versions: 1.10.3
> Reporter: Aaron Dossett
> Priority: Minor
> Fix For: 1.10.4
>
>
> A dag will accept, in its default_args, a `start_date` as simple as
> `2019-06-01`. If it detects a string, it converts to a richer type ([code
> reference|[https://github.com/apache/airflow/blob/master/airflow/models/dag.py#L217-L221]]).
> However, it will not accept a similar string for `end_date` instead an
> exception like this is thrown:
> {code:java}
> Traceback (most recent call last):
> File "/airflow/tests/models/test_dag.py", line 210, in
> test_dag_naive_start_end_dates_strings
> DAG('DAG', default_args={'start_date': '2019-06-01', 'end_date':
> '2019-06-05'})
> File "/airflow/airflow/models/dag.py", line 244, in __init__
> timezone.convert_to_utc(self.default_args['end_date'])
> File "/airflow/airflow/utils/timezone.py", line 92, in convert_to_utc
> if not is_localized(value):
> File "/airflow/airflow/utils/timezone.py", line 38, in is_localized
> return value.utcoffset() is not None
> AttributeError: 'str' object has no attribute 'utcoffset'{code}
> That's a very confusing user experience. `end_date` should be as permissive
> as `start_date`
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)