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

   **Description**
   
   This change is a follow-up to PR #67382 and addresses the same execution 
timeout handling gap that was subsequently fixed for the dbt Cloud provider in 
PR #67626, but for the Airbyte provider.
   
   It also adopts the deferred timeout buffering approach introduced in PR 
#67229 for the Kubernetes provider to ensure timeout cleanup logic can execute 
before Airflow's framework-level deferred timeout handling terminates the task.
   
   The implementation now:
   
   * Uses wall-clock timestamps (`time.time()`) for serialized deadline 
calculations instead of monotonic time.
   * Enforces execution timeout checks before Airbyte job state evaluation 
within the trigger.
   * Adds a defer timeout buffer to allow timeout events to be processed and 
Airbyte job cancellation to occur before framework-level deferred timeout 
handling terminates the task.
   
   **Rationale**
   
   In deferrable mode, Airbyte job cancellation occurs in `execute_complete()` 
when the trigger emits a timeout event. However, Airflow's framework-level 
deferred timeout handling bypasses `execute_complete()`, which can leave 
Airbyte jobs running after task timeout.
   
   Additionally, serialized deadlines must use wall-clock time rather than 
monotonic time, as they are persisted across defer/resume boundaries. Timeout 
evaluation must also take precedence over job state evaluation to ensure 
consistent handling once a deadline has elapsed.
   
   This change keeps timeout handling within the trigger/operator flow and 
provides sufficient time for Airbyte job cancellation before framework-level 
task termination occurs.
   
   **Tests**
   
   Added/modified unit tests verifying that:
   
   * Wall-clock time is used for serialized deadline handling.
   * Execution timeout checks take precedence over Airbyte job state evaluation.
   * Deferred timeout buffering is applied when `execution_timeout` is 
configured.
   
   **Backwards Compatibility**
   
   This change does not modify public APIs or method signatures.
   
   ##### Was generative AI tooling used to co-author this PR?
   - [X] Yes (please specify the tool below)
   
   Generated-by: [GPT 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