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: Jupyuterhub, workbench and model serving related tests #971

Merged
merged 32 commits into from
Oct 27, 2023

Conversation

FedeAlonso
Copy link
Contributor

@FedeAlonso FedeAlonso commented Oct 9, 2023

Refactor the tests in order to make it work with the new Accelerators UI

Previously: Users just need to set the number of GPUs from a dropdown.
Now: User first set the technology (Accelerator) which is going to use and then set the number of GPU units.

Affected forms:

  • Jupyter Notebook
  • Workbench
  • Model Serving

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Robocop found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2023

Robot Results

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

@FedeAlonso FedeAlonso changed the title fix: Jupyuterhub related tests fix: Jupyuterhub, workbench and servers related tests Oct 17, 2023
@FedeAlonso FedeAlonso changed the title fix: Jupyuterhub, workbench and servers related tests fix: Jupyuterhub, workbench and model serving related tests Oct 17, 2023
@FedeAlonso FedeAlonso requested review from lugi0 and bdattoma October 17, 2023 16:01
@FedeAlonso FedeAlonso added needs testing Needs to be tested in Jenkins ⚠️ high priority review I need this to be reviewed ASAP labels Oct 17, 2023
@FedeAlonso FedeAlonso marked this pull request as ready for review October 17, 2023 16:01
…-hat-data-services/ods-ci into fix/refactor_jupyter_nb_accelerators
${KFNBC_ACCELERATOR_INPUT_XPATH} = //input[@aria-label='Number of accelerators']
${KFNBC_ACCELERATOR_LESS_BUTTON_XPATH} = ${KFNBC_ACCELERATOR_INPUT_XPATH}/preceding-sibling::button
${KFNBC_ACCELERATOR_PLUS_BUTTON_XPATH} = ${KFNBC_ACCELERATOR_INPUT_XPATH}/following-sibling::button
${KFNBC_MAX_ACCELERATOR_WARNING_XPATH} = //div[@aria-label='Warning Alert']//h4[contains(text(), 'accelerator detected')]

Check warning

Code scanning / Robocop

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

Line is too long (124/120)
${WORKBENCH_SIZE_MENU_BTN_XP}= xpath=//section[@id="deployment-size"]//button # Removing the attribute in case it changes like it did for the image dropdown
${WORKBENCH_SIZE_SIDE_MENU_BTN}= xpath=//nav[@aria-label="Jump to section"]//span[text()="Deployment size"]
${WORKBENCH_ACCELERATOR_DROPDOWN_XPATH}= xpath=//label[@for='modal-notebook-accelerator']/ancestor::div[@class='pf-c-form__group']/descendant::button

Check warning

Code scanning / Robocop

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

Line is too long (152/120)
Click Element ${WORKBENCH_SIZE_SIDE_MENU_BTN}
Wait Until Page Contains Element ${WORKBENCH_ACCELERATOR_DROPDOWN_XPATH}
Click Element ${WORKBENCH_ACCELERATOR_DROPDOWN_XPATH}
IF "${gpus}" == "0"

Check notice

Code scanning / Robocop

Variable '{{ name }}' in '{{ block_name }}' condition has unnecessary string conversion Note test

Variable '${gpus}' in 'IF' condition has unnecessary string conversion
${GPU_SECTION_PLUS}= ${GPU_SECTION_TITLE}/../../..//button[@aria-label="Plus"]
${GPU_SECTION_MINUS}= ${GPU_SECTION_TITLE}/../../..//button[@aria-label="Minus"]

${SERVING_ACCELERATOR_DROPDOWN_XPATH}= xpath=//label[@for='modal-notebook-accelerator']/ancestor::div[@class='pf-c-form__group']/descendant::button

Check warning

Code scanning / Robocop

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

Line is too long (150/120)
Page Should Contain Element xpath://span[.="${server_name}"]/../../../..//span[.="Number of GPUs"]/../../dd/div[.="${no_gpus}"]
Click Element ${SERVING_MODEL_SERVERS_SIDE_MENU}
Sleep 5s reason=wait for ten second until operator goes into init state
${current_accs}= Get Text xpath://span[text()="${server_name}"]/../../../following-sibling::tr//td[@data-label]/div/dl/div[4]/dd/div

Check warning

Code scanning / Robocop

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

Line is too long (138/120)
${maxGPUs} = Get Text xpath://li[@class="pf-c-select__menu-wrapper"][last()]/button
${maxGPUs} = Convert To Integer ${maxGPUs}
Set NVidia GPU Accelerator
${max_operator_detected} = Run Keyword And Return Status Page Should Contain Element xpath=${KFNBC_MAX_ACCELERATOR_WARNING_XPATH}

Check warning

Code scanning / Robocop

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

Line is too long (143/120)
${max_operator_detected} = Run Keyword And Return Status Page Should Contain Element xpath=${KFNBC_MAX_ACCELERATOR_WARNING_XPATH}
WHILE not ${max_operator_detected}
Click Element xpath:${KFNBC_ACCELERATOR_PLUS_BUTTON_XPATH}
${max_operator_detected} = Run Keyword And Return Status Page Should Contain Element xpath=${KFNBC_MAX_ACCELERATOR_WARNING_XPATH}

Check warning

Code scanning / Robocop

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

Line is too long (146/120)
lugi0
lugi0 previously approved these changes Oct 18, 2023
Copy link
Contributor

@lugi0 lugi0 left a comment

Choose a reason for hiding this comment

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

LGTM, when we have a full clean run we can merge

@FedeAlonso
Copy link
Contributor Author

FedeAlonso commented Oct 18, 2023

I have runned the rhods-ci-pr-test pipeline (2052) and all GPU resources related tests has gone Green/
Also, the tests with multiple GPUs has been executed in job 2053

lugi0
lugi0 previously approved these changes Oct 25, 2023
@FedeAlonso FedeAlonso dismissed stale reviews from lugi0, bdattoma, and diegolovison via bec218e October 25, 2023 13:34
bdattoma
bdattoma previously approved these changes Oct 26, 2023
@FedeAlonso
Copy link
Contributor Author

I have runned the rhods-ci-pr-test pipeline (2071) and all GPU resources related tests has gone Green.
Also, the tests with multiple GPUs has been executed in job 2078

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@FedeAlonso FedeAlonso added verified This PR has been tested with Jenkins and removed needs testing Needs to be tested in Jenkins labels Oct 27, 2023
@lugi0 lugi0 merged commit d337f66 into master Oct 27, 2023
11 of 12 checks passed
jgarciao pushed a commit to jgarciao/ods-ci that referenced this pull request Nov 6, 2023
…data-services#971)

* fix minimal-cuda-test

* fix workbenches

* fix model serving

* Linter fixes

* PR Fixes

* PR fixes

* fix PR comment: Generic accelerator setter

* Add a rerun migration for accelerators in gpu deploy script

* PR fixes

* Update ods_ci/tasks/Resources/Provisioning/GPU/gpu_deploy.sh

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update ods_ci/tasks/Resources/Provisioning/GPU/gpu_deploy.sh

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update ods_ci/tasks/Resources/Provisioning/GPU/gpu_deploy.sh

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* PR fixes

* delete one pod instead the complete dashboard replica set

* Pod deletion more clean and smart

* modify delete dashboard error message

* Rollback restart instead of pod deletion

* fix typo in variable in workbenches

* Delete unused variables in gpu_deploy script

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ChughShilpa pushed a commit to ChughShilpa/ods-ci that referenced this pull request Nov 28, 2023
…data-services#971)

* fix minimal-cuda-test

* fix workbenches

* fix model serving

* Linter fixes

* PR Fixes

* PR fixes

* fix PR comment: Generic accelerator setter

* Add a rerun migration for accelerators in gpu deploy script

* PR fixes

* Update ods_ci/tasks/Resources/Provisioning/GPU/gpu_deploy.sh

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update ods_ci/tasks/Resources/Provisioning/GPU/gpu_deploy.sh

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update ods_ci/tasks/Resources/Provisioning/GPU/gpu_deploy.sh

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* PR fixes

* delete one pod instead the complete dashboard replica set

* Pod deletion more clean and smart

* modify delete dashboard error message

* Rollback restart instead of pod deletion

* fix typo in variable in workbenches

* Delete unused variables in gpu_deploy script

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ChughShilpa pushed a commit to ChughShilpa/ods-ci that referenced this pull request Jan 2, 2024
…data-services#971)

* fix minimal-cuda-test

* fix workbenches

* fix model serving

* Linter fixes

* PR Fixes

* PR fixes

* fix PR comment: Generic accelerator setter

* Add a rerun migration for accelerators in gpu deploy script

* PR fixes

* Update ods_ci/tasks/Resources/Provisioning/GPU/gpu_deploy.sh

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update ods_ci/tasks/Resources/Provisioning/GPU/gpu_deploy.sh

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update ods_ci/tasks/Resources/Provisioning/GPU/gpu_deploy.sh

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* PR fixes

* delete one pod instead the complete dashboard replica set

* Pod deletion more clean and smart

* modify delete dashboard error message

* Rollback restart instead of pod deletion

* fix typo in variable in workbenches

* Delete unused variables in gpu_deploy script

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@bdattoma bdattoma deleted the fix/refactor_jupyter_nb_accelerators branch May 29, 2024 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
verified This PR has been tested with Jenkins ⚠️ high priority review I need this to be reviewed ASAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants