-
Notifications
You must be signed in to change notification settings - Fork 82
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
Dynamically change python target version for MR dependencies #1898
Conversation
Signed-off-by: lugi0 <lgiorgi@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm for me
Robot Results
|
We should check what is the rootcause here. The version of the image for the workbenches has been bumped from 2024.1 to 2024.2 which incorporates version updates for basically all packages including JupyterLab bump from 3.6 to 4.2.5 and elyra bump. |
I tried to mimic what this test does on the Standard Data Science image version 2024.2 (uses Python 3.11):
Then I realized that you use Python 3.9 in your commands, so I did the following instead:
|
And this is what I got on the minimal image 2024.2:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't care how you install this but you probably had a reason to do it the original way. If you want to keep the original way, then update the download command so it utilizes Python 3.11 as I commented above, that means:
pip download --platform=manylinux2014_x86_64 --python-version=3.11 --abi=cp311 --only-binary=:all: --dest=/opt/app-root/src/ model_registry==0.2.6a1
With this change it should start to work on the latest 2024.2 images.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm with @jstourac on this. I think the reason for the previous convoluted way is that running pip install
directly won't work disconnected. Or that whether that works or not in disconnected depends on whether the packages are mirrored in the disconnected registry. And whether the env variable that shows the mirror's url is exported in the env.
Signed-off-by: lugi0 <lgiorgi@redhat.com>
|
||
Maybe Select Kernel | ||
${is_kernel_selected} = Run Keyword And Return Status Page Should Not Contain Element xpath=//div[@class="jp-Dialog-buttonLabel"][.="Select"] | ||
IF not ${is_kernel_selected} Click Button xpath=//div[@class="jp-Dialog-buttonLabel"][.="Select"]/.. | ||
${is_kernel_selected} = Run Keyword And Return Status Page Should Not Contain Element xpath=//div[@class="jp-Dialog-buttonLabel"][.="Select"] |
Check warning
Code scanning / Robocop
Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test
${is_kernel_selected} = Run Keyword And Return Status Page Should Not Contain Element xpath=//div[@class="jp-Dialog-buttonLabel"][.="Select"] | ||
IF not ${is_kernel_selected} Click Button xpath=//div[@class="jp-Dialog-buttonLabel"][.="Select"]/.. | ||
${is_kernel_selected} = Run Keyword And Return Status Page Should Not Contain Element xpath=//div[@class="jp-Dialog-buttonLabel"][.="Select"] | ||
IF not ${is_kernel_selected} SeleniumLibrary.Click Button xpath=//div[@class="jp-Dialog-buttonLabel"][.="Select"]/.. |
Check warning
Code scanning / Robocop
Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test
Signed-off-by: lugi0 <lgiorgi@redhat.com>
ods_ci/tests/Resources/Page/ODH/JupyterHub/JupyterLabLauncher.robot
Dismissed
Show dismissed
Hide dismissed
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} |
Check warning
Code scanning / Robocop
The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning test
${output}= Run Cell And Get Output !python --version | ||
${output}= Fetch From Right ${output} ${SPACE} | ||
# Y and Z can be > len 1, split on "." instead of getting substring from indices | ||
@{split_out}= Split String ${output} separator=. |
Check warning
Code scanning / Robocop
The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning test
${output}= Fetch From Right ${output} ${SPACE} | ||
# 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] |
Check warning
Code scanning / Robocop
The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning test
Implemented @jstourac 's suggestion, and also added a step to fetch the current python version in the jupyterlab environment in order to avoid this issue in the future. |
|
||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd do this
% python -c 'import sys; print(*sys.version_info[:2], sep=".")'
3.11
to avoid robot string manipulation at all costs. But it's been already coded differently, so I agree leave it be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I wanted to fetch the string directly but a bunch of other tests rely on this keyword and I didn't want to change its behaviour too much in fear of breaking something. I think we can leave it be for now, RF's string manipulation is Python string manipulation at the end of the day
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(everything that was, is, will be, and can be, is contained in the expression above, no need to write anything more)
(the
Signed-off-by: lugi0 <lgiorgi@redhat.com>
|
Tested locally after the rebase on #1899 and passing against RC build |
No description provided.