Skip to content

Commit 7827fc5

Browse files
authored
feat(serverless_jobs): add state filter to list job runs (#4440)
1 parent 8029de9 commit 7827fc5

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

cmd/scw/testdata/test-all-usage-jobs-run-list-usage.golden

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ARGS:
99
[order-by] (created_at_asc | created_at_desc)
1010
[job-definition-id]
1111
[project-id]
12+
[state] (unknown_state | queued | scheduled | running | succeeded | failed | canceled | internal_error)
1213
[organization-id]
1314
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)
1415

docs/commands/jobs.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ scw jobs run list [arg=value ...]
217217
| order-by | One of: `created_at_asc`, `created_at_desc` | |
218218
| job-definition-id | | |
219219
| project-id | | |
220+
| state | One of: `unknown_state`, `queued`, `scheduled`, `running`, `succeeded`, `failed`, `canceled`, `internal_error` | |
220221
| organization-id | | |
221222
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw`, `all` | Region to target. If none is passed will use default region from the config |
222223

internal/namespaces/jobs/v1alpha1/jobs_cli.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,13 @@ func jobsRunList() *core.Command {
758758
Deprecated: false,
759759
Positional: false,
760760
},
761+
{
762+
Name: "state",
763+
Required: false,
764+
Deprecated: false,
765+
Positional: false,
766+
EnumValues: []string{"unknown_state", "queued", "scheduled", "running", "succeeded", "failed", "canceled", "internal_error"},
767+
},
761768
{
762769
Name: "organization-id",
763770
Required: false,

0 commit comments

Comments
 (0)