Fix DbtCloudRunJobTrigger timeout error message and add final status check#62306
Merged
jscheffl merged 1 commit intoFeb 22, 2026
Merged
Conversation
…check (apache#61979) Fix two bugs in DbtCloudRunJobTrigger.run(): 1. The timeout error message displayed the raw epoch timestamp (self.end_time) instead of a meaningful duration, producing nonsensical messages like "after 1771200015.8 seconds". Changed to "within the configured timeout." 2. When the timeout expires, the trigger now performs a final is_still_running() check before yielding a timeout error. This prevents false timeout failures when a dbt Cloud job completes between the last poll and the timeout boundary. Closes: apache#61979 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
|
cc @jscheffl @josh-fell @potiuk — Would appreciate a review on this fix for the dbt-cloud provider trigger timeout bugs reported in #61979. The changes are small and focused:
All existing tests pass plus one new test for the race-condition fix. |
Contributor
Author
|
Collaborators for this PR: @codingrealitylabs and @girlcoder-gaming. They helped me raise this PR. |
jscheffl
approved these changes
Feb 22, 2026
dominikhei
pushed a commit
to dominikhei/airflow
that referenced
this pull request
Mar 11, 2026
…check (apache#61979) (apache#62306) Fix two bugs in DbtCloudRunJobTrigger.run(): 1. The timeout error message displayed the raw epoch timestamp (self.end_time) instead of a meaningful duration, producing nonsensical messages like "after 1771200015.8 seconds". Changed to "within the configured timeout." 2. When the timeout expires, the trigger now performs a final is_still_running() check before yielding a timeout error. This prevents false timeout failures when a dbt Cloud job completes between the last poll and the timeout boundary. Closes: apache#61979 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Ankurdeewan
pushed a commit
to Ankurdeewan/airflow
that referenced
this pull request
Mar 15, 2026
…check (apache#61979) (apache#62306) Fix two bugs in DbtCloudRunJobTrigger.run(): 1. The timeout error message displayed the raw epoch timestamp (self.end_time) instead of a meaningful duration, producing nonsensical messages like "after 1771200015.8 seconds". Changed to "within the configured timeout." 2. When the timeout expires, the trigger now performs a final is_still_running() check before yielding a timeout error. This prevents false timeout failures when a dbt Cloud job completes between the last poll and the timeout boundary. Closes: apache#61979 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
DbtCloudRunJobTrigger.run()has two bugs that surface when a dbt Cloud job run exceeds the configured timeout (#61979):Misleading error message: The timeout error message prints the raw Unix epoch timestamp (
self.end_time) instead of a meaningful value, producing nonsensical messages like"Job run 70403194297680 has not reached a terminal status after 1771200015.8 seconds."(≈ 56 years).Missing final status check: When the timeout fires, the trigger immediately yields an error without re-checking whether the job has since completed. If a job finishes between the last poll and the timeout boundary, Airflow incorrectly reports a timeout failure even though the dbt Cloud job succeeded.
Solution
Bug 1: Changed the error message from
f"after {self.end_time} seconds."tof"within the configured timeout."sinceself.end_timeis an absolute epoch timestamp, not a relative duration.Bug 2: Added a final
is_still_running()check before yielding the timeout error. If the job completed in the interim, the trigger breaks out of the while loop and falls through to the normal terminal status handling (success/cancelled/error).Testing Done
test_dbt_job_run_timeoutto verify the corrected error message format.test_dbt_job_run_timeout_with_final_status_checktest that simulates a job completing at the timeout boundary — verifies the trigger yields success instead of a false timeout error.providers/dbt/cloud/tests/unit/dbt/cloud/triggers/test_dbt.pypass.Breaking Changes
None. The only user-visible change is the timeout error message text, which previously contained an incorrect value (epoch timestamp) and now says "within the configured timeout." instead.
Closes: #61979
🤖 Generated with Claude Code