You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/11/08 00:41:46 UTC
[GitHub] [airflow] mik-laj edited a comment on issue #13531: Airflow v1 REST List task instances api can not get `no_status` task instance
mik-laj edited a comment on issue #13531:
URL: https://github.com/apache/airflow/issues/13531#issuecomment-962717149
@ephraimbuddy
The field `state` is nullable
https://github.com/apache/airflow/blob/26ad55beb00f5a0915ba4bec541e3d67044834e9/airflow/models/taskinstance.py#L333
In API, we use `IN` statement to filter elemenets.
https://github.com/apache/airflow/blob/26ad55beb00f5a0915ba4bec541e3d67044834e9/airflow/api_connexion/endpoints/task_instance_endpoint.py#L144
https://github.com/apache/airflow/blob/26ad55beb00f5a0915ba4bec541e3d67044834e9/airflow/api_connexion/endpoints/task_instance_endpoint.py#L76-L79
Unfortunately, the IN expression never finds an element that is NULL. We need to handle this case and detect "NULL" / "NO_STATUS"/"NONE"(preferred) in the expression and build a more complex query that will contain the IS NULL expression.
When I looked at this field, I also noticed another problem with this field. We miss enum values validation.
https://github.com/apache/airflow/pull/19105/files#r744343850
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org