You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "JoranDox (via GitHub)" <gi...@apache.org> on 2023/05/19 14:28:33 UTC
[GitHub] [airflow] JoranDox opened a new issue, #31420: allow other states than success/failed in tasks by REST API
JoranDox opened a new issue, #31420:
URL: https://github.com/apache/airflow/issues/31420
### Apache Airflow version
main (development)
### What happened
see also: https://github.com/apache/airflow/issues/25463
From the conversation there, it sounds like it's intended to be possible to set a task to "skipped" via REST API, but it's not.
Instead the next best thing we have is marking as success & adding a note.
### What you think should happen instead
I see no reason for users to not just be able to set tasks to "skipped". I could imagine reasons to avoid "queued", and some other more "internal" states, but skipped makes perfect sense to me for
- tasks that failed and got fixed externally
- tasks that failed but are now irrelevant because of a newer run
in case you still want to be able to see those in the future (actually, a custom state would be even better)
### How to reproduce
```python
# task is just a dictionary with the right values for below
r = requests.patch(
f"{base_url}/api/v1/dags/{task['dag_id']}/dagRuns/{task['dag_run_id']}/taskInstances/{task['task_id']}",
json={
"new_state": "skipped",
},
headers={"Authorization": token},
)
```
-> r.json() gives
`{'detail': "'skipped' is not one of ['success', 'failed'] - 'new_state'", 'status': 400, 'title': 'Bad Request', 'type': 'http://apache-airflow-docs.s3-website.eu-central-1.amazonaws.com/docs/apache-airflow/latest/stable-rest-api-ref.html#section/Errors/BadRequest'}`
### Operating System
/
### Versions of Apache Airflow Providers
/
### Deployment
Astronomer
### Deployment details
/
### Anything else
_No response_
### Are you willing to submit PR?
- [X] 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 closed issue #31420: allow other states than success/failed in tasks by REST API
Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk closed issue #31420: allow other states than success/failed in tasks by REST API
URL: https://github.com/apache/airflow/issues/31420
--
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 #31420: allow other states than success/failed in tasks by REST API
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #31420:
URL: https://github.com/apache/airflow/issues/31420#issuecomment-1554674553
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
--
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] hussein-awala commented on issue #31420: allow other states than success/failed in tasks by REST API
Posted by "hussein-awala (via GitHub)" <gi...@apache.org>.
hussein-awala commented on issue #31420:
URL: https://github.com/apache/airflow/issues/31420#issuecomment-1554798089
I think this is a new feature rather than a bug.
--
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] JoranDox commented on issue #31420: allow other states than success/failed in tasks by REST API
Posted by "JoranDox (via GitHub)" <gi...@apache.org>.
JoranDox commented on issue #31420:
URL: https://github.com/apache/airflow/issues/31420#issuecomment-1556626979
> I think this is a new feature rather than a bug.
Fair enough, I wasn't sure which one it was, but from the discussion in https://github.com/apache/airflow/issues/25463:
meryll said:
> [...] Is there any other way to set airflow tasks to SKIPPED?
upon which uranusjr answered:
> The official way is to use the REST API. [...]
So from that I (wrongly?) concluded it must be a bug. Either way, I want/need this so I'll be happy to help this come to fruition :)
--
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