pankajkoti commented on code in PR #38962:
URL: https://github.com/apache/airflow/pull/38962#discussion_r1564457145


##########
airflow/providers/databricks/hooks/databricks.py:
##########
@@ -656,14 +655,20 @@ def get_repo_by_path(self, path: str) -> str | None:
 
         return None
 
-    def update_job_permission(self, json: dict[str, Any]) -> dict:
+    def update_job_permission(self, job_id: int, json: dict[str, Any]) -> dict:
         """
         Update databricks job permission.
 
+        :param job_id: job id
         :param json: payload
         :return: json containing permission specification
         """
-        return self._do_api_call(UPDATE_PERMISSION_ENDPOINT, json)
+        response = {}
+        try:
+            response = self._do_api_call(("PATCH", 
f"api/2.0/permissions/jobs/{job_id}"), json)
+        except Exception as e:
+            self.log.error("Could not update permission %s", e)

Review Comment:
   IMO , if user is passing ACL and is expecting the permissions to be updated, 
then we should reraise the exception, otherwise the task will be marked as 
success without the expected outcome of permissions being updated too. WDYT?



-- 
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]

Reply via email to