Skip to content

Conversation

@JoshVanL
Copy link
Contributor

@JoshVanL JoshVanL commented Sep 23, 2025

Adds a dapr workflow list command to list all workflows for an app ID
which are currently in the system. The target app ID is required.

The workflows can be filtered by either workflow name, and/or the
workflow status --filter-workflow=foo, --filter-status=FAILED.

Supports output formats (-o) short, wide, json and yaml.
Defaults to short. json and yaml output formats are not
importable formats.

Works by getting the correct SQL driver based on the actor state store
which is fetched. The user will then need to supply the SQL connection
string. Redis and mongodb actor state stores are currently not
supported.

In future, this listing should exist in the runtime and executed by
daprd. This would mean the user would not need to likely port-forward
to their actor state store db, and supply a connection string. This
should be prioritized for 1.17.

$ dapr workflow list -k
INSTANCE ID                           NAME      STATUS      AGE   CUSTOM STATUS
111e9a78-231b-44df-a28f-97040a1f646d  records   COMPLETED   4m9s  -
79234f1b-e208-4191-be45-bb8e2f2cad76  bar       FAILED      4m3s  custom-2
b3bcf74d-59d4-42aa-bcac-141ceeba5654  my-raise  TERMINATED  4m    custom-4
c8503299-8a90-4574-8c5c-317dbb39d12b  xyz       RUNNING     4m    custom-3
$ dapr workflow list -k -o wide
NAMESPACE  APP ID                                INSTANCE ID                           NAME      CREATED               LAST UPDATE           STATUS      CUSTOM STATUS  FAILURE MESSAGE
default    4154cfdf-c1be-476c-a390-590c7c93fbdf  111e9a78-231b-44df-a28f-97040a1f646d  records   2025-09-23T00:23:15Z  2025-09-23T00:23:18Z  COMPLETED
default    4154cfdf-c1be-476c-a390-590c7c93fbdf  79234f1b-e208-4191-be45-bb8e2f2cad76  bar       2025-09-23T00:23:21Z  2025-09-23T00:23:21Z  FAILED      custom-2       failed
default    4154cfdf-c1be-476c-a390-590c7c93fbdf  b3bcf74d-59d4-42aa-bcac-141ceeba5654  my-raise  2025-09-23T00:23:24Z  2025-09-23T00:23:50Z  TERMINATED  custom-4
default    4154cfdf-c1be-476c-a390-590c7c93fbdf  c8503299-8a90-4574-8c5c-317dbb39d12b  xyz       2025-09-23T00:23:24Z  2025-09-23T00:23:24Z  RUNNING     custom-3

Adds `dapr scheduler list` which a new CLI command to list the jobs
which are in scheduler. Lists both app Jobs and actor reminders. Works
for both standalone and Kubernetes modes.

The jobs can be filtered by namespace with `-n ...`, as well as by job
target type `--filter-type={all, job, actorreminder}`. Defaults to all.

Supports output formats (`-o`) `short`, `wide`, `json` and `yaml`.
Defaults to `short`. `json` and `yaml` output formats are _not_
importable formats.

Fixes the table output prints to remove empty space at the start of
rows.

Adds e2e standalone tests for this new command.

```
$ dapr scheduler list
NAMESPACE  APP ID                                NAME   TARGET  BEGIN                 COUNT  LAST TRIGGER
default    275c7268-9011-4796-8b06-1ed53358eebf  test1  job     2025-09-18T01:06:28Z  170    2025-09-18T01:09:18Z
default    275c7268-9011-4796-8b06-1ed53358eebf  test2  job     2025-09-18T02:06:28Z  0
```

Signed-off-by: joshvanl <[email protected]>
Signed-off-by: joshvanl <[email protected]>
Signed-off-by: joshvanl <[email protected]>
Signed-off-by: joshvanl <[email protected]>
Signed-off-by: joshvanl <[email protected]>
Signed-off-by: joshvanl <[email protected]>
Adds `dapr scheduler delete` which is a new CLI command to delete jobs
and actor reminders which are stored in scheduler. You can delete
multiple jobs at a time, or all jobs registered in a namespace.
The target namespace is required.

The given name encode the job target type in the string:

```
"job/<app-id>/<job-name>" for jobs
"actorreinder/<actor-type>||<actor-id>||<reminder-name>" for actor reminders
```

```
dapr delete -n foo job/foo/bar
dapr delete -n foo actorreminder/MyActor||1234||reminder1
dapr delete -n foo --delete-all-yes-i-know-what-i-am-doing
```

Signed-off-by: joshvanl <[email protected]>
Adds a `dapr scheduler export` command to export the current scheduler
state to a file, and a `dapr scheduler import` command to import a
previously exported scheduler state from a file. This is useful for
backing up and restoring the scheduler state.

```
dapr scheduler export --output-file scheduler_backup.bin
dapr scheduler import --input-file scheduler_backup.bin
```

Signed-off-by: joshvanl <[email protected]>
Adds a `dapr workflow list` command to list all workflows for an app ID
which are currently in the system. The target app ID is required.

The workflows can be filtered by either workflow name, and/or the
workflow status `--filter-workflow=foo`, `--filter-status=FAILED`.

Supports output formats (`-o`) `short`, `wide`, `json` and `yaml`.
Defaults to `short`. `json` and `yaml` output formats are _not_
importable formats.

Works by getting the correct SQL driver based on the actor state store
which is fetched. The user will then need to supply the SQL connection
string. Redis and mongodb actor state stores are currently not
supported.

In future, this listing should exist in the runtime and executed by
daprd. This would mean the user would _not_ need to likely port-forward
to their actor state store db, and supply a connection string. This
should be prioritized for 1.17.

```
$ dapr workflow list  -c file:/tmp/Test_Integrationdaprdworkflowrecordsactivity12498617344/001/test-data.db --sql-table-name inttest --app-id 152683e5-ba30-484d-b227-1895f5f1f92d
dapr client initializing for: 127.0.0.1:1034
NAMESPACE  APP ID                                WORKFLOW  INSTANCE ID                           CREATED                         STATUS
default    152683e5-ba30-484d-b227-1895f5f1f92d  xyz       c4f764c0-4584-4b1f-ad22-661f12058e14  2025-09-21T01:38:32.726062016Z  RUNNING
default    152683e5-ba30-484d-b227-1895f5f1f92d  records   cf0d5210-d9f2-4f45-ac33-67c8f3f4cf43  2025-09-21T01:38:29.676488461Z  COMPLETED
default    152683e5-ba30-484d-b227-1895f5f1f92d  bar       e3db559a-5934-44d8-a2ae-4b0501d06e59  2025-09-21T01:38:32.716533938Z  FAILED
```

```
$ dapr workflow list  -c file:/tmp/Test_Integrationdaprdworkflowrecordsactivity12498617344/001/test-data.db --sql-table-name inttest --app-id 152683e5-ba30-484d-b227-1895f5f1f92d -o wide
dapr client initializing for: 127.0.0.1:1034
NAMESPACE  APP ID                                WORKFLOW  INSTANCE ID                           CREATED                         LAST UPDATE                     STATUS     CUSTOM STATUS  FAILURE MESSAGE  FAILURE TYPE
default    152683e5-ba30-484d-b227-1895f5f1f92d  xyz       c4f764c0-4584-4b1f-ad22-661f12058e14  2025-09-21T01:38:32.726062016Z  2025-09-21T01:38:32.73093843Z   RUNNING    custom-3
default    152683e5-ba30-484d-b227-1895f5f1f92d  records   cf0d5210-d9f2-4f45-ac33-67c8f3f4cf43  2025-09-21T01:38:29.676488461Z  2025-09-21T01:38:32.711796608Z  COMPLETED  custom-1
default    152683e5-ba30-484d-b227-1895f5f1f92d  bar       e3db559a-5934-44d8-a2ae-4b0501d06e59  2025-09-21T01:38:32.716533938Z  2025-09-21T01:38:32.724251959Z  FAILED     custom-2       failed           *errors.errorString
```

Signed-off-by: joshvanl <[email protected]>
@JoshVanL
Copy link
Contributor Author

JoshVanL commented Oct 9, 2025

Closed in favor of #1560

@JoshVanL JoshVanL closed this Oct 9, 2025
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.

1 participant