tszerszen commented on a change in pull request #10847:
URL: https://github.com/apache/airflow/pull/10847#discussion_r486111600



##########
File path: airflow/providers/google/cloud/operators/dataproc.py
##########
@@ -1808,6 +1808,8 @@ def __init__(
         gcp_conn_id: str = "google_cloud_default",
         impersonation_chain: Optional[Union[str, Sequence[str]]] = None,
         asynchronous: bool = False,
+        hook: Optional[DataprocHook] = None,

Review comment:
       @michalslowikowski00 > Why do you want to create hook object within the 
`__init__` method?
   
    I wanted `DataprocSubmitJobOperator` to be more customizable, and I need 
`hook` and `job_id`  as properties to be able to cancel job in `on_kill` method.
   
   If that's better I can disallow to initialise these properties in `__init__`.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to