You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "josh-fell (via GitHub)" <gi...@apache.org> on 2023/03/07 01:22:31 UTC

[GitHub] [airflow] josh-fell commented on a diff in pull request #29892: Introduce testing a connection via Airflow CLI

josh-fell commented on code in PR #29892:
URL: https://github.com/apache/airflow/pull/29892#discussion_r1127240069


##########
docs/apache-airflow/howto/connection.rst:
##########
@@ -191,19 +191,23 @@ Passwords cannot be manipulated or read without the key. For information on conf
 Testing Connections
 ^^^^^^^^^^^^^^^^^^^
 
-Airflow Web UI & API allows to test connections. The test connection feature can be used from
-:ref:`create <creating_connection_ui>` or :ref:`edit <editing_connection_ui>` connection page, or through calling
-:doc:`Connections REST API </stable-rest-api-ref/>`.
+Airflow Web UI, REST API, and CLI allow you to test connections. The test connection feature can be used from
+:ref:`create <creating_connection_ui>` or :ref:`edit <editing_connection_ui>` connection page in the UI, through calling
+:doc:`Connections REST API </stable-rest-api-ref/>`, or running the ``airflow connections test`` :ref:`CLI command <cli>`.
 
-To test a connection Airflow calls out the ``test_connection`` method from the associated hook class and reports the
-results of it. It may happen that the connection type does not have any associated hook or the hook doesn't have the
-``test_connection`` method implementation, in either case the error message will throw the proper error message.
+To test a connection, Airflow calls the ``test_connection`` method from the associated hook class and reports the
+results. It may happen that the connection type does not have any associated hook or the hook doesn't have the
+``test_connection`` method implementation, in either case an error message will be displayed or functionality
+will be disabled (if you are testing in the UI).
 
-One important point to note is that the connections will be tested from the webserver only, so this feature is
+One important point to note is that when testing in the Airflow UI, the test executes from the webserver only. This feature is

Review Comment:
   Hey @msumit! Thanks for taking a look. I'm a bit confused, is testing with the Airflow UI _not_ running the test from the webserver? 
   
   I changed the original sentence a little to try and make it clear the "webserver only" part was tied to testing with the Airflow UI.
   > One important point to note is that when testing in the Airflow UI, the test executes from the webserver only.
   
   Is this statement causing some confusion or needs to be more clear? Or is the word "only" make it sound not so clear?



##########
docs/apache-airflow/howto/connection.rst:
##########
@@ -191,19 +191,23 @@ Passwords cannot be manipulated or read without the key. For information on conf
 Testing Connections
 ^^^^^^^^^^^^^^^^^^^
 
-Airflow Web UI & API allows to test connections. The test connection feature can be used from
-:ref:`create <creating_connection_ui>` or :ref:`edit <editing_connection_ui>` connection page, or through calling
-:doc:`Connections REST API </stable-rest-api-ref/>`.
+Airflow Web UI, REST API, and CLI allow you to test connections. The test connection feature can be used from
+:ref:`create <creating_connection_ui>` or :ref:`edit <editing_connection_ui>` connection page in the UI, through calling
+:doc:`Connections REST API </stable-rest-api-ref/>`, or running the ``airflow connections test`` :ref:`CLI command <cli>`.
 
-To test a connection Airflow calls out the ``test_connection`` method from the associated hook class and reports the
-results of it. It may happen that the connection type does not have any associated hook or the hook doesn't have the
-``test_connection`` method implementation, in either case the error message will throw the proper error message.
+To test a connection, Airflow calls the ``test_connection`` method from the associated hook class and reports the
+results. It may happen that the connection type does not have any associated hook or the hook doesn't have the
+``test_connection`` method implementation, in either case an error message will be displayed or functionality
+will be disabled (if you are testing in the UI).
 
-One important point to note is that the connections will be tested from the webserver only, so this feature is
+One important point to note is that when testing in the Airflow UI, the test executes from the webserver only. This feature is

Review Comment:
   I can definitely add some explicit notes about different libs between webserver/workers (for the UI tests) and machines/pods (for CLI tests).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org