The GitHub Actions job "Tests (AMD)" on 
airflow.git/snowflake-cancel-queries-on-user-kill-deferred has failed.
Run started by GitHub user steveahnahn (triggered by steveahnahn).

Head commit for run:
fbb14acbf2647528c7f5c2961000c5c45d534ea7 / Steve Ahn 
<[email protected]>
Cancel Snowflake queries when a user kills the deferred task

A deferred SnowflakeSqlApiOperator parks its running query ids in the triggerer,
so the operator's own on_kill no longer runs once the task is deferred. When a
user marks that task failed, clears it, or marks it success, 
SnowflakeSqlApiTrigger
had no on_kill hook, so the Snowflake statements kept executing on the 
warehouse,
burning compute credits, even though the operator already cancels the queries on
kill in the non-deferred path.

This adds on_kill to SnowflakeSqlApiTrigger to cancel the running query ids when
the user acts on the deferred task, matching the behaviour already shipped for 
the
EMR, Dataproc, BigQuery, and Dataflow triggers. The Snowflake SQL API cancel is 
a
blocking POST with no async variant, so it runs through sync_to_async off the
triggerer event loop, and the hook is built inside that worker so no connection
work touches the loop. A cancel_on_kill flag on both the operator and the 
trigger
lets users opt out.

Report URL: https://github.com/apache/airflow/actions/runs/29539653830

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to