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


##########
providers/databricks/src/airflow/providers/databricks/operators/databricks_workflow.py:
##########
@@ -169,7 +169,18 @@ def _create_or_reset_job(self, context: Context) -> int:
                 self.job_name,
                 json.dumps(job_spec, indent=2),
             )
+            access_control_list = job_spec.get("access_control_list", None)
+            if access_control_list:
+                self.log.info(
+                    "Updating job permission for Databricks workflow job %s 
with access_control_list %s",
+                    self.job_name,
+                    access_control_list,
+                )
+                self._hook.update_job_permission(

Review Comment:
   If this is always expected to happen while resetting the job when the ACL is 
available, I suggest we move this call in the hook's reset_job method. Like 
that any further usage of the reset_job method will ensure that updating ACL 
automatically happens in case someone forgets to make this isolated call. 
   
   As I am checking, I see we have a similar occurrence in the Create Jobs 
operator at 
https://github.com/apache/airflow/blob/main/providers/databricks/src/airflow/providers/databricks/operators/databricks.py#L402.
 We could refactor that once we move this call to the reset_job method. 



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