eran-moses-human opened a new pull request, #61980:
URL: https://github.com/apache/airflow/pull/61980

   ## Summary
   
   Fixes two bugs in `DbtCloudRunJobTrigger.run()`:
   
   - **Misleading error message**: The timeout message printed `self.end_time` 
(an absolute epoch timestamp, e.g. `1771200015.8`) labelled as "seconds", 
producing nonsensical output. Replaced with a clear `"within the configured 
timeout"` message.
   - **Missing final status check**: The timeout check fired without re-polling 
the job status. A job completing during `asyncio.sleep()` could be incorrectly 
reported as timed out. Now performs one final `is_still_running()` call before 
yielding a timeout error.
   
   ## Changes
   
   - `providers/dbt/cloud/src/airflow/providers/dbt/cloud/triggers/dbt.py`:
     - Moved `asyncio.sleep()` before the timeout check
     - Added a final `is_still_running()` call when the timeout fires
     - Fixed the error message to no longer print epoch timestamp as duration
   - `providers/dbt/cloud/tests/unit/dbt/cloud/triggers/test_dbt.py`:
     - Updated existing timeout test to match new error message
     - Added new test `test_dbt_job_run_timeout_but_job_completes` for the edge 
case where a job completes at the timeout boundary
   
   Closes #61979
   
   Made with [Cursor](https://cursor.com)


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