konfusator opened a new issue #11100:
URL: https://github.com/apache/airflow/issues/11100


   **Apache Airflow version**:  1.10.12
   
   **Environment**:
   
   - **OS**: Debian GNU/Linux 10
   - **Kernel**:  `4.19.0-10-amd64 #1 Debian 4.19.132-1 (2020-07-24) x86_64 
GNU/Linux`
   - **Install tools**: pip
   - **Others**: LocalExecutor
   
   
   **What happened**:
   
   I set by mistake `dagrun_timeout` to a value smaller than `retry_delay` of a 
task. If I trigger the dag manually the dag runs the full time, the failing 
task is marked as "failed" and the following tasks as "upstream_failed" and a 
mail notification is sent – all as expected. If the dag is started by the 
scheduler the failing task runs one time, is marked as "failed" after 
`dagrun_timeout` and the following tasks are in state None. No mail is sent.
   
   **What you expected to happen**:
   
   I would expect the same behavior on manual triggered and scheduled dags and 
better logging. I would expect a failure notification in both cases.
   
   As my value of `dagrun_timeout` was an obvious mistake it would be nice to 
have some linting – e.g. `dagrun_timeout` shorter than the maximal running time 
of a single task (`retries` * `retry_delay`) or longer than the scheduling 
interval might be bad ideas and should result in a warning.
   
   **How to reproduce it**:
   ```
   args = {
       'owner': 'airflow',
       'retries': 2,
       'retry_delay': timedelta(minutes=10),
       'start_date': datetime(2020, 8, 31, tzinfo=local_tz),
       'email_on_failure': True,
       'email_on_retry': False,
   }
   
   dag = DAG(
       dag_id='failure',
       default_args=args,
       schedule_interval='45 19,23,3,7,11,15 * * *',
       dagrun_timeout=timedelta(minutes=5),
       catchup=False
   )
   
   looser = BashOperator(
       task_id="looser",
       bash_command='/bin/false',
       dag=dag
   )
   
   victim = BashOperator(
       task_id="victim",
       bash_command='echo "Holleri du dödl di, diri diri dudl dö!"',
       dag=dag
   )
   
   looser >> victim
   ```
   
   **Anything else we need to know**:
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to