egotist0 opened a new pull request, #75430:
URL: https://github.com/apache/airflow/pull/75430

   Fix synchronous durable recovery when a BQ job's actual location differs 
from the operator's configured `location`.
   
   BQ can infer a region such as `asia-northeast3` during submission while the 
operator's `location` remains `None`. The hook can also obtain the submission 
location from the connection. On retry, the operator restores only the job ID 
and looks it up without the actual region. For these regional jobs, lookup 
returns `NotFound`, causing another submission with the default 
`force_rerun=True`.
   
   Persist the returned location in a separate record associated with the BQ 
job ID, and use it during recovery lookup. Keep the existing string ID 
checkpoint and ID-only records compatible. Do not mutate the configured 
location, so replacement jobs after failure or `NotFound` still use the current 
configuration.
   
   The location is saved before the mixin checkpoints the ID, so a newly 
checkpointed ID has matching location information. This adds one state-store 
write to the existing submit-before-checkpoint failure window; it does not 
eliminate that window. Submission order, deferrable execution, cancellation and 
extra-link location handling remain unchanged.
   
   Testing: all 173 tests in `test_bigquery.py` pass in the upstream Python 
3.12 CI image, with injected source hashes verified. Ruff, provider mypy, 
template-field checks and `git diff --check` pass. Broader cross-provider tests 
and documentation builds have not been run locally. No live BQ validation yet.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — OpenAI Codex (GPT-5)
   
   Generated-by: OpenAI Codex (GPT-5) 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.
   
   ---
   
   Drafted-by: OpenAI Codex (GPT-5) (no human review before posting)
   


-- 
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]

Reply via email to