NBardelot edited a comment on pull request #5358:
URL: https://github.com/apache/airflow/pull/5358#issuecomment-809495082


   FYI this behaviour is inconsistent.
   
   If anyone like me comes to this PR after looking at the glob() behaviour, 
this cannot work for hooks that make use of a remote FS (like SFTPHook for 
example). As the Python documentation states that glob() uses a mix of  
os.scandir() and fnmatch.fnmatch() which make the code proposed here only 
adapted to a local FS.
   
   Thus, trying to use a path with a glob pattern and a hook to a remote FS 
will have a random effect: either you're lucky and the glob() will not find the 
equivalent path locally and just return that the path does not exist (the 
sensor will never trigger); or in a worse case scenario you might trigger the 
sensor for a file that exists locally and not in the remote...


-- 
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