Skip to content
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

AirbyteHook add cancel job option #24574

Closed
2 tasks done
sivankumar86 opened this issue Jun 21, 2022 · 3 comments · Fixed by #24593
Closed
2 tasks done

AirbyteHook add cancel job option #24574

sivankumar86 opened this issue Jun 21, 2022 · 3 comments · Fixed by #24593
Assignees

Comments

@sivankumar86
Copy link
Contributor

Apache Airflow Provider(s)

airbyte

Versions of Apache Airflow Providers

I want to cancel the job if it running more than specific time . Task is getting timeout however, airbyte job was not cancelled. it seems, on kill feature has not implemented

Workaround:
Create a custom operator and implement cancel hook and call it in on kill function.

def on_kill(self):
if (self.job_id):
self.log.error('on_kill: stopping airbyte Job %s',self.job_id)
self.hook.cancel_job(self.job_id)

Apache Airflow version

2.0.2

Operating System

Linux

Deployment

MWAA

Deployment details

Airflow 2.0.2

What happened

airbyte job was not cancelled upon timeout

What you think should happen instead

it should cancel the job

How to reproduce

Make sure job runs more than timeout

sync_source_destination = AirbyteTriggerSyncOperator(
task_id=f'airbyte_{key}',
airbyte_conn_id='airbyte_con',
connection_id=key,
asynchronous=False,
execution_timeout=timedelta(minutes=2)
)

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@sivankumar86 sivankumar86 added area:providers kind:bug This is a clearly a bug labels Jun 21, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Jun 21, 2022

Thanks for opening your first issue here! Be sure to follow the issue template!

@potiuk
Copy link
Member

potiuk commented Jun 21, 2022

Feel free to add it! assigned you!

@sivankumar86
Copy link
Contributor Author

Could you please review the change ?

#24593

@eladkal eladkal changed the title There is no cancel job option in hook AirbyteHook add cancel job option Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants