Skip to content

Commit

Permalink
Merge branch 'master' into ods-195-dashboard-metrics-code
Browse files Browse the repository at this point in the history
  • Loading branch information
asanzgom authored Jan 16, 2025
2 parents 6c9601c + 239f958 commit 593d5a7
Show file tree
Hide file tree
Showing 9 changed files with 126 additions and 39 deletions.

This file was deleted.

This file was deleted.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"modelName":"densenetonnx","modelVersion":"1","id":"test1","outputs":[{"name":"fc6_1","datatype":"FP32","shape":["1000"]}],"rawOutputContents":["crbswY2eFMHy2ljBr3gZwk41nsGFaUfAwRMFwmtDScGn5h7BrHeHwdxaF8GCdt7A4DwkwezErcF98U/BQW4Iwbxw88BHxz7BmN4fwVPN7sGNiG7B5blvwUd0P8F3MqTB4RxUwbKIucHzFATCn6r7wTvnpcH5wczBxbHcwZmxvsE2KabByCZewaYnrkAMlIzBQuTfv1Mozz84gQ9B+IBkwanLXMGIUhXBIDmSwG6UfcHxIofBeiZKwTf1KEDOJ0PBAunpwdgtwMF3dCLB7/CNQDjkUEEnZu5AYr9PQCD7DUATXPlByjflwEOTasGPwhs95/zYQfriPcEGbXTBrvKpQHfmI8F/0ofBT3UfQZVHAEBHosw+kavuwUTvScGkB8a/m3UEwWWaT0B+3q3ApvsUQfTd6b/5zw5A6lbTwN7mC0Eq3wvCr6kJwovtc8DlbVjBtE8RwjkXA8JVDobBiAFfwUy7h8HLr9vBOZ5/waKBC8KYJojAJNBDwSJe6D/kgLrBVIeNwDm/z8BMv2HByQWnwFvF3sArnAnCQ0/QwSzPAcKd45PBIta0wYjICsLMab/BMNVWwb8KC8AVgiTCbRhSwSSN60BG/ePAse6rwXwZvMGfAgbCeYuTvvCQLcDvJonAP6qNwUsRFj9HFY1ARftxwaXOAsE46/rB8EmFwaBmz8FmkaPB/XuXwd+XTcEIDQbCXAW8wdX6ZcDhwQTCy3VCwWxDQcFKUszA6aYCwrWFpUDvVpjB6ondP0pUQcE9BWvAG6TYwcASsMEJa5n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ZvpIQG8FB629B6KemQVoelUFl67VBfZqKQU6UV0EAhBHBNCwEQin06UBfib1AsfsGQbsUb8BKyAlBSaN0QW63zcDjTAhBvaAGwZD+RkAOGxvBKlIIQo1aLEJMy39CqhEAQoOoxsCtt+NADdXiPymzDMGoeoDBnjwJwYaWQcF4GShB+8sdvzs1JcGnHjHByDiAwBwcl0EWbVvAegd1wO9soEG9BwrCBmWiQd2Bib+8jYjBw2Jhv5Adu8G4BIHBv0z5wWZ3BcKElV/BMe6wQAPnvcGmp5JAqHhTwQ=="]}
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,9 @@ Clean Up Server
Should Match "${ls_server}" "${EMPTY}"

Get User Notebook Pod Name
[Documentation] Returns notebook pod name for given username (e.g. for user ldap-admin1 it will be jupyterhub-nb-ldap-2dadmin1)
[Documentation] Returns notebook pod name for given username (e.g. for user ldap-admin1 it will be jupyter-nb-ldap-2dadmin1-0)
[Arguments] ${username}
${safe_username}= Get Safe Username ${username}
#${notebook_pod_name}= Set Variable jupyterhub-nb-${safe_username}
${notebook_pod_name}= Set Variable jupyter-nb-${safe_username}-0
RETURN ${notebook_pod_name}

Expand Down
49 changes: 47 additions & 2 deletions ods_ci/tests/Tests/0200__rhoai_upgrade/0201__pre_upgrade.robot
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Resource ../../Resources/Page/DistributedWorkloads/DistributedWorkloa
Resource ../../Resources/Page/DistributedWorkloads/WorkloadMetricsUI.resource
Resource ../../Resources/Page/ModelRegistry/ModelRegistry.resource

Suite Setup Dashboard Suite Setup
Suite Setup Upgrade Suite Setup
Suite Teardown RHOSi Teardown

Test Tags PreUpgrade
Expand All @@ -34,6 +34,9 @@ Test Tags PreUpgrade
${CUSTOM_CULLER_TIMEOUT} 60000
${S_SIZE} 25
${DW_PROJECT_CREATED} False
${CODE} while True: import time ; time.sleep(10); print ("Hello")
${UPGRADE_NS} upgrade
${UPGRADE_CONFIG_MAP} upgrade-config-map


*** Test Cases ***
Expand Down Expand Up @@ -246,12 +249,54 @@ Model Registry Pre Upgrade Set Up
[Tags] Upgrade ModelRegistryUpgrade
Model Registry Pre Upgrade Scenario

Long Running Jupyter Notebook
[Documentation] Launch a long running notebook before the upgrade
[Tags] Upgrade
Launch Notebook
Add And Run JupyterLab Code Cell In Active Notebook ${CODE}

# Get the notebook pod creation timestamp
${notebook_pod_name}= Get User Notebook Pod Name ${TEST_USER2.USERNAME}
${return_code} ${ntb_creation_timestamp} = Run And Return Rc And Output
... oc get pod -n ${NOTEBOOKS_NAMESPACE} ${notebook_pod_name} --no-headers --output='custom-columns=TIMESTAMP:.metadata.creationTimestamp' # robocop: disable: line-too-long
Should Be Equal As Integers ${return_code} 0 msg=${ntb_creation_timestamp}

# Save the timestamp to the OpenShift ConfigMap so it can be used in test in the next phase
${return_code} ${cmd_output} = Run And Return Rc And Output
... oc create configmap ${UPGRADE_CONFIG_MAP} -n ${UPGRADE_NS} --from-literal=ntb_creation_timestamp=${ntb_creation_timestamp} # robocop: disable: line-too-long
Should Be Equal As Integers ${return_code} 0 msg=${cmd_output}

Close Browser


*** Keywords ***
Dashboard Suite Setup
Launch Notebook
[Documentation] Launch notebook for the suite
[Arguments] ${notebook_image}=minimal-notebook
... ${username}=${TEST_USER2.USERNAME}
... ${password}=${TEST_USER2.PASSWORD}
... ${auth_type}=${TEST_USER2.AUTH_TYPE}
Begin Web Test username=${username} password=${password} auth_type=${auth_type}
Launch Jupyter From RHODS Dashboard Link
Spawn Notebook With Arguments
... image=${notebook_image}
... username=${username}
... password=${password}
... auth_type=${auth_type}

Upgrade Suite Setup
[Documentation] Basic suite setup
Set Library Search Order SeleniumLibrary
RHOSi Setup
# Prepare a namespace for storing values that should be shared between different upgrade test phases
# 1. if the namespace exists already, let's remove it
${return_code} ${cmd_output} = Run And Return Rc And Output
... oc delete namespace --wait --ignore-not-found ${UPGRADE_NS}
Should Be Equal As Integers ${return_code} 0 msg=${cmd_output}
# 2. create the namespace now
${return_code} ${cmd_output} = Run And Return Rc And Output
... oc create namespace ${UPGRADE_NS}
Should Be Equal As Integers ${return_code} 0 msg=${cmd_output}

Dashboard Test Teardown
[Documentation] Basic suite teardown
Expand Down
28 changes: 2 additions & 26 deletions ods_ci/tests/Tests/0200__rhoai_upgrade/0202__during_upgrade.robot
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,7 @@ Library JupyterLibrary
Test Tags DuringUpgrade


*** Variables ***
${CODE} while True: import time ; time.sleep(10); print ("Hello")


*** Test Cases ***
Long Running Jupyter Notebook
[Documentation] Launch a long running notebook before the upgrade
[Tags] Upgrade
Launch Notebook
Add And Run JupyterLab Code Cell In Active Notebook ${CODE}
# robocop:disable
${return_code} ${timestamp} = Run And Return Rc And Output
... oc get pod -n ${NOTEBOOKS_NAMESPACE} jupyter-nb-ldap-2dadmin2-0 --no-headers --output='custom-columns=TIMESTAMP:.metadata.creationTimestamp'
Should Be Equal As Integers ${return_code} 0
Set Global Variable ${timestamp} # robocop: disable
Close Browser

Upgrade RHODS
[Documentation] Approve the install plan for the upgrade and make sure that upgrade has completed
[Tags] ODS-1766 Upgrade
Expand Down Expand Up @@ -79,22 +63,14 @@ PyTorch Image Workload Test
*** Keywords ***
Launch Notebook
[Documentation] Launch notebook for the suite
[Arguments] ${notbook_image}=minimal-notebook
[Arguments] ${notebook_image}=minimal-notebook
... ${username}=${TEST_USER2.USERNAME}
... ${password}=${TEST_USER2.PASSWORD}
... ${auth_type}=${TEST_USER2.AUTH_TYPE}
# robocop: disable
Begin Web Test username=${username} password=${password} auth_type=${auth_type}
Login To RHODS Dashboard ${username} ${password} ${auth_type}
Wait For RHODS Dashboard To Load
Launch Jupyter From RHODS Dashboard Link
Login To Jupyterhub ${username} ${password} ${auth_type}
${authorization_required} = Is Service Account Authorization Required
IF ${authorization_required} Authorize JupyterLab Service Account
Fix Spawner Status
# robocop: disable
Spawn Notebook With Arguments
... image=${notbook_image}
... image=${notebook_image}
... username=${username}
... password=${password}
... auth_type=${auth_type}
Expand Down
34 changes: 28 additions & 6 deletions ods_ci/tests/Tests/0200__rhoai_upgrade/0203__post_upgrade.robot
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Test Tags PostUpgrade
*** Variables ***
${S_SIZE} 25
${DW_PROJECT_CREATED} False
${UPGRADE_NS} upgrade
${UPGRADE_CONFIG_MAP} upgrade-config-map


*** Test Cases ***
Expand Down Expand Up @@ -71,13 +73,26 @@ Verify Culler is Enabled
END

Verify Notebook Has Not Restarted
[Documentation] Verify Notbook pod has not restarted after the upgrade
[Tags] Upgrade AutomationBug RHOAIENG-14840
# robocop:disable
[Documentation] Verify Notebook pod has not restarted after the upgrade
[Tags] Upgrade
${notebook_name}= Get User CR Notebook Name ${TEST_USER2.USERNAME}
${notebook_pod_name}= Get User Notebook Pod Name ${TEST_USER2.USERNAME}

# Get the running notebook creation timestamp
${return_code} ${new_timestamp} Run And Return Rc And Output
... oc get pod -n ${NOTEBOOKS_NAMESPACE} jupyter-nb-ldap-2dadmin2-0 --no-headers --output='custom-columns=TIMESTAMP:.metadata.creationTimestamp'
Should Be Equal As Integers ${return_code} 0
Should Be Equal ${timestamp} ${new_timestamp} msg=Running notebook pod has restarted
... oc get pod -n ${NOTEBOOKS_NAMESPACE} ${notebook_pod_name} --no-headers --output='custom-columns=TIMESTAMP:.metadata.creationTimestamp' # robocop: disable: line-too-long
Should Be Equal As Integers ${return_code} 0 msg=${new_timestamp}

# Get the running notebook creation timestamp from the upgrade ConfigMap safed in the previous
# phase (before the actual RHOAI upgrade)
${return_code} ${ntb_creation_timestamp} Run And Return Rc And Output
... oc get configmap ${UPGRADE_CONFIG_MAP} -n ${UPGRADE_NS} -o jsonpath='{.data.ntb_creation_timestamp}'
Should Be Equal As Integers ${return_code} 0 msg=${ntb_creation_timestamp}

# The timestamps should be equal
Should Be Equal ${ntb_creation_timestamp} ${new_timestamp} msg=Running notebook pod has restarted

[Teardown] Terminate Running Notebook ${notebook_name}

Verify Custom Image Is Present
[Documentation] Verify Custom Noteboook is not deleted after the upgrade
Expand Down Expand Up @@ -325,6 +340,13 @@ Delete OOTB Image
IF not ${status} Fail Notebook image is deleted after the upgrade
IF not ${IS_SELF_MANAGED} Managed RHOAI Upgrade Test Teardown

Terminate Running Notebook
[Documentation] Terminates the running notebook instance
[Arguments] ${notebook_name}
${return_code} ${cmd_output} Run And Return Rc And Output
... oc delete Notebook.kubeflow.org -n ${NOTEBOOKS_NAMESPACE} ${notebook_name}
Should Be Equal As Integers ${return_code} 0 msg=${cmd_output}

Managed RHOAI Upgrade Test Teardown
# robocop: off=too-many-calls-in-keyword
[Documentation] Check rhods_aggregate_availability metric when RHOAI is installed as managed
Expand Down
Loading

0 comments on commit 593d5a7

Please sign in to comment.