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/26 09:17:54 UTC

[GitHub] [airflow] josephine093 opened a new issue, #23246: Add api call for changing task instance status

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

   ### Description
   
   In the UI you can change the status of a task instance, but there is no API call available for the same feature.
   
   It would be nice to have an api call for this as well. 
   
   ### Use case/motivation
   
   I found a solution on stack-overflow on [How to add manual tasks in an Apache Airflow Dag]. There is a suggestion to set a task on failed and change it manually to succeed when the task is done.
   
   Our project has many manual tasks. This suggestions seems like a good option, but there is no api call yet to call instead of change all status manually. I would like to use an api call for this instead. 
   
   You can change the status of on a dag run so it also seems natural to have something similar for task instances. 
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a 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] potiuk commented on issue #23246: Add api call for changing task instance status

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

   I think it's best to add draft PR with proposal and discuss it there.


-- 
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 #23246: Add api call for changing task instance status

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

   Agreed, there is also https://github.com/apache/airflow/issues/23227 to clear a given task under a DAG run which seems little similar to this request if my understanding is correct.


-- 
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] ashb commented on issue #23246: Add api call for changing task instance status

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

   From a RESTy point of view I like and end point where the task id is in the URL :)


-- 
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 commented on issue #23246: Add api call for changing task instance status

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

   Runing stuff in `breeze` (after updating the image)  is the best way to test stuff in a reproducible environment that is the same on CI as locally and one that you can make sure hsa all the same dependencies - this is an often reason of the "works for me" syndrome when running tests. I recommend running tests for breeze (not sure though if that's exactly the case of yours).


-- 
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] erdos2n commented on issue #23246: Add api call for changing task instance status

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

   @ashb @tirkarthi is it possible to get assigned this issue? I would love to take it if possible. 


-- 
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 #23246: Add api call for changing task instance status

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

   > There should probably also be a `POST` to update a single TI just for consistency sake too.
   
   I think updating a single TI is possible in the current endpoint. Setting these:
   ```python
       "include_upstream": False, 
        "include_downstream": False, 
        "include_future": False, 
        "include_past": False, 
   ```
   False in the payload will have it update only the particular task instance


-- 
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] uranusjr commented on issue #23246: Add api call for changing task instance status

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

   PATCH sounds like a reasonable choice to me.


-- 
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] cedkoffeto commented on issue #23246: Add api call for changing task instance status

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

   Sure, Thank you for your feedback


-- 
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] ashb commented on issue #23246: Add api call for changing task instance status

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

   There should probably also be a `POST` to update a single TI just for consistency sake too.


-- 
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] cedkoffeto commented on issue #23246: Add api call for changing task instance status

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

   Hi everyone, I am new in the airflow community and want to help and learn.
   Am interested in this issue so @erdos2n  can we assign it to me, please?


-- 
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 #23246: Add api call for changing task instance status

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

   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.

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 #23246: Add api call for changing task instance status

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

   > > There should probably also be a `POST` to update a single TI just for consistency sake too.
   > 
   > I think updating a single TI is possible in the current endpoint. Setting these:
   > 
   > ```python
   >     "include_upstream": False, 
   >      "include_downstream": False, 
   >      "include_future": False, 
   >      "include_past": False, 
   > ```
   > 
   > False in the payload will have it update only the particular task instance
   
   Problem with this is the date range that it clears. Yeah, will be good to be more specific


-- 
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] erdos2n commented on issue #23246: Add api call for changing task instance status

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

   @ephraimbuddy @ashb about to write some test cases. Should this be a `PATCH` request since this updates a task instance state as opposed to `POST` which is typically used to create the task instance?


-- 
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] erdos2n commented on issue #23246: Add api call for changing task instance status

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

   unnassigning myself, as I am unable to get the tests to pass


-- 
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 #23246: Add api call for changing task instance status

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #23246: Add api call for changing task instance status
URL: https://github.com/apache/airflow/issues/23246


-- 
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 #23246: Add api call for changing task instance status

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

   There is `/api/v1/dags/{dag_id}/updateTaskInstancesState`.
   
   Sample payload : https://github.com/apache/airflow/blob/2bb1cd2fec4e2069cb4bbb42d1a880e905d9468e/tests/api_connexion/endpoints/test_task_instance_endpoint.py#L1205-L1214


-- 
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 #23246: Add api call for changing task instance status

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

   @erdos2n I am not working on it. Feel free to take it up.


-- 
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] erdos2n commented on issue #23246: Add api call for changing task instance status

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

   I have written the methods needed, but for some reason my tests are failing when I run them locally. Curious if it's something in the `v1.yaml` file. Can someone possibly help me out with this sometime? 


-- 
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] cedkoffeto commented on issue #23246: Add api call for changing task instance status

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

   Do you think we should add an API call like this?  /taskInstances/{task_instance_id}/update just to be focused on the DagRun itself.
   


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