[ 
https://issues.apache.org/jira/browse/AIRFLOW-2959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16593358#comment-16593358
 ] 

ASF GitHub Bot commented on AIRFLOW-2959:
-----------------------------------------

msumit closed pull request #3809: [AIRFLOW-2959] Make HTTPSensor doc clearer
URL: https://github.com/apache/incubator-airflow/pull/3809
 
 
   

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/sensors/http_sensor.py b/airflow/sensors/http_sensor.py
index 33f8531368..f665737e96 100644
--- a/airflow/sensors/http_sensor.py
+++ b/airflow/sensors/http_sensor.py
@@ -28,8 +28,11 @@
 
 class HttpSensor(BaseSensorOperator):
     """
-    Executes a HTTP get statement and returns False on failure:
-        404 not found or response_check function returned False
+    Executes a HTTP GET statement and returns False on failure caused by
+    404 Not Found or `response_check` returning False.
+
+    HTTP Error codes other than 404 (like 403) or Connection Refused Error
+    would fail the sensor itself directly (no more poking).
 
     :param http_conn_id: The connection to run the sensor against
     :type http_conn_id: string


 

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


> HTTPSensor doc/comment is not clear enough
> ------------------------------------------
>
>                 Key: AIRFLOW-2959
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2959
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: operators
>            Reporter: Xiaodong DENG
>            Assignee: Xiaodong DENG
>            Priority: Minor
>
> The HTTPSensor is supposed to sense if a resource/endpoint if available at a 
> location specified by http connection. It will return False when the HTTP 
> Status code is 404 or check function returns False.
> However, HTTP Error code other than 404, or Connection Refused, would fail 
> the sensor itself directly (no more poking) 
> [https://github.com/apache/incubator-airflow/blob/f6191fbd7a61766bd002873db371b74702b13ff3/airflow/sensors/http_sensor.py#L90].
>  This is not clear enough in the doc. Users like myself may think these 
> situations will also return False and try poking later, while it's not true.
> This should be made clear in the documetation.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to