The GitHub Actions job "Tests AMD" on airflow.git/fix-detached-error has 
succeeded.
Run started by GitHub user kaxil (triggered by kaxil).

Head commit for run:
964e710ea74dcb77c1a3f808984d1f2fbdf5049a / Kaxil Naik <[email protected]>
Prevent `DetachedInstanceError` when processing executor event

Similar to https://github.com/apache/airflow/pull/53838 but prevents it for all 
queries needing `consumed_asset_events`.

Instead of adding `.selectinload(DR.consumed_asset_events))` wherever needed, I 
am eagerly loading them now.

Changes:
- Add lazy='selectin' to `DagRun.consumed_asset_events` relationship for 
always-eager loading
- Changed `backref` to `back_populates` in `AssetEvent.created_dagruns` to 
enable explicit control

Why This Fix Works:
- Eliminates lazy loading entirely by pre-loading the relationship at the model 
level
- Prevents dependency on consistent session state in concurrent scheduler 
operations

Closes #54306

Report URL: https://github.com/apache/airflow/actions/runs/16868674605

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to