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

   closes: #57359
   
   ## How to reproduce
   
   <img width="2106" height="725" alt="mock_57359" 
src="https://github.com/user-attachments/assets/c1ce54f9-a730-4398-985d-e490b99814fa";
 />
   
   <br>
   
   Using `test_run_continues_polling_after_retryable_service_unavailable`
   
   1. `template_job_start_trigger.run()` calls `get_job_status()`, which is 
mocked to raise `ServiceUnavailable` for a transient Dataflow API 503.
   2. Before this fix, the trigger [yielded an error 
`TriggerEvent`](https://github.com/apache/airflow/blob/8dab708863a85916b80ae2144aa4e7d8f21d2537/providers/google/src/airflow/providers/google/cloud/triggers/dataflow.py#L150)
 immediately instead of [sleeping and polling 
again](https://github.com/apache/airflow/blob/8dab708863a85916b80ae2144aa4e7d8f21d2537/providers/google/src/airflow/providers/google/cloud/triggers/dataflow.py#L147).
   
   
   ## How to fix
   
   Catch `ServiceUnavailable` inside the Dataflow job-status polling loop, 
sleep for `poll_sleep`, and continue polling.
   
   ## Tests
   
   ```bash
   uv run --project providers/google pytest 
providers/google/tests/unit/google/cloud/triggers/test_dataflow_template_job_start.py
 -xvs
   ```
   
   <br><br>
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   <!--
   If generative AI tooling has been used in the process of authoring this PR, 
please
   change below checkbox to `[X]` followed by the name of the tool, uncomment 
the "Generated-by".
   -->
   
   - [ ] Yes (please specify the tool below)
     Generated-by: Codex 5.5 following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


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