Extract DB operations from TriggerRunnerSupervisor into overridable methods#65680
Open
ephraimbuddy wants to merge 1 commit intoapache:mainfrom
Open
Extract DB operations from TriggerRunnerSupervisor into overridable methods#65680ephraimbuddy wants to merge 1 commit intoapache:mainfrom
ephraimbuddy wants to merge 1 commit intoapache:mainfrom
Conversation
…ethods Add overridable hooks on TriggerRunnerSupervisor so the DB-backed Trigger.* calls can be swapped for Execution API calls in a follow-up for AIP-92 (isolate DAG processor, callback processor, and triggerer from core services): - on_trigger_event / on_trigger_failure wrap Trigger.submit_event / Trigger.submit_failure. - fetch_trigger_details / fetch_non_task_trigger_ids wrap the bulk fetches used during update_triggers. - build_trigger_workloads extracts the session-scoped workload construction out of update_triggers, leaving update_triggers as a pure diff/enqueue step. As a side effect, DBDagBag, the log renderer, and the trigger fetches are now only created when there are new triggers to process, which removes a small amount of idle metadata-DB work on each loop iteration. Also fix the return annotation on Trigger.fetch_trigger_ids_with_non_task_associations from set[str] to set[int] to match the actual PK type.
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.
Add overridable hooks on TriggerRunnerSupervisor so the DB-backed Trigger.* calls can be swapped for Execution API calls in a follow-up for AIP-92 (isolate DAG processor, callback processor, and triggerer from core services):
Also fix the return annotation on
Trigger.fetch_trigger_ids_with_non_task_associations from set[str] to set[int] to match the actual PK type.
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Opus 4.7