belegdol commented on PR #69037: URL: https://github.com/apache/airflow/pull/69037#issuecomment-4862712202
> Suggestion: keep the API lookup out of the property. For example, give the helper a flag — `_resolve_http_path(allow_endpoint_lookup: bool = True)` — where `get_conn()` uses the default, and `sqlalchemy_url` passes `allow_endpoint_lookup=False`, falling back to the previous behavior of omitting `http_path` when only `sql_endpoint_name` is configured and no cached value exists yet (raising there would reject a valid configuration). The connection-extra resolution — the actual #69031 fix — needs no API call and stays as-is. While it would fix #69031, I believe the error will still be there if one defines the hook with `sql_endpoint` defined instead of the `http_path` - which is supported according to the configuration: > http_path ([str](https://docs.python.org/3/library/stdtypes.html#str) | None) – Optional string specifying HTTP path of Databricks SQL Endpoint or cluster. If not specified, it should be either specified in the Databricks connection’s extra parameters, or sql_endpoint_name must be specified. > sql_endpoint_name ([str](https://docs.python.org/3/library/stdtypes.html#str) | None) – Optional name of Databricks SQL Endpoint. If not specified, http_path must be provided as described above. Would calling `_resolve_http_path` during `init()` be an acceptable solution to this? -- 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]
