hussein-awala commented on issue #38174:
URL: https://github.com/apache/airflow/issues/38174#issuecomment-2000590536
Actually, the issue is not in Airflow, it's an issue in `cornitor` package:
```python
>>> from croniter import croniter
>>> import datetime
>>> croniter("0 0 28 2 *", start_time=datetime.datetime(2024, 1,
1)).get_prev(datetime.datetime)
datetime.datetime(2023, 2, 28, 0, 0)
>>> croniter("0 0 29 2 *", start_time=datetime.datetime(2024, 1,
1)).get_prev(datetime.datetime)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/Users/hussein-awala/anaconda3/envs/airflow/lib/python3.11/site-packages/croniter/croniter.py",
line 204, in get_prev
return self._get_next(ret_type or self._ret_type, is_prev=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Users/hussein-awala/anaconda3/envs/airflow/lib/python3.11/site-packages/croniter/croniter.py",
line 289, in _get_next
result = self._calc(self.cur, expanded,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Users/hussein-awala/anaconda3/envs/airflow/lib/python3.11/site-packages/croniter/croniter.py",
line 563, in _calc
raise CroniterBadDateError("failed to find prev date")
croniter.croniter.CroniterBadDateError: failed to find prev date
```
Airflow catches the exception and returns `None`, I will check if it's
possible to fix it in `cornitor`, otherwise we can add a special case for 29
Feb.
--
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]