Skip to content

Load TI related objects when purging TIs without heartbeat#49246

Merged
vatsrahul1001 merged 1 commit intoapache:mainfrom
astronomer:load-ti-relationships
Apr 15, 2025
Merged

Load TI related objects when purging TIs without heartbeat#49246
vatsrahul1001 merged 1 commit intoapache:mainfrom
astronomer:load-ti-relationships

Conversation

@ephraimbuddy
Copy link
Contributor

This query joins to DagModel but doesn't load the TI related dag_model or any other
related objects used in the following TaskCallbackRequest Arguments, resulting in
detached instance error when requesting callback.

This PR fixes it by using selectinload for fast loading of the related
objects used in the TaskCallbackRequest

@boring-cyborg boring-cyborg bot added the area:Scheduler including HA (high availability) scheduler label Apr 14, 2025
@ephraimbuddy ephraimbuddy force-pushed the load-ti-relationships branch from e4d3be1 to 4e13812 Compare April 14, 2025 19:25
This query joins to DagModel but doesn't load the TI related dag_model or any other
related objects used in the following TaskCallbackRequest Arguments resulting in
detached instance error when requesting callback.

This PR fixes it by using selectinload for fast loading of the related
objects used in the TaskCallbackRequest
@ephraimbuddy ephraimbuddy force-pushed the load-ti-relationships branch from 4e13812 to 05c5673 Compare April 14, 2025 21:06
@vatsrahul1001 vatsrahul1001 merged commit 1355b8e into apache:main Apr 15, 2025
49 checks passed
@vatsrahul1001 vatsrahul1001 deleted the load-ti-relationships branch April 15, 2025 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Scheduler including HA (high availability) scheduler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants