feat: update delete runs return type [LET-5777] (#5636)

feat: update delete runs return type
This commit is contained in:
cthomas
2025-10-22 16:00:03 -07:00
committed by Caren Thomas
parent 14faa27869
commit 026deb294c
3 changed files with 3 additions and 8 deletions

View File

@@ -11613,9 +11613,7 @@
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Run"
}
"schema": {}
}
}
},

View File

@@ -265,7 +265,7 @@ async def list_run_steps(
)
@router.delete("/{run_id}", response_model=Run, operation_id="delete_run")
@router.delete("/{run_id}", response_model=None, operation_id="delete_run")
async def delete_run(
run_id: str,
headers: HeaderParams = Depends(get_headers),

View File

@@ -179,18 +179,15 @@ class RunManager:
@enforce_types
@raise_on_invalid_id(param_name="run_id", expected_prefix=PrimitiveType.RUN)
async def delete_run(self, run_id: str, actor: PydanticUser) -> PydanticRun:
async def delete_run(self, run_id: str, actor: PydanticUser) -> None:
"""Delete a run by its ID."""
async with db_registry.async_session() as session:
run = await RunModel.read_async(db_session=session, identifier=run_id, actor=actor, access_type=AccessType.ORGANIZATION)
if not run:
raise NoResultFound(f"Run with id {run_id} not found")
pydantic_run = run.to_pydantic()
await run.hard_delete_async(db_session=session, actor=actor)
return pydantic_run
@enforce_types
@raise_on_invalid_id(param_name="run_id", expected_prefix=PrimitiveType.RUN)
async def update_run_by_id_async(