Replies: 2 comments
-
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. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Converted to a discussion - that looks like a question you have. If you would like to contribute such new parameter - feel free, but note that there will be no changes in Airflow 2 any more and Airflow 3 will changes quite a bit the concept of dag_runs/logical dates so this CLI will change. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions