amoghrajesh commented on code in PR #31376:
URL: https://github.com/apache/airflow/pull/31376#discussion_r1200075864
##########
airflow/models/connection.py:
##########
@@ -186,16 +186,43 @@ def _normalize_conn_type(conn_type):
conn_type = conn_type.replace("-", "_")
return conn_type
+ @staticmethod
+ def split_uri_to_parts(uri):
+ c = uri.count("://")
Review Comment:
Good point, since `spark://k8s://100.68.0.1:443?deploy-mode=cluster` is not
a valid URL as you mentioned earlier. I think the logic in this PR is to have a
fallback mechanism in case such a scenario occurs.
##########
airflow/models/connection.py:
##########
@@ -186,16 +186,43 @@ def _normalize_conn_type(conn_type):
conn_type = conn_type.replace("-", "_")
return conn_type
+ @staticmethod
+ def split_uri_to_parts(uri):
+ c = uri.count("://")
Review Comment:
In normal cases where the format is fine, the logic minus what this PR adds
seems to work fine. I think we can do just by adding the cases we have in
`test_connection.py` as far as this PR is concerned. What do you think
@uranusjr ?
--
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]