From d06340a3fd36ce59ed34866b248286f97923db07 Mon Sep 17 00:00:00 2001 From: lugi0 Date: Tue, 8 Oct 2024 14:28:17 +0200 Subject: [PATCH] Fix python version fetching Signed-off-by: lugi0 --- .../Resources/Page/ODH/JupyterHub/JupyterLabLauncher.robot | 4 +++- .../ODHDashboard/ODHDataScienceProject/Workbenches.resource | 2 ++ .../1301_model_registry_model_serving.robot | 2 -- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ods_ci/tests/Resources/Page/ODH/JupyterHub/JupyterLabLauncher.robot b/ods_ci/tests/Resources/Page/ODH/JupyterHub/JupyterLabLauncher.robot index 2fa6b1ac6..bf1481930 100644 --- a/ods_ci/tests/Resources/Page/ODH/JupyterHub/JupyterLabLauncher.robot +++ b/ods_ci/tests/Resources/Page/ODH/JupyterHub/JupyterLabLauncher.robot @@ -145,7 +145,9 @@ Get XY Python Version From Jupyterlab [Documentation] Fetches the X.Y Python version from the current Jupyterlab instance ${output}= Run Cell And Get Output !python --version ${output}= Fetch From Right ${output} ${SPACE} - ${vers}= Get Substring ${output} 0 3 + # Y and Z can be > len 1, split on "." instead of getting substring from indices + @{split_out}= Split String ${output} separator=. + ${vers}= Set Variable ${split_out}[0].${split_out}[1] RETURN ${vers} Maybe Select Kernel diff --git a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Workbenches.resource b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Workbenches.resource index cd7c6ddb8..9be737049 100644 --- a/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Workbenches.resource +++ b/ods_ci/tests/Resources/Page/ODH/ODHDashboard/ODHDataScienceProject/Workbenches.resource @@ -215,8 +215,10 @@ Select Workbench Jupyter Image IF "${version}" != "${NONE}" IF "${version}"=="default" Verify Version Selection Dropdown + Update Globals For JupyterLab 4 ELSE IF "${version}"=="previous" Select Workbench Image Version ${version} + Update Globals For JupyterLab 3 Custom ELSE Fail ${version} does not exist, use default/previous END diff --git a/ods_ci/tests/Tests/1300__model_registry/1301_model_registry_model_serving.robot b/ods_ci/tests/Tests/1300__model_registry/1301_model_registry_model_serving.robot index 3be698322..70628c5ee 100644 --- a/ods_ci/tests/Tests/1300__model_registry/1301_model_registry_model_serving.robot +++ b/ods_ci/tests/Tests/1300__model_registry/1301_model_registry_model_serving.robot @@ -71,8 +71,6 @@ Verify Model Registry Integration With Secured-DB ... workbench_namespace=${PRJ_TITLE} Upload File In The Workbench filepath=${JUPYTER_NOTEBOOK_FILEPATH} workbench_title=${WORKBENCH_TITLE} ... workbench_namespace=${PRJ_TITLE} - # In the latest minimal python image these dependencies are not found by pip even though the UI shows them to be - # present. Switch to installing model registry from pip directly. Download Python Client Dependencies ${MR_PYTHON_CLIENT_FILES} ${MR_PYTHON_CLIENT_WHL_VERSION} Upload Python Client Files In The Workbench ${MR_PYTHON_CLIENT_FILES} Upload Certificate To Jupyter Notebook ${CERTS_DIRECTORY}/domain.crt