File tree Expand file tree Collapse file tree 4 files changed +7
-6
lines changed
packages/service-library/src/servicelib/rabbitmq/rpc_interfaces/catalog
api-server/src/simcore_service_api_server/services_rpc
src/simcore_service_catalog/api/rpc Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ async def batch_get_my_services(
194194
195195
196196@validate_call (config = {"arbitrary_types_allowed" : True })
197- async def list_my_service_history_paginated ( # pylint: disable=too-many-arguments
197+ async def list_my_service_history_sorted ( # pylint: disable=too-many-arguments
198198 rpc_client : RabbitMQRPCClient ,
199199 * ,
200200 product_name : ProductName ,
@@ -205,13 +205,13 @@ async def list_my_service_history_paginated( # pylint: disable=too-many-argumen
205205 filters : ServiceListFilters | None = None ,
206206) -> PageRpcServiceRelease :
207207 """
208-
208+ Sorts service releases by version (latest first)
209209 Raises:
210210 ValidationError: on invalid arguments
211211 """
212212 result = await rpc_client .request (
213213 CATALOG_RPC_NAMESPACE ,
214- TypeAdapter (RPCMethodName ).validate_python ("list_my_service_history_paginated " ),
214+ TypeAdapter (RPCMethodName ).validate_python ("list_my_service_history_sorted " ),
215215 product_name = product_name ,
216216 user_id = user_id ,
217217 service_key = service_key ,
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ async def list_release_history(
7575 limit : PageLimitInt = DEFAULT_NUMBER_OF_ITEMS_PER_PAGE ,
7676 ) -> tuple [list [ServiceRelease ], PageMetaInfoLimitOffset ]:
7777
78- page = await catalog_rpc .list_my_service_history_paginated (
78+ page = await catalog_rpc .list_my_service_history_sorted (
7979 self ._client ,
8080 product_name = product_name ,
8181 user_id = user_id ,
Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ async def batch_get_my_services(
242242@router .expose (reraise_if_error_type = (ValidationError ,))
243243@log_decorator (_logger , level = logging .DEBUG )
244244@validate_call (config = {"arbitrary_types_allowed" : True })
245- async def list_my_service_history_paginated (
245+ async def list_my_service_history_sorted (
246246 app : FastAPI ,
247247 * ,
248248 product_name : ProductName ,
@@ -252,6 +252,7 @@ async def list_my_service_history_paginated(
252252 offset : PageOffsetInt = 0 ,
253253 filters : ServiceListFilters | None = None ,
254254) -> PageRpcServiceRelease :
255+ """sorts service releases by version (latest first)"""
255256 assert app .state .engine # nosec
256257
257258 total_count , items = await catalog_services .list_user_service_release_history (
Original file line number Diff line number Diff line change @@ -560,7 +560,7 @@ async def test_rpc_list_my_service_history_paginated(
560560 await services_db_tables_injector (fake_releases + unrelated_releases )
561561
562562 # Call the RPC function
563- page = await catalog_rpc .list_my_service_history_paginated (
563+ page = await catalog_rpc .list_my_service_history_sorted (
564564 rpc_client ,
565565 product_name = product_name ,
566566 user_id = user_id ,
You can’t perform that action at this time.
0 commit comments