egotist0 opened a new pull request, #75717: URL: https://github.com/apache/airflow/pull/75717
BQ can infer a region such as `asia-northeast3` while the operator's `location` remains `None`. Although [#75430](https://github.com/apache/airflow/pull/75430) fixed durable recovery lookup, [cancellation](https://github.com/apache/airflow/blob/ec8737c5417787d2f9c3f1ea9e26e6bfcd6c563b/providers/google/src/airflow/providers/google/cloud/operators/bigquery.py#L2699-L2703), [job links](https://github.com/apache/airflow/blob/ec8737c5417787d2f9c3f1ea9e26e6bfcd6c563b/providers/google/src/airflow/providers/google/cloud/operators/bigquery.py#L2475-L2496), and [trigger arguments](https://github.com/apache/airflow/blob/ec8737c5417787d2f9c3f1ea9e26e6bfcd6c563b/providers/google/src/airflow/providers/google/cloud/operators/bigquery.py#L2526-L2537) still use the configured location. Cancellation and trigger polling can therefore fail to find regional jobs, and detail links can point to the wrong location. Use the actual location from the submitted or recovered job for cancellation, BigQuery Job Detail links, `job_id_path`, and the deferrable trigger, falling back to the existing settings when unavailable. Only use a cached job's location for cancellation when its ID matches the job being cancelled. Keep the configured location unchanged so replacement jobs use the current settings. Testing: 246 relevant unit tests pass, with 2 version-based skips. Updated regressions fail without the fix. Ruff, provider mypy, and template-field checks pass. No live BQ validation; broader suites and docs builds have not been completed locally. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — OpenAI Codex Generated-by: OpenAI Codex following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) --- * Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information. Note: commit author/co-author name and email in commits become permanently public when merged. * For fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed. * When adding dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x). * For significant user-facing changes create newsfragment: `{pr_number}.significant.rst`, in [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments). You can add this file in a follow-up commit after the PR is created so you know the PR number. -- 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]
