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. 
![image](https://private-user-images.githubusercontent.com/158095947/456734918-3a13f6e2-3541-42f3-a8b4-9c11ca54bb93.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTAzMTUzMDIsIm5iZiI6MTc1MDMxNTAwMiwicGF0aCI6Ii8xNTgwOTU5NDcvNDU2NzM0OTE4LTNhMTNmNmUyLTM1NDEtNDJmMy1hOGI0LTljMTFjYTU0YmI5My5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwNjE5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDYxOVQwNjM2NDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iNDk5NTJmOTUxYTY3
 
Zjg0MzA5YjU1N2QxNGQwMGJmM2EwZDQxOTQ1ZjkwMDMxNDFmMGJjYzFmZjcxYjZkYzQwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.dRPamWcpAvATUhegfY7gVKdFV9_mxfTpASwnJZTHiXw)
   > 
   > 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]

Reply via email to