aru-trackunit commented on code in PR #59217:
URL: https://github.com/apache/airflow/pull/59217#discussion_r2685328650
##########
providers/databricks/src/airflow/providers/databricks/hooks/databricks.py:
##########
@@ -37,37 +37,37 @@
from airflow.providers.common.compat.sdk import AirflowException
from airflow.providers.databricks.hooks.databricks_base import
BaseDatabricksHook
-GET_CLUSTER_ENDPOINT = ("GET", "2.0/clusters/get")
-RESTART_CLUSTER_ENDPOINT = ("POST", "2.0/clusters/restart")
-START_CLUSTER_ENDPOINT = ("POST", "2.0/clusters/start")
-TERMINATE_CLUSTER_ENDPOINT = ("POST", "2.0/clusters/delete")
+GET_CLUSTER_ENDPOINT = ("GET", "2.2/clusters/get")
+RESTART_CLUSTER_ENDPOINT = ("POST", "2.2/clusters/restart")
+START_CLUSTER_ENDPOINT = ("POST", "2.2/clusters/start")
+TERMINATE_CLUSTER_ENDPOINT = ("POST", "2.2/clusters/delete")
-CREATE_ENDPOINT = ("POST", "2.1/jobs/create")
-RESET_ENDPOINT = ("POST", "2.1/jobs/reset")
-UPDATE_ENDPOINT = ("POST", "2.1/jobs/update")
-RUN_NOW_ENDPOINT = ("POST", "2.1/jobs/run-now")
-SUBMIT_RUN_ENDPOINT = ("POST", "2.1/jobs/runs/submit")
-GET_RUN_ENDPOINT = ("GET", "2.1/jobs/runs/get")
-CANCEL_RUN_ENDPOINT = ("POST", "2.1/jobs/runs/cancel")
-DELETE_RUN_ENDPOINT = ("POST", "2.1/jobs/runs/delete")
-REPAIR_RUN_ENDPOINT = ("POST", "2.1/jobs/runs/repair")
-OUTPUT_RUNS_JOB_ENDPOINT = ("GET", "2.1/jobs/runs/get-output")
-CANCEL_ALL_RUNS_ENDPOINT = ("POST", "2.1/jobs/runs/cancel-all")
+CREATE_ENDPOINT = ("POST", "2.2/jobs/create")
+RESET_ENDPOINT = ("POST", "2.2/jobs/reset")
+UPDATE_ENDPOINT = ("POST", "2.2/jobs/update")
+RUN_NOW_ENDPOINT = ("POST", "2.2/jobs/run-now")
+SUBMIT_RUN_ENDPOINT = ("POST", "2.2/jobs/runs/submit")
+GET_RUN_ENDPOINT = ("GET", "2.2/jobs/runs/get")
+CANCEL_RUN_ENDPOINT = ("POST", "2.2/jobs/runs/cancel")
+DELETE_RUN_ENDPOINT = ("POST", "2.2/jobs/runs/delete")
+REPAIR_RUN_ENDPOINT = ("POST", "2.2/jobs/runs/repair")
+OUTPUT_RUNS_JOB_ENDPOINT = ("GET", "2.2/jobs/runs/get-output")
+CANCEL_ALL_RUNS_ENDPOINT = ("POST", "2.2/jobs/runs/cancel-all")
-INSTALL_LIBS_ENDPOINT = ("POST", "2.0/libraries/install")
-UNINSTALL_LIBS_ENDPOINT = ("POST", "2.0/libraries/uninstall")
-UPDATE_REPO_ENDPOINT = ("PATCH", "2.0/repos/")
-DELETE_REPO_ENDPOINT = ("DELETE", "2.0/repos/")
-CREATE_REPO_ENDPOINT = ("POST", "2.0/repos")
+INSTALL_LIBS_ENDPOINT = ("POST", "2.2/libraries/install")
+UNINSTALL_LIBS_ENDPOINT = ("POST", "2.2/libraries/uninstall")
+UPDATE_REPO_ENDPOINT = ("PATCH", "2.2/repos/")
+DELETE_REPO_ENDPOINT = ("DELETE", "2.2/repos/")
+CREATE_REPO_ENDPOINT = ("POST", "2.2/repos")
-LIST_JOBS_ENDPOINT = ("GET", "2.1/jobs/list")
-LIST_PIPELINES_ENDPOINT = ("GET", "2.0/pipelines")
-LIST_SQL_ENDPOINTS_ENDPOINT = ("GET", "2.0/sql/endpoints")
+LIST_JOBS_ENDPOINT = ("GET", "2.2/jobs/list")
+LIST_PIPELINES_ENDPOINT = ("GET", "2.2/pipelines")
+LIST_SQL_ENDPOINTS_ENDPOINT = ("GET", "2.2/sql/endpoints")
Review Comment:
This endpoint unfortunately does not exist and I even do think that has been
migrated to: https://docs.databricks.com/api/workspace/warehouses/list
```
[2026-01-13 03:32:41] ERROR - Task failed with exception source=task
loc=task_runner.py:986
AirflowException: Response: {"error":"Bad Target: /api/2.2/sql/endpoints"}
, Status Code: 404
HTTPError: 404 Client Error: Not Found for url:
https://dbc-instance-random.cloud.databricks.com/api/2.2/sql/endpoints
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/databricks/hooks/databricks_base.py",
line 704 in _do_api_call
File
"/home/airflow/.local/lib/python3.12/site-packages/tenacity/__init__.py", line
445 in __iter__
File
"/home/airflow/.local/lib/python3.12/site-packages/tenacity/__init__.py", line
378 in iter
File
"/home/airflow/.local/lib/python3.12/site-packages/tenacity/__init__.py", line
400 in <lambda>
File "/usr/python/lib/python3.12/concurrent/futures/_base.py", line 449 in
result
File "/usr/python/lib/python3.12/concurrent/futures/_base.py", line 401 in
__get_result
File
"/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/databricks/hooks/databricks_base.py",
line 723 in _do_api_call
File "/home/airflow/.local/lib/python3.12/site-packages/requests/models.py",
line 1026 in raise_for_status
```
Previous version `api/2.0/sql/endpoints` works is there even though is not
listed in the Databricks documentation.
--
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]