Lee-W commented on code in PR #64571:
URL: https://github.com/apache/airflow/pull/64571#discussion_r3317911008
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/ui/assets.py:
##########
@@ -55,13 +68,19 @@ def next_run_assets(
pending_partition_count: int | None = None
queued_expr: ColumnElement[int]
- if is_partitioned := dag_model.timetable_summary == "Partitioned Asset":
+ if is_partitioned := dag_model.timetable_partitioned:
pending_partition_count = session.scalar(
- select(func.count())
+ select(func.count(AssetPartitionDagRun.id.distinct()))
.select_from(AssetPartitionDagRun)
+ .join(
+ DagScheduleAssetReference,
+ DagScheduleAssetReference.dag_id ==
AssetPartitionDagRun.target_dag_id,
+ )
+ .join(AssetModel, AssetModel.id ==
DagScheduleAssetReference.asset_id)
.where(
AssetPartitionDagRun.target_dag_id == dag_id,
AssetPartitionDagRun.created_dag_run_id.is_(None),
+ AssetModel.active.has(),
Review Comment:
Addressed — count no longer filters by `AssetModel.active.has()` and the
response now carries `asset_inactive` so the UI can distinguish "nothing
pending" from "frozen due to deactivated upstream"
--
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]