Skip to content

Commit

Permalink
feat(serverless_jobs): add state filter to list job runs (#4440)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Jan 17, 2025
1 parent 8029de9 commit 7827fc5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/scw/testdata/test-all-usage-jobs-run-list-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ARGS:
[order-by] (created_at_asc | created_at_desc)
[job-definition-id]
[project-id]
[state] (unknown_state | queued | scheduled | running | succeeded | failed | canceled | internal_error)
[organization-id]
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)

Expand Down
1 change: 1 addition & 0 deletions docs/commands/jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ scw jobs run list [arg=value ...]
| order-by | One of: `created_at_asc`, `created_at_desc` | |
| job-definition-id | | |
| project-id | | |
| state | One of: `unknown_state`, `queued`, `scheduled`, `running`, `succeeded`, `failed`, `canceled`, `internal_error` | |
| organization-id | | |
| 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 |

Expand Down
7 changes: 7 additions & 0 deletions internal/namespaces/jobs/v1alpha1/jobs_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,13 @@ func jobsRunList() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "state",
Required: false,
Deprecated: false,
Positional: false,
EnumValues: []string{"unknown_state", "queued", "scheduled", "running", "succeeded", "failed", "canceled", "internal_error"},
},
{
Name: "organization-id",
Required: false,
Expand Down

0 comments on commit 7827fc5

Please sign in to comment.