airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] XD-DENG commented on a change in pull request #3762: [AIRFLOW-2913] Check bucket_key/bucket_name combination in S3KeySensor()
Date Fri, 17 Aug 2018 16:19:29 GMT
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

Mime
View raw message