Conversation
|
Thanks for submitting the PR. I'm hesitant to merge this because:
What kind of tools are you using to interact with Databricks where you need to use this proxy? E.g. do you use the If you're using class ProxyApiClient(ApiClient):
def __init__(self, path_prefix=None, **kwargs):
super().__init__(**kwargs)
self.path_prefix = path_prefix
def get_url(self, path, version=None):
url = super().get_url(path, version)
if self.path_prefix:
o = urlparse(url)
o = o._replace(path=self.path_prefix + o.path)
url = o.geturl()
return url |
|
Thanks for review @pietern! We interact with Databricks via the CLI directly so we can't modify code unless we fork it. Do you have an idea of a way of implementing this thats acceptable to merge? I could implement it if so |
|
Would this change be more palatable if a if base_url := os.environ.get("DATABRICKS_BASE_URL"): # this would probably be moved to config
self.url = base_url
else:
... original logic |
This is to allow enterprise users who are forced to interact with Databricks via a proxy to set a custom host for ApiClient.
Example
Before
After