Skip to content

Commit 29a746c

Browse files
committed
Comment out code causing failure due to bug RHOAIENG-56694
1 parent cb26468 commit 29a746c

4 files changed

Lines changed: 134 additions & 66 deletions

File tree

packages/cypress/cypress/pages/modelServing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ class ModelServingRow extends TableRow {
674674
}
675675

676676
findServingRuntime() {
677-
return this.find().find(`[data-label="Serving runtime"]`);
677+
return this.find().find(`[data-label="Deployment resource"]`);
678678
}
679679

680680
findServiceRuntime() {

packages/cypress/cypress/tests/e2e/dataScienceProjects/models/testDeployLLMDServing.cy.ts

Lines changed: 43 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ import {
2525
} from '../../../../utils/oc_commands/hardwareProfiles';
2626
import { checkLLMInferenceServiceState } from '../../../../utils/oc_commands/modelServing';
2727
import { stubClipboard, getClipboardContent } from '../../../../utils/clipboardUtils';
28+
import { MODEL_STATUS_TIMEOUT } from '../../../../support/timeouts';
29+
30+
const STOP_MODAL_PREFERENCE_KEY = 'odh.dashboard.modelServing.stop.modal.preference';
2831

2932
let testData: DataScienceProjectData;
3033
let projectName: string;
@@ -36,7 +39,8 @@ let modelURI: string;
3639
let servingRuntime: string;
3740
let existingImage: string;
3841
let replaceImage: string;
39-
let yamlEditorModelName: string;
42+
// TODO: Uncomment once RHOAIENG-56694 is resolved.
43+
// let yamlEditorModelName: string;
4044
let yamlEditorModelPath: string;
4145

4246
describe('A user can deploy an LLMD model', () => {
@@ -53,7 +57,8 @@ describe('A user can deploy an LLMD model', () => {
5357
hardwareProfileYamlPath = `resources/yaml/llmd-hardware-profile.yaml`;
5458
existingImage = testData.existingImage;
5559
replaceImage = testData.replaceImage;
56-
yamlEditorModelName = testData.yamlEditorModelName;
60+
// TODO: Uncomment once RHOAIENG-56694 is resolved.
61+
// yamlEditorModelName = testData.yamlEditorModelName;
5762
yamlEditorModelPath = 'cypress/fixtures/resources/yaml/yaml_editor_model_serving.yaml';
5863

5964
cy.log(`Loaded project name: ${projectName}`);
@@ -165,16 +170,36 @@ describe('A user can deploy an LLMD model', () => {
165170
cy.step('Verify the model is available in UI');
166171
modelServingSection.findModelServerDeployedName(modelName);
167172

168-
cy.step('Verify that the Model is ready');
169-
// Image was patched in YAML editor before submit, so no post-deployment patching needed
170-
cy.get<string>('@resourceName').then((resourceName) => {
171-
checkLLMInferenceServiceState(resourceName, projectName, { checkReady: true });
172-
});
173+
// TODO: Uncomment once RHOAIENG-56694 is resolved.
174+
// cy.step('Verify that the Model is ready');
175+
// // Image was patched in YAML editor before submit, so no post-deployment patching needed
176+
// cy.get<string>('@resourceName').then((resourceName) => {
177+
// checkLLMInferenceServiceState(resourceName, projectName, { checkReady: true });
178+
// });
173179

174180
cy.step('Verify the model Row');
175181
const llmdRow = modelServingGlobal.getDeploymentRow(modelName);
176-
llmdRow.findStatusLabel(ModelStateLabel.STARTED).should('exist');
182+
// TODO: Uncomment once RHOAIENG-56694 is resolved.
183+
// llmdRow.findStatusLabel(ModelStateLabel.STARTED).should('exist');
177184
llmdRow.findServingRuntime().should('have.text', servingRuntime);
185+
186+
// TODO: Remove stop step once RHOAIENG-56694 is resolved.
187+
cy.step('Stop the model before deleting');
188+
const kServeRow = modelServingSection.getKServeRow(modelName);
189+
cy.window().then((win) => win.localStorage.setItem(STOP_MODAL_PREFERENCE_KEY, 'false'));
190+
kServeRow.findStateActionToggle().click();
191+
kServeRow.findConfirmStopModal().should('exist');
192+
kServeRow.findConfirmStopModalButton().click();
193+
cy.get<string>('@resourceName').then((resourceName) => {
194+
checkLLMInferenceServiceState(resourceName, projectName, {
195+
checkReady: false,
196+
checkStopped: true,
197+
requireLoadedState: false,
198+
});
199+
});
200+
kServeRow.findStatusLabel(ModelStateLabel.STOPPED, MODEL_STATUS_TIMEOUT).should('exist');
201+
202+
cy.step('Delete the deployed model');
178203
llmdRow.findKebab().click();
179204
inferenceServiceActions.findDeleteInferenceServiceAction().click();
180205
deleteModelServingModal.findInput().clear().type(modelName);
@@ -217,16 +242,17 @@ describe('A user can deploy an LLMD model', () => {
217242
});
218243
modelServingWizard.findYAMLCodeEditor().waitForReady();
219244
modelServingWizard.findSubmitButton().should('be.enabled').click();
220-
const llmdRow = modelServingGlobal.getDeploymentRow(yamlEditorModelName);
221-
checkLLMInferenceServiceState(yamlEditorModelName, projectName, { checkReady: true });
245+
// TODO: Uncomment once RHOAIENG-56694 is resolved.
246+
// const llmdRow2 = modelServingGlobal.getDeploymentRow(yamlEditorModelName);
247+
// checkLLMInferenceServiceState(yamlEditorModelName, projectName, { checkReady: true });
222248

223-
cy.step('Verify the model Row');
224-
llmdRow.findStatusLabel(ModelStateLabel.STARTED).should('exist');
225-
llmdRow.findKebab().click();
226-
inferenceServiceActions.findEditInferenceServiceAction().click();
227-
modelServingWizard.findYAMLEditFallbackAlert().should('exist');
228-
modelServingWizard.findYAMLCodeEditor().findInput().should('not.be.empty');
229-
modelServingWizard.findSubmitButton().should('be.enabled').click();
249+
// cy.step('Verify the model Row and edit');
250+
// llmdRow2.findStatusLabel(ModelStateLabel.STARTED).should('exist');
251+
// llmdRow2.findKebab().click();
252+
// inferenceServiceActions.findEditInferenceServiceAction().click();
253+
// modelServingWizard.findYAMLEditFallbackAlert().should('exist');
254+
// modelServingWizard.findYAMLCodeEditor().findInput().should('not.be.empty');
255+
// modelServingWizard.findSubmitButton().should('be.enabled').click();
230256
},
231257
);
232258
});

packages/cypress/cypress/tests/e2e/dataScienceProjects/models/testSingleModelAdminCreation.cy.ts

Lines changed: 61 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import {
22
ModelLocationSelectOption,
33
ModelTypeLabel,
44
ModelStateLabel,
5-
ModelStateToggleLabel,
5+
// TODO: Uncomment once Facebook model startup bug is resolved.
6+
// ModelStateToggleLabel,
67
} from '@odh-dashboard/model-serving/types/form-data';
78
import type { DataScienceProjectData } from '../../../../types';
89
import { deleteOpenShiftProject } from '../../../../utils/oc_commands/project';
@@ -19,14 +20,16 @@ import {
1920
import {
2021
checkInferenceServiceState,
2122
provisionProjectForModelServing,
22-
modelExternalTester,
23+
// TODO: Uncomment once RHOAIENG-56694 is resolved.
24+
// modelExternalTester,
2325
} from '../../../../utils/oc_commands/modelServing';
2426
import {
2527
createCleanHardwareProfile,
2628
cleanupHardwareProfiles,
2729
} from '../../../../utils/oc_commands/hardwareProfiles';
2830
import { retryableBefore } from '../../../../utils/retryableHooks';
29-
import { attemptToClickTooltip } from '../../../../utils/models';
31+
// TODO: Uncomment once RHOAIENG-56694 is resolved.
32+
// import { attemptToClickTooltip } from '../../../../utils/models';
3033
import { generateTestUUID } from '../../../../utils/uuidGenerator';
3134
import { MODEL_STATUS_TIMEOUT } from '../../../../support/timeouts';
3235

@@ -156,26 +159,30 @@ describe('Verify Admin Single Model Creation and Validation using the UI', () =>
156159
modelServingWizard.findSubmitButton().click();
157160
modelServingSection.findModelServerDeployedName(modelName);
158161

159-
//Verify the model created
160-
cy.step('Verify that the Model is created Successfully on the backend and frontend');
161-
// Verify model deployment is ready
162-
cy.get<string>('@resourceName').then((resourceName) => {
163-
checkInferenceServiceState(resourceName, projectName, { checkReady: true });
164-
});
165-
// Note reload is required as status tooltip was not found due to a stale element
166-
cy.reload();
167-
modelServingSection.findModelMetricsLink(modelName);
168-
attemptToClickTooltip();
169-
170-
//Verify the Model is accessible externally
171-
cy.step('Verify the model is accessible externally');
172-
modelExternalTester(modelName, projectName).then(({ url, response }) => {
173-
expect(response.status).to.equal(200);
174-
175-
//verify the External URL Matches the Backend
176-
modelServingSection.findInternalExternalServiceButton().click();
177-
modelServingSection.findExternalServicePopoverTable().should('contain', url);
178-
});
162+
// TODO: Uncomment once RHOAIENG-56694 is resolved.
163+
// The model fails to become ready, so readiness checks, external access tests,
164+
// and stop/start cycle are temporarily skipped.
165+
166+
// //Verify the model created
167+
// cy.step('Verify that the Model is created Successfully on the backend and frontend');
168+
// // Verify model deployment is ready
169+
// cy.get<string>('@resourceName').then((resourceName) => {
170+
// checkInferenceServiceState(resourceName, projectName, { checkReady: true });
171+
// });
172+
// // Note reload is required as status tooltip was not found due to a stale element
173+
// cy.reload();
174+
// modelServingSection.findModelMetricsLink(modelName);
175+
// attemptToClickTooltip();
176+
177+
// //Verify the Model is accessible externally
178+
// cy.step('Verify the model is accessible externally');
179+
// modelExternalTester(modelName, projectName).then(({ url, response }) => {
180+
// expect(response.status).to.equal(200);
181+
//
182+
// //verify the External URL Matches the Backend
183+
// modelServingSection.findInternalExternalServiceButton().click();
184+
// modelServingSection.findExternalServicePopoverTable().should('contain', url);
185+
// });
179186

180187
// Test stop/start functionality
181188
const kServeRow = modelServingSection.getKServeRow(modelName);
@@ -185,7 +192,9 @@ describe('Verify Admin Single Model Creation and Validation using the UI', () =>
185192
//Ensure the modal is shown
186193
cy.window().then((win) => win.localStorage.setItem(STOP_MODAL_PREFERENCE_KEY, 'false'));
187194

188-
kServeRow.findStateActionToggle().should('have.text', ModelStateToggleLabel.STOP).click();
195+
// TODO: Uncomment toggle text assertion once RHOAIENG-56694is resolved.
196+
// kServeRow.findStateActionToggle().should('have.text', ModelStateToggleLabel.STOP).click();
197+
kServeRow.findStateActionToggle().click();
189198
kServeRow.findConfirmStopModal().should('exist');
190199
kServeRow.findConfirmStopModalCheckbox().should('exist');
191200
kServeRow.findConfirmStopModalCheckbox().should('not.be.checked');
@@ -210,24 +219,38 @@ describe('Verify Admin Single Model Creation and Validation using the UI', () =>
210219

211220
//Restart the model
212221
cy.step('Restart the model');
213-
kServeRow.findStateActionToggle().should('have.text', ModelStateToggleLabel.START).click();
222+
// TODO: Uncomment toggle text assertion once RHOAIENG-56694 is resolved.
223+
// kServeRow.findStateActionToggle().should('have.text', ModelStateToggleLabel.START).click();
224+
kServeRow.findStateActionToggle().click();
214225
kServeRow.findStatusLabel(ModelStateLabel.STARTING, MODEL_STATUS_TIMEOUT).should('exist');
215226

216-
//Verify the model is running again
217-
cy.step('Verify the model is running again');
218-
cy.get<string>('@resourceName').then((resourceName) => {
219-
checkInferenceServiceState(resourceName, projectName, { checkReady: true });
220-
});
221-
kServeRow
222-
.findStatusLabel()
223-
.invoke('text')
224-
.should('match', new RegExp(`${ModelStateLabel.STARTING}|${ModelStateLabel.STARTED}`));
227+
// TODO: Uncomment once RHOAIENG-56694 is resolved (model never reaches ready/started).
228+
// //Verify the model is running again
229+
// cy.step('Verify the model is running again');
230+
// cy.get<string>('@resourceName').then((resourceName) => {
231+
// checkInferenceServiceState(resourceName, projectName, { checkReady: true });
232+
// });
233+
// kServeRow
234+
// .findStatusLabel()
235+
// .invoke('text')
236+
// .should('match', new RegExp(`${ModelStateLabel.STARTING}|${ModelStateLabel.STARTED}`));
237+
238+
// //Verify external access still works after restart
239+
// cy.step('Verify the model is still accessible externally after restart');
240+
// modelExternalTester(modelName, projectName).then(({ response }) => {
241+
// expect(response.status).to.equal(200);
242+
// });
225243

226-
//Verify external access still works after restart
227-
cy.step('Verify the model is still accessible externally after restart');
228-
modelExternalTester(modelName, projectName).then(({ response }) => {
229-
expect(response.status).to.equal(200);
244+
cy.step('Stop the model before editing');
245+
kServeRow.findStateActionToggle().click();
246+
cy.get<string>('@resourceName').then((resourceName) => {
247+
checkInferenceServiceState(resourceName, projectName, {
248+
checkReady: false,
249+
checkStopped: true,
250+
requireLoadedState: false,
251+
});
230252
});
253+
kServeRow.findStatusLabel(ModelStateLabel.STOPPED, MODEL_STATUS_TIMEOUT).should('exist');
231254

232255
// Verify legacy fields are locked in the edit form
233256
cy.step('Edit the deployment and verify legacy fields are locked');

packages/cypress/cypress/tests/e2e/dataScienceProjects/models/testVLLMOnMaaS.cy.ts

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ import {
2525
import {
2626
createCleanLLMInferenceServiceConfig,
2727
cleanupLLMInferenceServiceConfig,
28-
checkLLMInferenceServiceConfigState,
28+
// TODO: Uncomment once RHOAIENG-56694 is resolved.
29+
// checkLLMInferenceServiceConfigState,
2930
} from '../../../../utils/oc_commands/llmInferenceServiceConfig';
3031
import { checkLLMInferenceServiceState } from '../../../../utils/oc_commands/modelServing';
32+
import { MODEL_STATUS_TIMEOUT } from '../../../../support/timeouts';
3133

3234
let testData: DataScienceProjectData;
3335
let projectName: string;
@@ -136,19 +138,36 @@ describe('A user can deploy a model via vLLM on MaaS (LLMInferenceServiceConfig)
136138
cy.step('Verify the model is available in UI');
137139
modelServingSection.findModelServerDeployedName(modelName);
138140

139-
cy.step('Verify LLMInferenceService exists in the project namespace');
140-
cy.get<string>('@resourceName').then((resourceName) => {
141-
checkLLMInferenceServiceState(resourceName, projectName, { checkReady: true });
141+
// TODO: Uncomment once RHOAIENG-56694is resolved.
142+
// cy.step('Verify LLMInferenceService exists in the project namespace');
143+
// cy.get<string>('@resourceName').then((resourceName) => {
144+
// checkLLMInferenceServiceState(resourceName, projectName, { checkReady: true });
145+
// });
146+
147+
// cy.step('Verify LLMInferenceServiceConfig was copied to the project namespace');
148+
// checkLLMInferenceServiceConfigState(llmInferenceServiceConfigName, projectName, {
149+
// containerImage: 'quay.io/pierdipi/vllm-cpu:latest',
150+
// });
151+
152+
cy.step('Stop the model before deleting');
153+
const kServeRow = modelServingSection.getKServeRow(modelName);
154+
kServeRow.findStateActionToggle().click();
155+
kServeRow.findConfirmStopModal().then(($modal) => {
156+
if ($modal.length) {
157+
kServeRow.findConfirmStopModalButton().click();
158+
}
142159
});
143-
144-
cy.step('Verify LLMInferenceServiceConfig was copied to the project namespace');
145-
checkLLMInferenceServiceConfigState(llmInferenceServiceConfigName, projectName, {
146-
containerImage: 'quay.io/pierdipi/vllm-cpu:latest',
160+
cy.get<string>('@resourceName').then((resourceName) => {
161+
checkLLMInferenceServiceState(resourceName, projectName, {
162+
checkReady: false,
163+
checkStopped: true,
164+
requireLoadedState: false,
165+
});
147166
});
167+
kServeRow.findStatusLabel(ModelStateLabel.STOPPED, MODEL_STATUS_TIMEOUT).should('exist');
148168

149-
cy.step('Verify the model Row');
169+
cy.step('Delete the deployed model');
150170
const deploymentRow = modelServingGlobal.getDeploymentRow(modelName);
151-
deploymentRow.findStatusLabel(ModelStateLabel.STARTED).should('exist');
152171
deploymentRow.findKebab().click();
153172
inferenceServiceActions.findDeleteInferenceServiceAction().click();
154173
deleteModelServingModal.findInput().clear().type(modelName);

0 commit comments

Comments
 (0)