[
https://issues.apache.org/jira/browse/AIRFLOW-1330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16145674#comment-16145674
]
Yu Ishikawa commented on AIRFLOW-1330:
--------------------------------------
Let's summarize our discussion. We have 3 options to fix the issue, offering
another command line options to register a connection ID. I think {{3}} would
be the most natural.
What do you think about it? If [~criccomini] agree with me, we would like
[~mrkm4ntr] to modify his PR to fit to my proposal.
1. Support {{\-\-conn_url}} and {{--conn_type}} like [~mrkm4ntr] 's PR
{noformat}
airflow connections --add --conn_url //mysql-host:3306 --conn_type mysql
{noformat}
* Pros
** We don't add more command line options except for --conn_type
* Cons
** the format of --conn_url is a little confusing
2. Support both of {{\-\-conn_url}} and combinations of {{--conn_type}} and
like this
{noformat}
airflow connections --add --conn_id --conn_url mysql://fake-host:3306
or
airflow connections --add --conn_id --conn_type mysql --conn_host fake-host
--conn_port 3306
{noformat}
* Pros
** Users keep using the existing way to register a connection ID, as far as the
URL schema is valid
* Cons
** It's a little annoying for users to understand cases that the existing way
doesn't work.
3. Support only combinations {{--con_type}} and like this option
{noformat}
airflow connections --add --conn_id --conn_type mysql --conn_host fake-host
--conn_port 3306
{noformat}
* Pros
** All users have to do is to learn the new way to register a connection ID. It
would not be confusing.
* Cons
** We throw away the existing way to do that.
> Connection.parse_from_uri doesn't work for google_cloud_platform and so on
> --------------------------------------------------------------------------
>
> Key: AIRFLOW-1330
> URL: https://issues.apache.org/jira/browse/AIRFLOW-1330
> Project: Apache Airflow
> Issue Type: Bug
> Components: cli
> Reporter: Yu Ishikawa
>
> h2. Overview
> {{Connection.parse_from_uri}} doesn't work for some types like
> {{google_cloud_platform}} whose type name includes under scores. Since
> `urllib.parse.urlparse()` which is used in {{Connection.parse_from_url}}
> doesn't support a schema name which include under scores.
> So, airflow's CLI doesn't work when a given connection URI includes under
> scores like {{google_cloud_platform://XXXXX}}.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)