Skip to content

Conversation

@jroachgolf84
Copy link
Collaborator

@jroachgolf84 jroachgolf84 commented Dec 8, 2025

Description

The apache-airflow-providers-databricks provider uses API version 2.1 for all jobs operations. This PR bumps that API version to 2.2 for all jobs operations. These changes were made in three places:

  • Hooks/Operators
  • tests...
  • Documentation

related: #59189

@jroachgolf84
Copy link
Collaborator Author

Including comment from issue.

I've created a draft PR to upgrade to API v2.2 for all jobs endpoints. All unit-tests are passing (after updating to point to the proper version). However, in order for this to work, we'd need to update the operator to handle more than 100 tasks.

I have a few questions for @jscheffl and @eladkal:

  • Are there other tests that need to be done for changes like this?
  • Should we update other endpoints point to v2.0 and v2.1?

@jscheffl
Copy link
Contributor

jscheffl commented Dec 8, 2025

Including comment from issue.

I've created a draft PR to upgrade to API v2.2 for all jobs endpoints. All unit-tests are passing (after updating to point to the proper version). However, in order for this to work, we'd need to update the operator to handle more than 100 tasks.

I have a few questions for @jscheffl and @eladkal:

* Are there other tests that need to be done for changes like this?

* Should we update other endpoints point to v2.0 and v2.1?

Now that I see the PR (besides the comments I made on the issue) I think it is straight forward to upgrade all endpoints to 2.2 consistently.

@potiuk
Copy link
Member

potiuk commented Dec 9, 2025

Now that I see the PR (besides the comments I made on the issue) I think it is straight forward to upgrade all endpoints to 2.2 consistently.

Yep.

@jroachgolf84
Copy link
Collaborator Author

Sounds good, I'll go ahead and update all of those endpoints.

@jroachgolf84 jroachgolf84 marked this pull request as ready for review December 16, 2025 16:23
@jroachgolf84
Copy link
Collaborator Author

@eladkal, do you know the folks who maintain the Databricks provider? I'd love to get their review on this.

@potiuk
Copy link
Member

potiuk commented Dec 22, 2025

@eladkal, do you know the folks who maintain the Databricks provider? I'd love to get their review on this.

There is - currently - no dedicated people to review providers - we we want to introduce it as a way to track it - see https://lists.apache.org/thread/jqjd801g9161dqyv7l2xbsw0v7mp77z1 but it has not happened yet.

Your best guess is to look at git history for the provider

@jroachgolf84
Copy link
Collaborator Author

Thanks, @potiuk.

Copy link
Contributor

@jscheffl jscheffl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do a final rebase and then LGTM in my view.

@potiuk potiuk merged commit 98aa59b into apache:main Dec 28, 2025
83 checks passed
Subham-KRLX pushed a commit to Subham-KRLX/airflow that referenced this pull request Jan 2, 2026
…` endpoint (apache#59217)

* issue-59189: Updating Databricks provider to point to 2.2/jobs/... endpoint

* issue-59189: Updating docs to point towards 2.1/jobs to 2.2/jobs

* issue-59189: Moving other API endpoints to 2.2
stegololz pushed a commit to stegololz/airflow that referenced this pull request Jan 9, 2026
…` endpoint (apache#59217)

* issue-59189: Updating Databricks provider to point to 2.2/jobs/... endpoint

* issue-59189: Updating docs to point towards 2.1/jobs to 2.2/jobs

* issue-59189: Moving other API endpoints to 2.2
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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@aru-trackunit
Copy link
Contributor

Hi! Apart of updating jobs api path to /api/2.2 you also updated /api/2.2/sql/endpoints that does not exist, so I am getting:

[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. Just retested it.

Latest Databricks docs does not even include sql/endpoints my guess it has been migrated to sql/warehouses https://docs.databricks.com/api/workspace/warehouses/list

Maybe that’s just me but when doing API version bumps I would expect to bump a minor version not a fix version number.

Should latest databricks provider version be yanked?

@eladkal
Copy link
Contributor

eladkal commented Jan 13, 2026

@aru-trackunit can you raise a quick fix?

Should latest databricks provider version be yanked?

If the fix partially works I am not sure we can yank it as there are users who might already using the rest of the functionality. We normally yank if the release is completely invalid.

@aru-trackunit
Copy link
Contributor

Created this: #60444, I see that there are others raising missing endpoints comments, #59189 (comment)

@eladkal
Copy link
Contributor

eladkal commented Jan 13, 2026

@aru-trackunit if you know what the problem and what is the needed fix you can just go a head and create a PR with the fix. There is a planned release for later today so if the fix is merge before it will be included

@jscheffl
Copy link
Contributor

I am cutting providers wave already, so too late now. As the bug is already released I assume a fix would be great for the next providers wave in 2 weeks. Except it we judge urgent and we cut a special RC2 for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants