SEPURI-SAI-KRISHNA opened a new pull request, #74358: URL: https://github.com/apache/airflow/pull/74358
`GCSToBigQueryOperator` accepts `cancel_on_kill` and respects it when it runs synchronously: `on_kill` cancels the BigQuery job only `if self.job_id and self.cancel_on_kill`, and logs "Skipping to cancel job" otherwise. When the operator defers, it did not pass the value to `BigQueryInsertJobTrigger`, which takes its own `cancel_on_kill` defaulting to `True` and is what actually decides. So `cancel_on_kill=False` had no effect in deferrable mode and the load was cancelled on kill regardless. The trigger needs no change. It accepts the argument, keeps it across serialization, and gates on it in `async def on_kill`, which is the path used from Airflow 3.3 onwards. `BigQueryInsertJobOperator` already passes `cancel_on_kill=self.cancel_on_kill` to the same trigger, so this brings the transfer operator in line with it. `BigQueryToGCSOperator` builds the same trigger but is untouched here: it never accepted `cancel_on_kill`, so there is nothing for it to hand over. **Tests** One test asserts the trigger receives `cancel_on_kill=False` from an operator configured with it. Against the unpatched operator it fails with `KeyError: 'cancel_on_kill'`, naming the argument that is not passed. Also run: the full `test_gcs_to_bigquery.py` file (60 passed, plus one pre-existing collection error from a missing `airflow_shared` module in my environment that reproduces identically against unmodified `main`) and mypy. No changelog entry: the parameter was always documented as controlling whether the job is cancelled, so this makes the documented behaviour hold rather than changing a contract. Happy to add one if you would prefer it. No existing issue; opening the PR directly rather than filing one first. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes - Claude Code (Opus 5) -- 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]
