Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dashboard RBAC issue, fix cli timing issue for Model Registry smoke tests #2026

Merged
merged 3 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions ods_ci/tests/Resources/Page/ModelRegistry/ModelRegistry.resource
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ Prepare Model Registry Test Setup
Get Cluster Domain And Token
Run Update Notebook Script
Generate ModelRegistry Certificates
Apply Db Config Samples namespace=${NAMESPACE_MODEL_REGISTRY} samples=${MODEL_REGISTRY_DB_SAMPLES}
Create Model Registry Secrets
Apply Db Config Samples namespace=${NAMESPACE_MODEL_REGISTRY} samples=${MODEL_REGISTRY_DB_SAMPLES}
Fetch CA Certificate If RHODS Is Self-Managed

Teardown Model Registry Test Setup
Expand Down Expand Up @@ -296,12 +296,13 @@ Open Model Registry Dashboard Page
Maybe Wait For Dashboard Loading Spinner Page
${loaded}= Run Keyword And Return Status
... SeleniumLibrary.Page Should Not Contain Request access to model registries
WHILE ${loaded}!=${TRUE} limit=5
WHILE ${loaded}!=${TRUE} limit=12 # Retries for 2 minutes - wait for user group to reconcile
SeleniumLibrary.Reload Page
SeleniumLibrary.Wait Until Page Contains Model Registry
SeleniumLibrary.Wait Until Page Contains Select a model registry to view and manage your registered models.
${loaded}= Run Keyword And Return Status
... SeleniumLibrary.Page Should Not Contain Request access to model registries
Sleep 10s
END
Maybe Wait For Dashboard Loading Spinner Page

Expand Down Expand Up @@ -383,6 +384,7 @@ Model Registry Post Upgrade Scenario
Should Be Equal As Strings ${operator_grpc} ${instance_grpc}
Launch Dashboard ${TEST_USER.USERNAME} ${TEST_USER.PASSWORD} ${TEST_USER.AUTH_TYPE}
... ${ODH_DASHBOARD_URL} ${BROWSER.NAME} ${BROWSER.OPTIONS}
Add User To Model Registry Default Group ${TEST_USER.USERNAME}
Open Model Registry Dashboard Page
SeleniumLibrary.Page Should Contain Element
... xpath:${MR_TABLE_XPATH}/tbody/tr/td[@data-label="Model name"]//a[.="${MR_REGISTERED_MODEL_NAME}"]
Expand Down Expand Up @@ -446,4 +448,14 @@ Get Model Registry Instance ${type} Image
${rc} ${img}= Run And Return RC And Output
... oc get pod -l app=${instance_name} -n ${ns} -o yaml | yq '.items[].spec.containers[] | select(.name=="${type}-container").image'
Should Be Equal As Integers ${rc} 0
RETURN ${img}
RETURN ${img}

Add User To Model Registry Default Group
[Documentation] Dashboard creates a default user group to give read/write permissions to a MR instance. We need
... to add our test user to this group in order to be able to interact with it.
[Arguments] ${user} ${model_registry_name}=modelregistry-sample
${rc}= Run And Return Rc oc get group ${model_registry_name}-users
Should Be Equal As Integers ${rc} 0
${rc} ${out}= Run And Return Rc And Output oc adm groups add-users ${model_registry_name}-users ${user}
Should Be Equal As Integers ${rc} 0
Should Be Equal As Strings ${out} group.user.openshift.io/${model_registry_name}-users added: "${user}"
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Verify Model Registry Integration With Secured-DB
IF ${self_managed} Upload Certificate To Jupyter Notebook openshift_ca.crt
Jupyter Notebook Can Query Model Registry ${JUPYTER_NOTEBOOK}
SeleniumLibrary.Switch Window ${handle}
Add User To Model Registry Default Group ${TEST_USER.USERNAME}
Open Model Registry Dashboard Page
SeleniumLibrary.Page Should Contain Element xpath:${MR_TABLE_XPATH}/tbody/tr/td[@data-label="Model name"]//a[.="${MR_REGISTERED_MODEL_NAME}"]
SeleniumLibrary.Page Should Contain Element xpath:${MR_TABLE_XPATH}/tbody/tr/td[@data-label="Owner"]//p[.="${MR_REGISTERED_MODEL_AUTHOR}"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,20 @@ Deploy Model Registry
... model-registry-operator-controller-manager
... control-plane=model-registry-operator
Component Should Be Enabled modelregistry
Sleep 60s reason=Wait for webhook endpoint
Apply Db Config Samples namespace=${NAMESPACE_MODEL_REGISTRY} samples=${MODEL_REGISTRY_DB_SAMPLES}
Wait Until Keyword Succeeds 10 s 2 s Verify Model Registry Can Accept Requests

Registering A Model In The Registry
[Documentation] Registers a model in the model registry
[Tags] Smoke MR1302 ModelRegistry
Depends On Test Deploy Model Registry
Register A Model ${URL}

Verify Model Registry
[Documentation] Verify the registered model.
[Tags] Smoke MR1302 ModelRegistry
Depends On Test Registering A Model In The Registry
Log Attempting to verify Model Registry
Wait Until Keyword Succeeds 10 s 2 s Run Curl Command And Verify Response

Expand Down
Loading