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 2018/08/17 16:19:29 UTC

[GitHub] XD-DENG commented on a change in pull request #3762: [AIRFLOW-2913] Check bucket_key/bucket_name combination in S3KeySensor()

XD-DENG commented on a change in pull request #3762: [AIRFLOW-2913] Check bucket_key/bucket_name combination in S3KeySensor()
URL: https://github.com/apache/incubator-airflow/pull/3762#discussion_r210962024
 
 

 ##########
 File path: airflow/sensors/s3_key_sensor.py
 ##########
 @@ -64,6 +66,11 @@ def __init__(self,
                     bucket_key = parsed_url.path[1:]
                 else:
                     bucket_key = parsed_url.path
+        else:
+            if urlparse(bucket_key).path != bucket_key:
 
 Review comment:
   A bit illustration for reviewers: if `bucket_key` is a s3:// url, say `"s3://bucket_name/object_name"`, `urlparse(bucket_key).path` would return `'/object_name'`, so `!= bucket_key`
   
   When `bucket_key` is NOT a s3:// url, `urlparse(bucket_key).path` would be the same as `bucket_key` itself

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services