[ 
https://issues.apache.org/jira/browse/AIRFLOW-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kaxil Naik updated AIRFLOW-3162:
--------------------------------
    Fix Version/s: 1.10.1

> HttpHook fails to parse URL when port is specified
> --------------------------------------------------
>
>                 Key: AIRFLOW-3162
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3162
>             Project: Apache Airflow
>          Issue Type: Bug
>    Affects Versions: 1.10.0
>            Reporter: Eric Chang
>            Assignee: Eric Chang
>            Priority: Minor
>             Fix For: 1.10.1
>
>
> https://github.com/apache/incubator-airflow/pull/3379 introduced a regression 
> on HttpHook.get() where if a port is specified on 
> airflow.models.Connection.port and the provided endpoint has no leading 
> slash, the URL will fail to parse.
> With the connection:
>  
>  {{airflow.models.Connection(}}
>  {{    conn_id='test_conn',}}
>  {{    conn_type='http',}}
>  {{    host='test.com',}}
>  {{    port=1234}}
>  {{)}}
>  {{>>> hook = HttpHook(method='GET', http_conn_id='test_conn')}}
> {{>>> hook.get(endpoint='some/endpoint')}}
> {{----------------------------------------------------------------------}}
>  {{Traceback (most recent call last):}}
>  {{InvalidURL: Failed to parse: test.com:1234some/endpoint}}
>   



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to