Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a DAG Run clear endpoint to REST API #23419

Closed
1 of 2 tasks
bbovenzi opened this issue May 2, 2022 · 2 comments · Fixed by #23451
Closed
1 of 2 tasks

Add a DAG Run clear endpoint to REST API #23419

bbovenzi opened this issue May 2, 2022 · 2 comments · Fixed by #23451
Assignees
Labels
area:API Airflow's REST/HTTP API kind:feature Feature Requests

Comments

@bbovenzi
Copy link
Contributor

bbovenzi commented May 2, 2022

Description

Add a POST endpoint to clear a dag run like we currently do here.

Url format: api/v1/dags/{dag_id}/dagRuns/{dag_run_id}/clear

Use case/motivation

No response

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@bbovenzi bbovenzi added kind:feature Feature Requests area:API Airflow's REST/HTTP API labels May 2, 2022
@tirkarthi
Copy link
Contributor

@bbovenzi I would like to pick this up in case you are not working on this. I have a rough working version of this and can also work on queue, run endpoints. I would like to confirm below things.

  1. The linked API has confirmed parameter which will return a str value of task_instances on false. Do we need to support this parameter in query parameter? If so do we need to return str value of task_instances or do we need to return like the endpoint where task_instances for a dag_run or returned.
  2. Since we have dag_id and dag_run_id in the URL do we need this as a post endpoint since confirmed is also a query parameter and we are not posting additional data whereas the linked API uses post since /dagrun_clear has no details of dag_id and dag_run_id. It makes sense for post if the API will be expanded in future to support more customisation.

@bbovenzi
Copy link
Contributor Author

bbovenzi commented May 3, 2022

  1. We should make sure we're consistent with the existing API endpoints:https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html#operation/post_clear_task_instances. So instead of confirmed, we send dry_run. The return should be json instead of a string.
  2. Let's do POST to support future changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:API Airflow's REST/HTTP API kind:feature Feature Requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants