nesp159de opened a new issue, #45734:
URL: https://github.com/apache/airflow/issues/45734
### Description
I try to call task: airflow task clear ecm_cutoff -t MANAGE_JOBS, but the
command cleared all instances of task, but I want to clear only the latest one.
I did not find filter for run id, only the following parameters:
Options:
-h, --help show this help message and exit
-R, --dag-regex Search dag_id as regex instead of exact string
-d, --downstream Include downstream tasks
-e, --end-date END_DATE
Override end_date YYYY-MM-DD
-X, --exclude-parentdag
Exclude ParentDAGS if the task cleared is a part of
a SubDAG
-x, --exclude-subdags
Exclude subdags
-f, --only-failed Only failed jobs
-r, --only-running Only running jobs
-s, --start-date START_DATE
Override start_date YYYY-MM-DD
-S, --subdir SUBDIR File location or directory from which to look for
the dag. Defaults to '[AIRFLOW_HOME]/dags' where [AIRFLOW_HOME] is the value
you set for 'AIRFLOW_HOME' config you set in 'airflow.cfg'
-t, --task-regex TASK_REGEX
The regex to filter specific task_ids (optional)
-u, --upstream Include upstream tasks
-v, --verbose Make logging output more verbose
-y, --yes Do not prompt to confirm. Use with care!
In the sources I found logical_date_or_run_id, that filter would be exactly
what I need, but for this CLI commnad is not involved.
### Use case/motivation
Our airflow operators needs to re-executed task instances for a particular
day. Currently there are many runs in history and we need to touch only the
current (newest one) run.
### Related issues
_No response_
### Are you willing to submit a 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]