Skip to content

Commit ee99f6f

Browse files
committed
Fix spec copy
1 parent 1d4e3da commit ee99f6f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/dstack/_internal/server/services/fleets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ async def get_plan(
234234
user: UserModel,
235235
spec: FleetSpec,
236236
) -> FleetPlan:
237-
effective_spec = FleetSpec.parse_obj(spec)
237+
effective_spec = FleetSpec.parse_obj(spec.dict())
238238
current_fleet: Optional[Fleet] = None
239239
current_fleet_id: Optional[uuid.UUID] = None
240240
if effective_spec.configuration.name is not None:
@@ -337,7 +337,7 @@ async def create_fleet(
337337

338338
lock_namespace = f"fleet_names_{project.name}"
339339
if get_db().dialect_name == "sqlite":
340-
# Start new transaction to see commited changes after lock
340+
# Start new transaction to see committed changes after lock
341341
await session.commit()
342342
elif get_db().dialect_name == "postgresql":
343343
await session.execute(

src/dstack/_internal/server/services/runs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ async def get_plan(
279279
run_spec: RunSpec,
280280
max_offers: Optional[int],
281281
) -> RunPlan:
282-
effective_run_spec = RunSpec.parse_obj(run_spec)
282+
effective_run_spec = RunSpec.parse_obj(run_spec.dict())
283283
_validate_run_spec_and_set_defaults(effective_run_spec)
284284

285285
profile = effective_run_spec.merged_profile

0 commit comments

Comments
 (0)