turbaszek commented on a change in pull request #10847:
URL: https://github.com/apache/airflow/pull/10847#discussion_r486150151
##########
File path: airflow/providers/google/cloud/operators/dataproc.py
##########
@@ -1834,15 +1838,24 @@ def execute(self, context: Dict):
timeout=self.timeout,
metadata=self.metadata,
)
- job_id = job_object.reference.job_id
- self.log.info('Job %s submitted successfully.', job_id)
+ self.job_id = job_object.reference.job_id
+ self.log.info('Job %s submitted successfully.', self.job_id)
if not self.asynchronous:
- self.log.info('Waiting for job %s to complete', job_id)
- hook.wait_for_job(job_id=job_id, location=self.location,
project_id=self.project_id)
- self.log.info('Job %s completed successfully.', job_id)
+ self.log.info('Waiting for job %s to complete', self.job_id)
+ self.hook.wait_for_job(job_id=self.job_id, location=self.location,
project_id=self.project_id)
+ self.log.info('Job %s completed successfully.', self.job_id)
+
+ return self.job_id
- return job_id
+ def on_kill(self, cancel_on_kill: bool = True, job_id: str = ''):
Review comment:
```suggestion
def on_kill(self):
```
This is an abstract method and those parameters will never be passed. We
have to use operators attributes
----------------------------------------------------------------
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]