-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Remove api prefix from update_job_permission in databricks hook
#53039
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Causes newer versions of the databricks sdk to crash that function due to a 404.
api prepend from update_job_permissionapi prefix from update_job_permission in databricks hook
|
can you pls add tests |
|
@fjmacagno Sorry, It's my fault, The test code definitely passed, but I’m wondering how I missed this. I’ll try to explore if there’s another way to address this issue aside from this PR. |
@mock.patch("airflow.providers.databricks.operators.databricks.DatabricksHook")
def test_exec_update_job_permission(self, db_mock_class):In this case, since the entire DatabricksHook is mocked, the internal _do_api_call() method is never actually invoked. Therefore, you cannot verify whether the path is "api/2.0/..." or "2.0/...". I think that It would be great if you could add a test case for this part! In the meantime, I’ll think about whether there are any other areas where additional tests might be helpful. |
|
@fjmacagno hello? I think that this issue caused by my work. so I feel very sorry for everyone. So could you accelerate this work? plz? |
|
Sorry i was on vacation for a while, I will try to write a test today. |
|
Added a test which i confirmed fails on master. |
Fixes a problem with the update_job_permission databricks hook method where it crashes with a 404. The fix is to remove
api/from the start of the path, which is automatically added by the databricks base hook. I am assuming this is a safe change because all the other endpoints do not includeapi/at the start, implying this one fell through the cracks.Fixes problem introduced in #52385.