From c6d5aac29f020f5268f61a87f386bd513f10b0fb Mon Sep 17 00:00:00 2001 From: axel7083 <42176370+axel7083@users.noreply.github.com> Date: Wed, 22 May 2024 11:44:07 +0200 Subject: [PATCH] fix: labels used Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com> --- packages/backend/src/managers/applicationManager.spec.ts | 4 ++++ packages/backend/src/managers/applicationManager.ts | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/managers/applicationManager.spec.ts b/packages/backend/src/managers/applicationManager.spec.ts index 63ba95268..63c8f5dd5 100644 --- a/packages/backend/src/managers/applicationManager.spec.ts +++ b/packages/backend/src/managers/applicationManager.spec.ts @@ -1212,6 +1212,10 @@ describe('pod detection', async () => { 'ai-lab-model-id': 'model-id-1', }, }); + expect(podManager.findPodByLabelsValues).toHaveBeenCalledWith({ + 'ai-lab-recipe-id': 'recipe-id-1', + 'ai-lab-model-id': 'model-id-1', + }); }); test('deleteApplication calls stopPod and removePod', async () => { diff --git a/packages/backend/src/managers/applicationManager.ts b/packages/backend/src/managers/applicationManager.ts index 9aea22146..22cbc2773 100644 --- a/packages/backend/src/managers/applicationManager.ts +++ b/packages/backend/src/managers/applicationManager.ts @@ -746,8 +746,8 @@ export class ApplicationManager extends Publisher implements private async findPod(recipeId: string, modelId: string): Promise { return this.podManager.findPodByLabelsValues({ - LABEL_RECIPE_ID: recipeId, - LABEL_MODEL_ID: modelId, + [LABEL_RECIPE_ID]: recipeId, + [LABEL_MODEL_ID]: modelId, }); }