kaxil commented on issue #4102: [AIRFLOW-3262] Add param to log response when 
using SimpleHttpOperator
URL: 
https://github.com/apache/incubator-airflow/pull/4102#issuecomment-434629194
 
 
   The test had failed when I was using `http://localhost:8080` and checking 
for `Airflow` in log with following error which means the webserver isn't up:
   
   ```
   ======================================================================
   26) ERROR: test_response_in_logs 
(tests.operators.test_http_operator.SimpleHttpOpTests)
   ----------------------------------------------------------------------
      Traceback (most recent call last):
       tests/operators/test_http_operator.py line 62 in test_response_in_logs
         operator.execute(None)
       airflow/operators/http_operator.py line 94 in execute
         self.extra_options)
       airflow/hooks/http_hook.py line 127 in run
         return self.run_and_check(session, prepped_request, extra_options)
       airflow/hooks/http_hook.py line 175 in run_and_check
         raise ex
      ConnectionError: HTTPConnectionPool(host='localhost', port=8080): Max 
retries exceeded with url: / (Caused by 
NewConnectionError('<urllib3.connection.HTTPConnection object at 
0x7f56b530e710>: Failed to establish a new connection: [Errno 111] Connection 
refused',))
      -------------------- >> begin captured logging << --------------------
      airflow.utils.log.logging_mixin.LoggingMixin: INFO: Using connection to: 
id: HTTP_LOCAL. Host: localhost, Port: 8080, Schema: , Login: None, Password: 
None, extra: {}
      airflow.hooks.http_hook.HttpHook: INFO: Sending 'GET' to url: 
http://localhost:8080/
      urllib3.connectionpool: DEBUG: Starting new HTTP connection (1): 
localhost:8080
      airflow.hooks.http_hook.HttpHook: WARNING: 
HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: 
/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 
0x7f56b530e710>: Failed to establish a new connection: [Errno 111] Connection 
refused',)) Tenacity will retry to execute the operation
      --------------------- >> end captured logging << ---------------------
   ```
   
   Hence I changed it to connect to Google and check for `Google` instead

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


With regards,
Apache Git Services

Reply via email to