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 2022/04/27 15:37:10 UTC

[GitHub] [airflow] bbovenzi opened a new issue, #23284: Get DAG tasks in REST API does not include is_mapped

bbovenzi opened a new issue, #23284:
URL: https://github.com/apache/airflow/issues/23284

   ### Apache Airflow version
   
   2.3.0b1 (pre-release)
   
   ### What happened
   
   The rest API endpoint for get [/dags/{dag_id}/tasks](https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html#operation/get_tasks) does not include `is_mapped`.
   
   Example: `consumer` is mapped but I have no way to tell that from the API response:
   <img width="306" alt="Screen Shot 2022-04-27 at 11 35 54 AM" src="https://user-images.githubusercontent.com/4600967/165556420-f8ade6e6-e904-4be0-a759-5281ddc04cba.png">
   <img width="672" alt="Screen Shot 2022-04-27 at 11 35 25 AM" src="https://user-images.githubusercontent.com/4600967/165556310-742ec23d-f5a8-4cae-bea1-d00fd6c6916f.png">
   
   
   ### What you think should happen instead
   
   Someone should be able to know if a task from get /tasks is mapped or not.
   
   ### How to reproduce
   
   call get /tasks on a dag with mapped tasks. see there is no way to determine if it is mapped from the response body.
   
   
   
   ### Operating System
   
   Mac OSX
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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

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


[GitHub] [airflow] tirkarthi commented on issue #23284: Get DAG tasks in REST API does not include is_mapped

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

   Thanks @bbovenzi , created https://github.com/apache/airflow/pull/23319


-- 
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] tirkarthi commented on issue #23284: Get DAG tasks in REST API does not include is_mapped

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

   `is_mapped` field can be added to the `TaskSchema` that can return it in response. I can work on a PR if the issue is accepted.
   
   ```
   diff --git a/airflow/api_connexion/schemas/task_schema.py b/airflow/api_connexion/schemas/task_schema.py
   index 600d28ac0..aa9a47030 100644
   --- a/airflow/api_connexion/schemas/task_schema.py
   +++ b/airflow/api_connexion/schemas/task_schema.py
   @@ -58,6 +58,7 @@ class TaskSchema(Schema):
        sub_dag = fields.Nested(DAGSchema, dump_only=True)
        downstream_task_ids = fields.List(fields.String(), dump_only=True)
        params = fields.Method('get_params', dump_only=True)
   +    is_mapped = fields.Boolean(dump_only=True)
    
        def _get_class_reference(self, obj):
            result = ClassReferenceSchema().dump(obj)
   ```


-- 
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] bbovenzi commented on issue #23284: Get DAG tasks in REST API does not include is_mapped

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

   @tirkarthi I say go for it!


-- 
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] bbovenzi closed issue #23284: Get DAG tasks in REST API does not include is_mapped

Posted by GitBox <gi...@apache.org>.
bbovenzi closed issue #23284: Get DAG tasks in REST API does not include is_mapped
URL: https://github.com/apache/airflow/issues/23284


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