fix: expose admitted run filter over RPC
This commit is contained in:
@@ -426,7 +426,7 @@ class ValidateDeploymentParams(RpcParamsModel):
|
|||||||
|
|
||||||
|
|
||||||
class ListRunsParams(RpcParamsModel):
|
class ListRunsParams(RpcParamsModel):
|
||||||
status: Literal["completed", "failed", "interrupted"] | None = None
|
status: Literal["admitted", "completed", "failed", "interrupted"] | None = None
|
||||||
cursor: str | None = None
|
cursor: str | None = None
|
||||||
limit: int = Field(default=50, ge=1, le=100)
|
limit: int = Field(default=50, ge=1, le=100)
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ from wf_transport_rpc_http.client.schedules import RpcScheduleClientMixin
|
|||||||
from wf_transport_rpc_http.models import (
|
from wf_transport_rpc_http.models import (
|
||||||
CreateScheduleParams,
|
CreateScheduleParams,
|
||||||
ListOccurrencesParams,
|
ListOccurrencesParams,
|
||||||
|
ListRunsParams,
|
||||||
UpdateScheduleParams,
|
UpdateScheduleParams,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -36,6 +37,11 @@ def _cron() -> dict[str, Any]:
|
|||||||
return {"kind": "cron", "expression": "* * * * *", "timezone": "UTC"}
|
return {"kind": "cron", "expression": "* * * * *", "timezone": "UTC"}
|
||||||
|
|
||||||
|
|
||||||
|
def test_rpc_list_runs_accepts_admitted_status() -> None:
|
||||||
|
"""RPC validation exposes the API's admitted-run filter."""
|
||||||
|
assert ListRunsParams(status="admitted").status == "admitted"
|
||||||
|
|
||||||
|
|
||||||
def _constant_plan() -> RawWorkflowPlan:
|
def _constant_plan() -> RawWorkflowPlan:
|
||||||
return RawWorkflowPlan.model_validate(
|
return RawWorkflowPlan.model_validate(
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user