Kirill Zhuravlev created AIRFLOW-4718:
-----------------------------------------

             Summary: FileSensor does not distinguish non-existent file from 
other IO failures
                 Key: AIRFLOW-4718
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-4718
             Project: Apache Airflow
          Issue Type: Bug
          Components: contrib
    Affects Versions: 1.10.3
            Reporter: Kirill Zhuravlev


airflow.contrib.sensors.file_sensor.FileSensor does not distinguish 
non-existent file from other IO failures (e.g. wrong permissions, etc.)

This limits its uses in scenarios with `soft_fail=True`, where it can mistake a 
different IOError for missing file and skip the rest of the workflow.

Example case:
 * file is present in the fs
 * it (its parent folder) doesn't have listing permissions for airflow user
 * `soft_fail=True` for the sensor
 * sensor skips the workflow despite the file being there

Expected behavior:
 * failed task in case of any exception other than IOError with 
errno=={{errno.}}{{ENOENT}} (==2)



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

Reply via email to