Skip to content

Commit dc450d0

Browse files
authored
Merge branch 'main' into RHOAIENG-41295-Improve-error-handling-for-invalid/expired-token-in-gen-ai-bff
2 parents e6d6974 + 7b5484f commit dc450d0

61 files changed

Lines changed: 3011 additions & 308 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/cypress/cypress/pages/modelServing.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,6 +1204,10 @@ class ModelServingWizard extends Wizard {
12041204
return cy.findByTestId(`env-var-value-${value}`);
12051205
}
12061206

1207+
findSaveAiAssetCheckbox() {
1208+
return cy.findByTestId('save-as-ai-asset-checkbox');
1209+
}
1210+
12071211
findSaveAsMaaSCheckbox() {
12081212
return cy.findByTestId('save-as-maas-checkbox');
12091213
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ let modelFilePath: string;
2626
const awsBucket = 'BUCKET_1' as const;
2727
const uuid = generateTestUUID();
2828

29-
describe('A model can be deployed with token auth', () => {
29+
describe('[Product Bug: RHOAIENG-41827] A model can be deployed with token auth', () => {
3030
retryableBefore(() => {
3131
cy.log('Loading test data');
3232
return loadDSPFixture('e2e/dataScienceProjects/testModelTokenAuth.yaml').then(
@@ -57,7 +57,7 @@ describe('A model can be deployed with token auth', () => {
5757

5858
it(
5959
'Verify that a model can be deployed with token auth',
60-
{ tags: ['@Smoke', '@SmokeSet3', '@Dashboard', '@ModelServing'] },
60+
{ tags: ['@Smoke', '@SmokeSet3', '@Dashboard', '@ModelServing', '@Bug'] },
6161
() => {
6262
cy.log('Model Name:', modelName);
6363
cy.step(`Log into the application with ${HTPASSWD_CLUSTER_ADMIN_USER.USERNAME}`);

packages/cypress/cypress/tests/e2e/gen-ai/testGenAi.cy.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,10 @@ describe('[Product Bug: RHOAIENG-41634] Verify Gen AI Namespace - Creation and C
228228
modelServingWizard.findGlobalScopedLabel().should('be.visible');
229229

230230
modelServingWizard.findNextButton().click();
231+
232+
cy.step('Enable AI asset endpoint');
233+
modelServingWizard.findSaveAiAssetCheckbox().click();
234+
231235
modelServingWizard.findNextButton().click();
232236

233237
cy.step('Wait for Review step to load');

packages/cypress/cypress/tests/e2e/modelRegistry/testAdminEditRegistry.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
FormFieldSelector as SettingsFormFieldSelector,
1818
} from '../../../pages/modelRegistrySettings';
1919

20-
describe('Verify that admin users can edit a model registry', () => {
20+
describe('[Product Bug: RHOAIENG-41476] Verify that admin users can edit a model registry', () => {
2121
let testData: ModelRegistryTestData;
2222
let registryName: string;
2323
let originalRegistryName: string;
@@ -56,7 +56,7 @@ describe('Verify that admin users can edit a model registry', () => {
5656

5757
it(
5858
'Logs in as admin user and edits an existing model registry',
59-
{ tags: ['@Dashboard', '@ModelRegistry', '@Sanity', '@SanitySet4', '@NonConcurrent'] },
59+
{ tags: ['@Dashboard', '@ModelRegistry', '@Sanity', '@SanitySet4', '@NonConcurrent', '@Bug'] },
6060
() => {
6161
cy.step('Login as an Admin');
6262
cy.visitWithLogin('/', HTPASSWD_CLUSTER_ADMIN_USER);

packages/cypress/cypress/tests/e2e/modelRegistry/testArchiveModels.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import {
3030
FormFieldSelector as VersionFormFieldSelector,
3131
} from '../../../pages/modelRegistry/registerVersionPage';
3232

33-
describe('[Product Bug: RHOAIENG-35821] Verify that models and versions can be archived and restored via model registry', () => {
33+
describe('[Product Bug: RHOAIENG-41476] Verify that models and versions can be archived and restored via model registry', () => {
3434
let testData: ModelRegistryTestData;
3535
let registryName: string;
3636
let deploymentName: string;

packages/cypress/cypress/tests/e2e/modelRegistry/testCreateModelRegistry.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
import { loadModelRegistryFixture } from '../../../utils/dataLoader';
1212
import type { ModelRegistryTestData } from '../../../types';
1313

14-
describe('Verify a model registry can be created and deleted', () => {
14+
describe('[Product Bug: RHOAIENG-41476] Verify a model registry can be created and deleted', () => {
1515
let testData: ModelRegistryTestData;
1616
let deploymentName: string;
1717
let registryName: string;
@@ -41,7 +41,7 @@ describe('Verify a model registry can be created and deleted', () => {
4141

4242
it(
4343
'Creates a model registry and then deletes it',
44-
{ tags: ['@Dashboard', '@ModelRegistry', '@Smoke', '@SmokeSet4', '@NonConcurrent'] },
44+
{ tags: ['@Dashboard', '@ModelRegistry', '@Smoke', '@SmokeSet4', '@NonConcurrent', '@Bug'] },
4545
() => {
4646
cy.step('Login as an Admin');
4747
cy.visitWithLogin('/', HTPASSWD_CLUSTER_ADMIN_USER);

packages/cypress/cypress/tests/e2e/modelRegistry/testManageRegistryPermissions.cy.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { createCleanProject } from '../../../utils/projectChecker';
1919
import { deleteOpenShiftProject } from '../../../utils/oc_commands/project';
2020
import { checkModelRegistryRoleBindings } from '../../../utils/oc_commands/roleBindings';
2121

22-
describe('Verify model registry permissions can be managed', () => {
22+
describe('[Product Bug: RHOAIENG-41476] Verify model registry permissions can be managed', () => {
2323
let testData: ModelRegistryTestData;
2424
let registryName: string;
2525
let testProjectName: string;
@@ -68,7 +68,7 @@ describe('Verify model registry permissions can be managed', () => {
6868

6969
it(
7070
'Admin can add user permissions to model registry',
71-
{ tags: ['@Dashboard', '@ModelRegistry', '@Sanity', '@SanitySet4', '@NonConcurrent'] },
71+
{ tags: ['@Dashboard', '@ModelRegistry', '@Sanity', '@SanitySet4', '@NonConcurrent', '@Bug'] },
7272
() => {
7373
cy.step('Login as an Admin');
7474
cy.visitWithLogin('/', HTPASSWD_CLUSTER_ADMIN_USER);
@@ -102,7 +102,7 @@ describe('Verify model registry permissions can be managed', () => {
102102

103103
it(
104104
'Contributor user can access model registry after being added',
105-
{ tags: ['@Dashboard', '@ModelRegistry', '@Sanity', '@SanitySet4', '@NonConcurrent'] },
105+
{ tags: ['@Dashboard', '@ModelRegistry', '@Sanity', '@SanitySet4', '@NonConcurrent', '@Bug'] },
106106
() => {
107107
cy.step(`Log into the application with ${LDAP_CONTRIBUTOR_USER.USERNAME}`);
108108
cy.visitWithLogin(`/ai-hub/registry/${registryName}`, LDAP_CONTRIBUTOR_USER);
@@ -115,7 +115,7 @@ describe('Verify model registry permissions can be managed', () => {
115115

116116
it(
117117
'Admin can remove user permissions from model registry',
118-
{ tags: ['@Dashboard', '@ModelRegistry', '@Sanity', '@SanitySet4', '@NonConcurrent'] },
118+
{ tags: ['@Dashboard', '@ModelRegistry', '@Sanity', '@SanitySet4', '@NonConcurrent', '@Bug'] },
119119
() => {
120120
cy.step('Login as an Admin');
121121
cy.visitWithLogin('/', HTPASSWD_CLUSTER_ADMIN_USER);
@@ -141,7 +141,7 @@ describe('Verify model registry permissions can be managed', () => {
141141

142142
it(
143143
'Contributor user cannot access model registry after being removed',
144-
{ tags: ['@Dashboard', '@ModelRegistry', '@Sanity', '@SanitySet4', '@NonConcurrent'] },
144+
{ tags: ['@Dashboard', '@ModelRegistry', '@Sanity', '@SanitySet4', '@NonConcurrent', '@Bug'] },
145145
() => {
146146
cy.step(`Log into the application with ${LDAP_CONTRIBUTOR_USER.USERNAME}`);
147147
cy.visitWithLogin(`/ai-hub/registry/${registryName}`, LDAP_CONTRIBUTOR_USER);
@@ -153,7 +153,7 @@ describe('Verify model registry permissions can be managed', () => {
153153

154154
it(
155155
'Admin can add group permissions to model registry',
156-
{ tags: ['@Dashboard', '@ModelRegistry', '@Sanity', '@SanitySet4', '@NonConcurrent'] },
156+
{ tags: ['@Dashboard', '@ModelRegistry', '@Sanity', '@SanitySet4', '@NonConcurrent', '@Bug'] },
157157
() => {
158158
cy.step('Login as an Admin');
159159
cy.visitWithLogin('/', HTPASSWD_CLUSTER_ADMIN_USER);
@@ -188,7 +188,7 @@ describe('Verify model registry permissions can be managed', () => {
188188

189189
it(
190190
'User can access model registry through group membership',
191-
{ tags: ['@Dashboard', '@ModelRegistry', '@Sanity', '@SanitySet4', '@NonConcurrent'] },
191+
{ tags: ['@Dashboard', '@ModelRegistry', '@Sanity', '@SanitySet4', '@NonConcurrent', '@Bug'] },
192192
() => {
193193
cy.step(`Log into the application with ${LDAP_CONTRIBUTOR_USER.USERNAME}`);
194194
cy.visitWithLogin(`/ai-hub/registry/${registryName}`, LDAP_CONTRIBUTOR_USER);
@@ -201,7 +201,7 @@ describe('Verify model registry permissions can be managed', () => {
201201

202202
it(
203203
'Admin can remove group permissions from model registry',
204-
{ tags: ['@Dashboard', '@ModelRegistry', '@Sanity', '@SanitySet4', '@NonConcurrent'] },
204+
{ tags: ['@Dashboard', '@ModelRegistry', '@Sanity', '@SanitySet4', '@NonConcurrent', '@Bug'] },
205205
() => {
206206
cy.step('Login as an Admin');
207207
cy.visitWithLogin('/', HTPASSWD_CLUSTER_ADMIN_USER);
@@ -227,7 +227,7 @@ describe('Verify model registry permissions can be managed', () => {
227227

228228
it(
229229
'User cannot access model registry after group is removed',
230-
{ tags: ['@Dashboard', '@ModelRegistry', '@Sanity', '@SanitySet4', '@NonConcurrent'] },
230+
{ tags: ['@Dashboard', '@ModelRegistry', '@Sanity', '@SanitySet4', '@NonConcurrent', '@Bug'] },
231231
() => {
232232
cy.step(`Log into the application with ${LDAP_CONTRIBUTOR_USER.USERNAME}`);
233233
cy.visitWithLogin(`/ai-hub/registry/${registryName}`, LDAP_CONTRIBUTOR_USER);
@@ -239,7 +239,7 @@ describe('Verify model registry permissions can be managed', () => {
239239

240240
it(
241241
'Admin can add project permissions to model registry',
242-
{ tags: ['@Dashboard', '@ModelRegistry', '@Sanity', '@SanitySet4', '@NonConcurrent'] },
242+
{ tags: ['@Dashboard', '@ModelRegistry', '@Sanity', '@SanitySet4', '@NonConcurrent', '@Bug'] },
243243
() => {
244244
cy.step('Login as an Admin');
245245
cy.visitWithLogin('/', HTPASSWD_CLUSTER_ADMIN_USER);

packages/cypress/cypress/tests/e2e/modelRegistry/testRegisterModel.cy.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { loadModelRegistryFixture } from '../../../utils/dataLoader';
2626
import { generateTestUUID } from '../../../utils/uuidGenerator';
2727
import type { ModelRegistryTestData } from '../../../types';
2828

29-
describe('Verify models can be registered in a model registry', () => {
29+
describe('[Product Bug: RHOAIENG-41476] Verify models can be registered in a model registry', () => {
3030
let testData: ModelRegistryTestData;
3131
let registryName: string;
3232
let objectStorageModelName: string;
@@ -69,7 +69,7 @@ describe('Verify models can be registered in a model registry', () => {
6969

7070
it(
7171
'Registers models via model registry using object storage and URI',
72-
{ tags: ['@Dashboard', '@ModelRegistry', '@NonConcurrent', '@Smoke', '@SmokeSet4'] },
72+
{ tags: ['@Dashboard', '@ModelRegistry', '@NonConcurrent', '@Smoke', '@SmokeSet4', '@Bug'] },
7373
() => {
7474
cy.step('Log into the application');
7575
cy.visitWithLogin('/', HTPASSWD_CLUSTER_ADMIN_USER);
@@ -167,7 +167,7 @@ describe('Verify models can be registered in a model registry', () => {
167167

168168
it(
169169
'Registers a new version via versions view',
170-
{ tags: ['@Dashboard', '@ModelRegistry', '@NonConcurrent', '@Smoke', '@SmokeSet4'] },
170+
{ tags: ['@Dashboard', '@ModelRegistry', '@NonConcurrent', '@Smoke', '@SmokeSet4', '@Bug'] },
171171
() => {
172172
cy.step('Log into the application');
173173
cy.visitWithLogin('/', HTPASSWD_CLUSTER_ADMIN_USER);

packages/cypress/cypress/tests/e2e/modelRegistry/testRegistryDeployModel.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { createCleanProject } from '../../../utils/projectChecker';
2424
import { deleteOpenShiftProject } from '../../../utils/oc_commands/project';
2525
import { AWS_BUCKETS } from '../../../utils/s3Buckets';
2626

27-
describe('Verify models can be deployed from model registry', () => {
27+
describe('[Product Bug: RHOAIENG-41476] Verify models can be deployed from model registry', () => {
2828
let testData: ModelRegistryTestData;
2929
let registryName: string;
3030
let modelName: string;
@@ -78,7 +78,7 @@ describe('Verify models can be deployed from model registry', () => {
7878
it(
7979
'Registers a model and deploys it via model registry',
8080
{
81-
tags: ['@Dashboard', '@ModelRegistry', '@NonConcurrent', '@Sanity', '@SanitySet4'],
81+
tags: ['@Dashboard', '@ModelRegistry', '@NonConcurrent', '@Sanity', '@SanitySet4', '@Bug'],
8282
},
8383
() => {
8484
cy.step('Log into the application');

packages/cypress/cypress/tests/mocked/modelServing/modelServingDeploy.cy.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,15 @@ describe('Model Serving Deploy Wizard', () => {
384384
// Step 3: Advanced Options
385385
// Model access & Token authentication
386386
modelServingWizard.findAdvancedOptionsStep().should('be.enabled');
387+
// AI Asset
388+
modelServingWizard.findSaveAiAssetCheckbox().should('exist');
389+
modelServingWizard.findSaveAiAssetCheckbox().should('not.be.checked');
390+
modelServingWizard.findUseCaseInput().should('not.exist');
391+
modelServingWizard.findSaveAiAssetCheckbox().click();
392+
modelServingWizard.findUseCaseInput().should('exist');
393+
modelServingWizard.findUseCaseInput().should('be.enabled');
394+
modelServingWizard.findUseCaseInput().type('test');
395+
387396
modelServingWizard.findExternalRouteCheckbox().click();
388397
modelServingWizard.findTokenAuthenticationCheckbox().should('be.checked');
389398
modelServingWizard.findTokenAuthenticationCheckbox().click();
@@ -414,6 +423,7 @@ describe('Model Serving Deploy Wizard', () => {
414423
namespace: 'test-project',
415424
labels: {
416425
'opendatahub.io/dashboard': 'true',
426+
'opendatahub.io/genai-asset': 'true',
417427
'networking.kserve.io/visibility': 'exposed',
418428
},
419429
annotations: {
@@ -423,6 +433,7 @@ describe('Model Serving Deploy Wizard', () => {
423433
'opendatahub.io/hardware-profile-name': 'small-profile',
424434
'opendatahub.io/model-type': 'generative',
425435
'security.opendatahub.io/enable-auth': 'true',
436+
'opendatahub.io/genai-use-case': 'test',
426437
},
427438
},
428439
spec: {
@@ -664,6 +675,9 @@ describe('Model Serving Deploy Wizard', () => {
664675
// Model access & Token authentication
665676
modelServingWizard.findAdvancedOptionsStep().should('be.enabled');
666677

678+
modelServingWizard.findSaveAiAssetCheckbox().should('not.exist');
679+
modelServingWizard.findUseCaseInput().should('not.exist');
680+
667681
modelServingWizard.findExternalRouteCheckbox().click();
668682
modelServingWizard.findTokenAuthenticationCheckbox().should('be.checked');
669683
modelServingWizard.findTokenAuthenticationCheckbox().click();

0 commit comments

Comments
 (0)