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

Ash Berlin-Taylor commented on AIRFLOW-2073:
--------------------------------------------

Yeah okay, this Sensor is currently totally broken, and the correct behaviour 
is unclear.

{{os.walk}} basically never fails.  {{[f for f in walk('/i/dont/exist')]}} 
never fails and always evaluates to an empty list.

Using {{os.exists(full_path)}} might be one solution here, but it's not clear 
what the behaviour of this sensor is meant to be when given a directory. If 
it's given a directory is it meant to wait for any files to appear inside the 
directory?

> FileSensor always return True
> -----------------------------
>
>                 Key: AIRFLOW-2073
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2073
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: contrib
>    Affects Versions: 1.9.0
>         Environment: Ubuntu 16.04
>            Reporter: Pierre Payet
>            Priority: Trivial
>
> When using a FileSensor, the path is tested with os.walk. However, this 
> function never raise an error if the path does not exist and the poke will 
> always return True.



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

Reply via email to