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 @@ -108,7 +108,6 @@ async def update_app(
108108 user : base_models .APIUser ,
109109 app_name : str ,
110110 state : apispec .AppState | None = None ,
111- resource_class_id : int | None = None ,
112111 ) -> App :
113112 """Update an app."""
114113 if not user .is_authenticated or user .id is None :
@@ -125,12 +124,12 @@ async def update_app(
125124 raise errors .MissingResourceError (message = _app_not_found_message (app_name ))
126125
127126 latest : AppRuntimeState = runtime_state
128- if resource_class_id is not None :
129- resource_class = await self .rp_repo .get_resource_class (user , resource_class_id )
130- latest = await self .k8s_client .set_app_deployment_resources (app_name , resource_class )
131127 if state == apispec .AppState .hibernated and not runtime_state .is_hibernated :
132128 latest = await self .k8s_client .hibernate_app_deployment (app_name )
133129 elif state == apispec .AppState .running and runtime_state .is_hibernated :
130+ if launcher .resource_class_id is not None :
131+ resource_class = await self .rp_repo .get_resource_class (user , launcher .resource_class_id )
132+ await self .k8s_client .set_app_deployment_resources (app_name , resource_class )
134133 latest = await self .k8s_client .resume_app_deployment (app_name )
135134
136135 return build_app (launcher , latest )
You can’t perform that action at this time.
0 commit comments