Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omit id field in (API)Client.runs.get() method #2174

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/dstack/api/server/_runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ def list(

def get(self, project_name: str, run_name: str) -> Run:
body = GetRunRequest(run_name=run_name)
resp = self._request(f"/api/project/{project_name}/runs/get", body=body.json())
# dstack versions prior to 0.18.34 don't support id field, and we don't use it here either
json_body = body.json(exclude={"id"})
resp = self._request(f"/api/project/{project_name}/runs/get", body=json_body)
return parse_obj_as(Run.__response__, resp.json())

def get_plan(self, project_name: str, run_spec: RunSpec) -> RunPlan:
Expand Down
Loading