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/01/07 07:20:02 UTC

[GitHub] [airflow] li1234yun opened a new issue #13531: Airflow v1 REST List task instances api can not get `no_status` task instance

li1234yun opened a new issue #13531:
URL: https://github.com/apache/airflow/issues/13531


   <!--
   
   Welcome to Apache Airflow!  For a smooth issue process, try to answer the following questions.
   Don't worry if they're not all applicable; just try to include what you can :-)
   
   If you need to include code snippets or logs, please put them in fenced code
   blocks.  If they're super-long, please use the details tag like
   <details><summary>super-long log</summary> lots of stuff </details>
   
   Please delete these comment blocks before submitting the issue.
   
   -->
   
   <!--
   
   IMPORTANT!!!
   
   PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
   NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!
   
   PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!
   
   Please complete the next sections or the issue will be closed.
   These questions are the first thing we need to know to understand the context.
   
   -->
   
   **Apache Airflow version**:
   2.0
   
   **Environment**:
   
   - **OS** ubuntu 18.04
   - **Kernel** 5.4.0-47-generic
   
   **What happened**:
   When I use list task instances REST api, I can not get the instances that status is `no_status`. 
   
   ```
   ### Get Task Instances
   POST  {{baseUrl}}/dags/~/dagRuns/~/taskInstances/list
   Authorization: Basic admin:xxx
   Content-Type: application/json
   
   {
     "dag_ids": ["stop_dags"]
   }
   
   or 
   
   {
       "dag_ids": ["stop_dags"],
       "state": ["null"]
   }
   ```
   
   **What you expected to happen**:
   include all state task instances when I don't have specific states.
   
   <!-- What do you think went wrong? -->
   
   **How to reproduce it**:
   use REST test tools like postman to visit the api.
   
   **Anything else we need to know**:
   I can not find the REST api that I get all the dag runs instances with specific state, maybe should extend the REST api.
   
   Thanks!
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj commented on issue #13531: Airflow v1 REST List task instances api can not get `no_status` task instance

Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #13531:
URL: https://github.com/apache/airflow/issues/13531#issuecomment-962717149


   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



[GitHub] [airflow] potiuk closed issue #13531: Airflow v1 REST List task instances api can not get `no_status` task instance

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #13531:
URL: https://github.com/apache/airflow/issues/13531


   


-- 
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



[GitHub] [airflow] github-actions[bot] commented on issue #13531: Airflow v1 REST List task instances api can not get `no_status` task instance

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #13531:
URL: https://github.com/apache/airflow/issues/13531#issuecomment-962708080


   This issue has been automatically marked as stale because it has been open for 30 days with no response from the author. It will be closed in next 7 days if no further activity occurs from the issue author.


-- 
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



[GitHub] [airflow] ephraimbuddy commented on issue #13531: Airflow v1 REST List task instances api can not get `no_status` task instance

Posted by GitBox <gi...@apache.org>.
ephraimbuddy commented on issue #13531:
URL: https://github.com/apache/airflow/issues/13531#issuecomment-757345428


   I have not been able to reproduce this. @mik-laj can you take a look?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] mik-laj edited a comment on issue #13531: Airflow v1 REST List task instances api can not get `no_status` task instance

Posted by GitBox <gi...@apache.org>.
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



[GitHub] [airflow] mik-laj edited a comment on issue #13531: Airflow v1 REST List task instances api can not get `no_status` task instance

Posted by GitBox <gi...@apache.org>.
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



[GitHub] [airflow] boring-cyborg[bot] commented on issue #13531: Airflow v1 REST List task instances api can not get `no_status` task instance

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #13531:
URL: https://github.com/apache/airflow/issues/13531#issuecomment-755935675


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ephraimbuddy commented on issue #13531: Airflow v1 REST List task instances api can not get `no_status` task instance

Posted by GitBox <gi...@apache.org>.
ephraimbuddy commented on issue #13531:
URL: https://github.com/apache/airflow/issues/13531#issuecomment-757345428


   I have not been able to reproduce this. @mik-laj can you take a look?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk closed issue #13531: Airflow v1 REST List task instances api can not get `no_status` task instance

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #13531:
URL: https://github.com/apache/airflow/issues/13531


   


-- 
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