[
https://issues.apache.org/jira/browse/AIRFLOW-3241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16664260#comment-16664260
]
ASF GitHub Bot commented on AIRFLOW-3241:
-----------------------------------------
kaxil closed pull request #4076: [AIRFLOW-3241] Remove Invalid template ext in
GCS Sensors
URL: https://github.com/apache/incubator-airflow/pull/4076
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/airflow/contrib/sensors/gcs_sensor.py
b/airflow/contrib/sensors/gcs_sensor.py
index 5a4f73e61e..356cff1af3 100644
--- a/airflow/contrib/sensors/gcs_sensor.py
+++ b/airflow/contrib/sensors/gcs_sensor.py
@@ -24,20 +24,19 @@
class GoogleCloudStorageObjectSensor(BaseSensorOperator):
"""
Checks for the existence of a file in Google Cloud Storage.
- Create a new GoogleCloudStorageObjectSensor.
-
- :param bucket: The Google cloud storage bucket where the object is.
- :type bucket: str
- :param object: The name of the object to check in the Google cloud
- storage bucket.
- :type object: str
- :param google_cloud_storage_conn_id: The connection ID to use when
- connecting to Google cloud storage.
- :type google_cloud_storage_conn_id: str
- :param delegate_to: The account to impersonate, if any.
- For this to work, the service account making the request must have
- domain-wide delegation enabled.
- :type delegate_to: str
+
+ :param bucket: The Google cloud storage bucket where the object is.
+ :type bucket: str
+ :param object: The name of the object to check in the Google cloud
+ storage bucket.
+ :type object: str
+ :param google_cloud_conn_id: The connection ID to use when
+ connecting to Google cloud storage.
+ :type google_cloud_conn_id: str
+ :param delegate_to: The account to impersonate, if any.
+ For this to work, the service account making the request must have
+ domain-wide delegation enabled.
+ :type delegate_to: str
"""
template_fields = ('bucket', 'object')
ui_color = '#f0eee4'
@@ -76,27 +75,25 @@ def ts_function(context):
class GoogleCloudStorageObjectUpdatedSensor(BaseSensorOperator):
"""
Checks if an object is updated in Google Cloud Storage.
- Create a new GoogleCloudStorageObjectUpdatedSensor.
-
- :param bucket: The Google cloud storage bucket where the object is.
- :type bucket: str
- :param object: The name of the object to download in the Google cloud
- storage bucket.
- :type object: str
- :param ts_func: Callback for defining the update condition. The
default callback
- returns execution_date + schedule_interval. The callback takes the
context
- as parameter.
- :type ts_func: function
- :param google_cloud_storage_conn_id: The connection ID to use when
- connecting to Google cloud storage.
- :type google_cloud_storage_conn_id: str
- :param delegate_to: The account to impersonate, if any.
- For this to work, the service account making the request must have
domain-wide
- delegation enabled.
- :type delegate_to: str
+
+ :param bucket: The Google cloud storage bucket where the object is.
+ :type bucket: str
+ :param object: The name of the object to download in the Google cloud
+ storage bucket.
+ :type object: str
+ :param ts_func: Callback for defining the update condition. The default
callback
+ returns execution_date + schedule_interval. The callback takes the
context
+ as parameter.
+ :type ts_func: function
+ :param google_cloud_conn_id: The connection ID to use when
+ connecting to Google cloud storage.
+ :type google_cloud_conn_id: str
+ :param delegate_to: The account to impersonate, if any.
+ For this to work, the service account making the request must have
domain-wide
+ delegation enabled.
+ :type delegate_to: str
"""
template_fields = ('bucket', 'object')
- template_ext = ('.sql',)
ui_color = '#f0eee4'
@apply_defaults
@@ -126,20 +123,19 @@ def poke(self, context):
class GoogleCloudStoragePrefixSensor(BaseSensorOperator):
"""
Checks for the existence of a files at prefix in Google Cloud Storage
bucket.
- Create a new GoogleCloudStorageObjectSensor.
-
- :param bucket: The Google cloud storage bucket where the object is.
- :type bucket: str
- :param prefix: The name of the prefix to check in the Google cloud
- storage bucket.
- :type prefix: str
- :param google_cloud_storage_conn_id: The connection ID to use when
- connecting to Google cloud storage.
- :type google_cloud_storage_conn_id: str
- :param delegate_to: The account to impersonate, if any.
- For this to work, the service account making the request must have
- domain-wide delegation enabled.
- :type delegate_to: str
+
+ :param bucket: The Google cloud storage bucket where the object is.
+ :type bucket: str
+ :param prefix: The name of the prefix to check in the Google cloud
+ storage bucket.
+ :type prefix: str
+ :param google_cloud_conn_id: The connection ID to use when
+ connecting to Google cloud storage.
+ :type google_cloud_conn_id: str
+ :param delegate_to: The account to impersonate, if any.
+ For this to work, the service account making the request must have
+ domain-wide delegation enabled.
+ :type delegate_to: str
"""
template_fields = ('bucket', 'prefix')
ui_color = '#f0eee4'
----------------------------------------------------------------
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:
[email protected]
> Incorrect Connection Parameter & Indentation in Gcs Sensor docstrings
> ---------------------------------------------------------------------
>
> Key: AIRFLOW-3241
> URL: https://issues.apache.org/jira/browse/AIRFLOW-3241
> Project: Apache Airflow
> Issue Type: Improvement
> Components: docs, gcp
> Reporter: Kaxil Naik
> Assignee: Kaxil Naik
> Priority: Trivial
>
> * It uses `google_cloud_storage_conn_id` instead of `google_cloud_conn_id`
> * Docstrings have unncessary indentation which causes the docs to not parse it
> * The GCS sensor also contains an incorrect template extension
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)