You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/03/29 15:56:10 UTC

[GitHub] [airflow] NBardelot edited a comment on pull request #5358: [AIRFLOW-4085] FileSensor - adding wildcard option

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:
users@infra.apache.org