Adds dapr scheduler export/import#1544
Closed
JoshVanL wants to merge 9 commits intodapr:release-1.16from
Closed
Conversation
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 <me@joshvanl.dev>
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 <me@joshvanl.dev>
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 <me@joshvanl.dev>
|
@JoshVanL maybe add some fine grained filters so that users could only export specifics, rather than the whole state. e.g. export reminders relating to a particular Workflow App ID, or Actor Type, that kind of thing? |
Contributor
Author
|
Closed in favor of #1559 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
dapr scheduler exportcommand to export the current schedulerstate to a file, and a
dapr scheduler importcommand to import apreviously exported scheduler state from a file. This is useful for
backing up and restoring the scheduler state.