Commit 380264e
fix: eager-load EndpointRow.current_revision_row in get_deployment_data
The DBSource's ``get_deployment_data`` was still selectinload-ing
``EndpointRow.revisions`` while the projection method
``to_model_deployment_data`` reads ``current_revision_row`` /
``deploying_revision_row`` directly. Those relationships default to
``lazy="select"``, so accessing them on a row fetched under an async
session would trip the SQLAlchemy ``greenlet_spawn`` error on every API
path that calls ``get_deployment_data`` (``create_deployment``,
``update_deployment``, ``get_deployment_by_id``, ``activate_revision``).
Align the eager-load with what ``admin_search_deployments`` /
``search_user_deployments`` / ``search_project_deployments`` already do,
and drop the now-unused ``revisions`` chain.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent e322721 commit 380264e
1 file changed
Lines changed: 2 additions & 3 deletions
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
420 | | - | |
421 | | - | |
422 | | - | |
| 420 | + | |
| 421 | + | |
423 | 422 | | |
424 | 423 | | |
425 | 424 | | |
| |||
0 commit comments