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

Update codeflare-sdk tests to run against Python 3.11 and 3.9 version #1986

Merged

Conversation

Srihari1192
Copy link
Contributor

@Srihari1192 Srihari1192 commented Oct 29, 2024

closes https://issues.redhat.com/browse/RHOAIENG-15006

Updated CodeFlare SDK e2e tests in downstream testing to run against both Python 3.11 and 3.9 versions

${CODEFLARE-SDK-RELEASE-TAG} v0.22.0
${CODEFLARE-SDK_DIR} codeflare-sdk
${CODEFLARE-SDK_REPO_URL} %{CODEFLARE-SDK_REPO_URL=https://github.com/project-codeflare/codeflare-sdk.git}
${DISTRIBUTED_WORKLOADS_RELEASE_ASSETS} https://github.com/opendatahub-io/distributed-workloads/releases/latest/download
${RAY_IMAGE} quay.io/modh/ray@sha256:db667df1bc437a7b0965e8031e905d3ab04b86390d764d120e05ea5a5c18d1b4
${RAY_IMAGE_3.11} quay.io/modh/ray@sha256:db667df1bc437a7b0965e8031e905d3ab04b86390d764d120e05ea5a5c18d1b4

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (129/120)
${CODEFLARE-SDK-RELEASE-TAG} v0.22.0
${CODEFLARE-SDK_DIR} codeflare-sdk
${CODEFLARE-SDK_REPO_URL} %{CODEFLARE-SDK_REPO_URL=https://github.com/project-codeflare/codeflare-sdk.git}
${DISTRIBUTED_WORKLOADS_RELEASE_ASSETS} https://github.com/opendatahub-io/distributed-workloads/releases/latest/download
${RAY_IMAGE} quay.io/modh/ray@sha256:db667df1bc437a7b0965e8031e905d3ab04b86390d764d120e05ea5a5c18d1b4
${RAY_IMAGE_3.11} quay.io/modh/ray@sha256:db667df1bc437a7b0965e8031e905d3ab04b86390d764d120e05ea5a5c18d1b4
${RAY_IMAGE_3.9} quay.io/modh/ray@sha256:0d715f92570a2997381b7cafc0e224cfa25323f18b9545acfd23bc2b71576d06

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (129/120)
@@ -53,9 +54,9 @@

Run Codeflare-SDK Test
[Documentation] Run codeflare-sdk Test
[Arguments] ${TEST_TYPE} ${TEST_NAME}
[Arguments] ${TEST_TYPE} ${TEST_NAME} ${PYTHON_VERSION} ${RAY_IMAGE}

Check warning

Code scanning / Robocop

{{ var_or_arg }} '{{ variable_name }}' overwrites reserved variable '{{ reserved_variable }}' Warning test

Argument '${TEST_NAME}' overwrites reserved variable '${TEST_NAME}'
@@ -132,7 +132,7 @@
[Setup] Prepare Codeflare-SDK Test Setup
${PRJ_UPGRADE} Set Variable test-ns-rayupgrade
${JOB_NAME} Set Variable mnist
Run Codeflare-SDK Test upgrade raycluster_sdk_upgrade_test.py::TestMNISTRayClusterUp
Run Codeflare-SDK Test upgrade raycluster_sdk_upgrade_test.py::TestMNISTRayClusterUp 3.11 ${RAY_IMAGE_3.11}

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (123/120)
@@ -10,23 +10,41 @@


*** Test Cases ***
Run TestRayClusterSDKOauth test
Run TestRayClusterSDKOauth test with Python 3.9

Check warning

Code scanning / Robocop

Not allowed character '{{ character }}' found in {{ block_name }} name Warning test

Not allowed character '.' found in 'Run TestRayClusterSDKOauth test with Python 3.9' test case name

Run TestRayLocalInteractiveOauth test
Run TestRayClusterSDKOauth test with Python 3.11

Check warning

Code scanning / Robocop

Not allowed character '{{ character }}' found in {{ block_name }} name Warning test

Not allowed character '.' found in 'Run TestRayClusterSDKOauth test with Python 3.11' test case name
... Codeflare-sdk
Run Codeflare-SDK Test e2e mnist_raycluster_sdk_oauth_test.py 3.11 ${RAY_IMAGE_3.11}

Run TestRayLocalInteractiveOauth test with Python 3.9

Check warning

Code scanning / Robocop

Not allowed character '{{ character }}' found in {{ block_name }} name Warning test

Not allowed character '.' found in 'Run TestRayLocalInteractiveOauth test with Python 3.9' test case name
... Codeflare-sdk
Run Codeflare-SDK Test e2e local_interactive_sdk_oauth_test.py 3.9 ${RAY_IMAGE_3.9}

Run TestRayLocalInteractiveOauth test with Python 3.11

Check warning

Code scanning / Robocop

Not allowed character '{{ character }}' found in {{ block_name }} name Warning test

Not allowed character '.' found in 'Run TestRayLocalInteractiveOauth test with Python 3.11' test case name
Copy link
Contributor

github-actions bot commented Oct 29, 2024

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass %
564 0 0 564 100

@Srihari1192
Copy link
Contributor Author

Triggered the tests here job/rhoai-test-flow/1088/

@@ -53,9 +54,9 @@ Prepare Codeflare-SDK Test Setup

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

`${result} =    Run Process  virtualenv -p python3.11 ${VIRTUAL_ENV_NAME}`
It should also be updated with ${PYTHON_VERSION}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing this @ChughShilpa.. I think we created this earlier virtual env setup for 3.9 as by default venv 3.11 available in our jenkins.. will update it accordingly

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed virtual env creation steps as we can switch poetry env with existing virtual environment in jenkins , test successfully ran here job/rhoai-test-flow/1109/

@Srihari1192 Srihari1192 marked this pull request as draft October 29, 2024 13:50
Log To Console "Running codeflare-sdk test: ${TEST_NAME}"
${result} = Run Process source ${VIRTUAL_ENV_NAME}/bin/activate && cd ${CODEFLARE-SDK_DIR} && poetry env use 3.11 && poetry install --with test,docs && poetry run pytest -v -s ./tests/${TEST_TYPE}/${TEST_NAME} --timeout\=300 && deactivate
${result} = Run Process cd ${CODEFLARE-SDK_DIR} && poetry env use ${PYTHON_VERSION} && poetry install --with test,docs && poetry run pytest -v -s ./tests/${TEST_TYPE}/${TEST_NAME} --timeout\=400

Check warning

Code scanning / Robocop

Line is too long ({{ line_length }}/{{ allowed_length }}) Warning test

Line is too long (202/120)
@Srihari1192 Srihari1192 force-pushed the RHOAIENG-15006 branch 2 times, most recently from 4c96c4e to 77732b6 Compare October 30, 2024 06:16
@Srihari1192 Srihari1192 marked this pull request as ready for review October 30, 2024 06:18
Copy link
Contributor

@ChughShilpa ChughShilpa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Copy link

sonarqubecloud bot commented Nov 4, 2024

@jiripetrlik jiripetrlik merged commit d28022b into red-hat-data-services:master Nov 4, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants