Skip to content

Workflow: wf purge --all-older-than --all-filter-status#5075

Draft
JoshVanL wants to merge 2 commits intodapr:v1.17from
JoshVanL:cli-purge-all-filter-status
Draft

Workflow: wf purge --all-older-than --all-filter-status#5075
JoshVanL wants to merge 2 commits intodapr:v1.17from
JoshVanL:cli-purge-all-filter-status

Conversation

@JoshVanL
Copy link
Contributor

@JoshVanL JoshVanL commented Mar 17, 2026

Update docs based on new CLI flag dapr/cli#1609

Clarify that adding or changing a retention policy does not
retroactively purge workflows already in a terminal state. Include CLI
examples for retroactive cleanup using `dapr workflow purge
--all-older-than` and `dapr workflow list --filter-status` combined with
purge.

Signed-off-by: joshvanl <me@joshvanl.dev>
Update docs based on new CLI flag dapr/cli#1609

Signed-off-by: joshvanl <me@joshvanl.dev>
@JoshVanL JoshVanL requested a review from a team as a code owner March 17, 2026 12:59
Copilot AI review requested due to automatic review settings March 17, 2026 12:59
@JoshVanL JoshVanL requested a review from a team as a code owner March 17, 2026 12:59
@JoshVanL JoshVanL changed the title Cli purge all filter status Workflow: wf purge --all-older-than --all-filter-status Mar 17, 2026
@JoshVanL JoshVanL marked this pull request as draft March 17, 2026 13:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Dapr Workflow documentation to describe and demonstrate a new purge filtering capability in the Dapr CLI, and clarifies how to retroactively clean up existing workflow history when changing retention policies.

Changes:

  • Documented a new dapr workflow purge flag --all-filter-status in the CLI reference.
  • Added purge examples showing how to filter by status (for example, purging only FAILED instances).
  • Added an “Important” note explaining retention policy non-retroactivity and pointing users to CLI purge for retroactive cleanup.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
daprdocs/content/en/reference/cli/dapr-workflow.md Adds --all-filter-status flag documentation and an example purge command using it.
daprdocs/content/en/developing-applications/building-blocks/workflow/workflow-history-retention-policy.md Adds an “Important” alert explaining retention policy scope and how to retroactively purge via CLI.
daprdocs/content/en/developing-applications/building-blocks/workflow/howto-manage-workflow.md Adds a purge example demonstrating --all-filter-status usage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

| `--app-id`, `-a` | string | (Required) The app ID owner of the workflow instances |
| `--all` | bool | Purge all terminal workflow instances (use with caution) |
| `--all-older-than` | string | Purge instances older than duration or timestamp (e.g., "24h", "2023-01-02T15:04:05Z") |
| `--all-filter-status` | string | Filter purge to only instances with the given runtime status. Must be used with `--all-older-than`. One of RUNNING, COMPLETED, CONTINUED_AS_NEW, FAILED, CANCELED, TERMINATED, PENDING, SUSPENDED |
dapr workflow purge --app-id <app-id> --all-older-than <duration> --all-filter-status FAILED
dapr workflow purge --app-id <app-id> --all-older-than <duration> --all-filter-status TERMINATED
```

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants