When the token is used in the databricks connection, the host name is being pulled from extra json data

https://github.com/apache/airflow/blob/fdd9b6f65b608c516b8a062b058972d9a45ec9e3/airflow/providers/databricks/hooks/databricks.py#L160


I think the host name should be pulled from databricks_conn directly as the line 164, where basic auth is being used https://github.com/apache/airflow/blob/fdd9b6f65b608c516b8a062b058972d9a45ec9e3/airflow/providers/databricks/hooks/databricks.py#L164

Thanks!

Liusong


tests/providers/databricks/hooks/test_databricks.py
"""
    Utility function to generate the get run endpoint given the host.
    """
    return 'https://{}/api/2.0/clusters/start'.format(host)
def restart_cluster_endpoint(host):
    """
    Utility function to generate the get run endpoint given the host.
    """
    return 'https://{}/api/2.0/clusters/restart'.format(host)
def terminate_cluster_endpoint(host):
    """
    Utility function to generate the get run endpoint given the host.
    """
    return 'https://{}/api/2.0/clusters/delete'.format(host)
def create_valid_response_mock(content):
    response = mock.MagicMock()
    response.json.return_value = content
    return response
def create_post_side_effect(exception, status_code=500):
    if exception != requests_exceptions.HTTPError:
        return exception()
    else:
        response = mock.MagicMock()
        response.status_code = status_code
        response.raise_for_status.side_effect = exception(response=response)
        return response
def setup_mock_requests(mock_requests, exception, status_code=500, error_count=None, response_content=None):