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 2020/03/30 06:48:04 UTC
[GitHub] [airflow] KayleMaster opened a new issue #8006: Error out when
timezone is not supplied with pendulum
KayleMaster opened a new issue #8006: Error out when timezone is not supplied with pendulum
URL: https://github.com/apache/airflow/issues/8006
**Description**
When the timezone is not provided via pendulum, but dateutil.tz for example, throw an error.
**Use case / motivation**
The dag won't ever be scheduled with a start_date with a dateutil.tz timezone. I'm not sure if this is a bug, but it is mentioned in the docs that it only supports pendulum.
It'll be a lot easier to debug if an error is thrown, rather than going around checking Redis, workers and schedulers.
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [airflow] boring-cyborg[bot] commented on issue #8006: Error out
when timezone is not supplied with pendulum
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #8006: Error out when timezone is not supplied with pendulum
URL: https://github.com/apache/airflow/issues/8006#issuecomment-605814798
Thanks for opening your first issue here! Be sure to follow the issue template!
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [airflow] KayleMaster commented on issue #8006: Error out when
timezone is not supplied with pendulum
Posted by GitBox <gi...@apache.org>.
KayleMaster commented on issue #8006: Error out when timezone is not supplied with pendulum
URL: https://github.com/apache/airflow/issues/8006#issuecomment-606009126
On the top of my head, something like this?
```
import datetime as dt
from dateutil import tz
from airflow.operators.bash_operator import BashOperator
from airflow import DAG
BG_TZ = tz.gettz('Europe/Sofia')
DEFAULT_ARGS = {
"owner": "airflow",
"start_date": dt.datetime(2020, 3, 28, tzinfo=BG_TZ),
"email_on_failure": False,
"email_on_retry": False,
"retries": 0,
"retry_delay": dt.timedelta(minutes=5),
}
with DAG(
'test_dag',
default_args=DEFAULT_ARGS,
schedule_interval='0,30 * * * *',
catchup=False,
) as test_dag:
t1 = BashOperator(
task_id="ok",
bash_command="date -Is; echo ok",
)
```
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [airflow] RosterIn commented on issue #8006: Error out when
timezone is not supplied with pendulum
Posted by GitBox <gi...@apache.org>.
RosterIn commented on issue #8006: Error out when timezone is not supplied with pendulum
URL: https://github.com/apache/airflow/issues/8006#issuecomment-605982257
not all errors surface as BROKEN DAG message but they do appear in the scheduler logs.
Can you provide example to reproduce?
----------------------------------------------------------------
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
With regards,
Apache Git Services