sunank200 commented on PR #51880:
URL: https://github.com/apache/airflow/pull/51880#issuecomment-2987332183
> @sunank200 have you verified whether this properly filters for "No Status"
tasks on the UI?
>
> I had tried fixing this issue by making the same change that you made:
`return [None if s in ("no_status", "none", None) else TaskInstanceState(s) for
s in states]`. This prevented the Validation Error, but it did not properly
filter for "No Status" task instances. I saw "No Task Instances found" even
though I had a few task instances in this state.

>
> See my [comment on the
issue](https://github.com/apache/airflow/issues/51246#issuecomment-2923836210)
for more context.
@karenbraganz the change currently there `return [None if s in ("no_status",
"none", None) else TaskInstanceState(s) for s in states].` is needed.
But one more change is needed. In both `get_task_instances` and
`get_mapped_task_instances` methods, if the incoming `state` filter includes
`None`, we now *omit* all the date-range filters (run_after, start_date, etc.),
since tasks with no state have no dates and would otherwise be filtered out. We
only apply the non-date filters (state, pool, queue, executor, etc.) in that
case. I have done the change in latest commit.
--
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]