uranusjr commented on code in PR #22688:
URL: https://github.com/apache/airflow/pull/22688#discussion_r843503863


##########
airflow/cli/commands/connection_command.py:
##########
@@ -133,6 +134,24 @@ def _valid_uri(uri: str) -> bool:
     return uri_parts.scheme != '' and uri_parts.netloc != ''
 
 
+def _valid_conn_type(conn_type: str) -> Tuple[bool, List[str]]:

Review Comment:
   Eagerly accessing valid conn types looks wrong to me (it’s slow). The 
`_get_connection_types()` function should live outside of this, and only called 
when `conn_type` is not valid.
   
   This function should simply return a bool to indicate whether the conn type 
is valid.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to