File tree Expand file tree Collapse file tree
components/renku_data_services/renku_apps Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -186,8 +186,6 @@ components:
186186 properties :
187187 state :
188188 $ref : " #/components/schemas/AppState"
189- resource_class_id :
190- type : integer
191189
192190 ErrorResponse :
193191 type : object
Original file line number Diff line number Diff line change 11# generated by datamodel-codegen:
22# filename: api.spec.yaml
3- # timestamp: 2026-06-08T12:56:33 +00:00
3+ # timestamp: 2026-06-29T08:41:01 +00:00
44
55from __future__ import annotations
66
@@ -68,7 +68,6 @@ class AppPostRequest(BaseAPISpec):
6868
6969class AppPatchRequest (BaseAPISpec ):
7070 state : Optional [AppState ] = None
71- resource_class_id : Optional [int ] = None
7271
7372
7473class Error (BaseAPISpec ):
Original file line number Diff line number Diff line change @@ -83,7 +83,6 @@ async def _patch_one(
8383 user = user ,
8484 app_name = app_name ,
8585 state = body .state ,
86- resource_class_id = body .resource_class_id ,
8786 )
8887 return validated_json (apispec .AppResponse , self ._dump_app (app ))
8988
Original file line number Diff line number Diff line change @@ -98,7 +98,6 @@ async def update_app(
9898 user : base_models .APIUser ,
9999 app_name : str ,
100100 state : apispec .AppState | None = None ,
101- resource_class_id : int | None = None ,
102101 ) -> App :
103102 """Update an app."""
104103 if not user .is_authenticated or user .id is None :
@@ -115,12 +114,12 @@ async def update_app(
115114 raise errors .MissingResourceError (message = _app_not_found_message (app_name ))
116115
117116 latest : AppRuntimeState = runtime_state
118- if resource_class_id is not None :
119- resource_class = await self .rp_repo .get_resource_class (user , resource_class_id )
120- latest = await self .k8s_client .set_app_deployment_resources (app_name , resource_class )
121117 if state == apispec .AppState .hibernated and not runtime_state .is_hibernated :
122118 latest = await self .k8s_client .hibernate_app_deployment (app_name )
123119 elif state == apispec .AppState .running and runtime_state .is_hibernated :
120+ if launcher .resource_class_id is not None :
121+ resource_class = await self .rp_repo .get_resource_class (user , launcher .resource_class_id )
122+ await self .k8s_client .set_app_deployment_resources (app_name , resource_class )
124123 latest = await self .k8s_client .resume_app_deployment (app_name )
125124
126125 return build_app (launcher , latest )
You can’t perform that action at this time.
0 commit comments