Skip to content

Added dagrun clear command to airflowctl#68141

Open
justinpakzad wants to merge 2 commits into
apache:mainfrom
justinpakzad:feature/airflowctl-dagrun-clear
Open

Added dagrun clear command to airflowctl#68141
justinpakzad wants to merge 2 commits into
apache:mainfrom
justinpakzad:feature/airflowctl-dagrun-clear

Conversation

@justinpakzad

@justinpakzad justinpakzad commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Added dagrun clear command to airflowctl. Updated the DagRunOperations class with a new clear() method. The dry_run and only_failed parameters default to None and if not provided are assigned True and False respectively, matching the API's defaults. This is needed because CommandFactory sets all boolean default values to None anyways.

Added two additional unit tests for both dry run and non dry run clearing and added the new command to the integration tests. I also tested this locally by clearing actual Dag runs and it's working as expected.

Was generative AI tooling used to co-author this PR?
  • Yes (Claude Opus 4.6)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@justinpakzad justinpakzad force-pushed the feature/airflowctl-dagrun-clear branch from df82872 to 20bf114 Compare June 7, 2026 13:18
@justinpakzad justinpakzad marked this pull request as ready for review June 7, 2026 13:19
@justinpakzad

Copy link
Copy Markdown
Contributor Author

I think there was an issue fetching the Docker image for the CTL integration tests. If someone could re-trigger it that would be great. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant