[ 
https://issues.apache.org/jira/browse/AIRFLOW-2855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16572528#comment-16572528
 ] 

ASF subversion and git services commented on AIRFLOW-2855:
----------------------------------------------------------

Commit d47580feaf80eeebb416d0179dfa8db3f4e1d2c9 in incubator-airflow's branch 
refs/heads/master from Xiaodong
[ https://gitbox.apache.org/repos/asf?p=incubator-airflow.git;h=d47580f ]

[AIRFLOW-2855] Check Cron Expression Validity in DagBag.process_file() (#3698)

A DAG can be imported as a .py script properly,
but the Cron expression inside as "schedule_interval" may be
invalid, like "0 100 * * *".

This commit helps check the validity of Cron expression in DAG
files (.py) and packaged DAG files (.zip), and help show
exception messages in web UI by add these exceptions into
metadata "import_error".

> Need to Check Validity of Cron Expression When Process DAG File/Zip File
> ------------------------------------------------------------------------
>
>                 Key: AIRFLOW-2855
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2855
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: DAG
>            Reporter: Xiaodong DENG
>            Assignee: Xiaodong DENG
>            Priority: Critical
>
> *schedule_interval* of DAGs can either be *timedelta* or a *Cron expression*.
> When it's a Cron expression, there is no mechanism to check its validity at 
> this moment. If there is anything wrong with the Cron expression itself, it 
> will cause issues when methods _*following_schedule(**)*_  and 
> _*previous_schedule()*_ are invoked (will affect scheduling). However, 
> exceptions will only be written into logs. From Web UI, it’s hard for users 
> to identify this issue & the source while no new task can be initiated 
> (especially for users who’re not very familiar with Cron).
>  It may be good to show error messages in web UI when a DAG's Cron expression 
> (as schedule_interval) can not be parsed by *croniter* properly.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to