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] the Verify Notebook Has Not Restarted upgrade test #2173

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

jstourac
Copy link
Member

@jstourac jstourac commented Jan 13, 2025

This refactores this test - the first test part is moved to "pre_upgrade" phase, because this phase is run on the pre-upgrade version with the pre-upgrade code-base (branch). This is crucial since the further phases will be run with the code-base of the upgraded product and we may hit some issues in the differences in the product otherwise.

There are done other changes and fixes to the test to make it more robust including the notebook deletion in the post upgrade phase.

Apart from that, to propagate the timestamp value between the phases, this introduces a configmap in the "upgrade" namespace, where we can put some context that should be passed to the followup phase.

https://issues.redhat.com/browse/RHOAIENG-14840


At the moment I don't delete the created Config Map anywhere. We can discuss whether and when to do so eventually.


CI: tested locally on my machine with following steps:

  1. Installed RHOAI 2.16.0
  2. Run the pre_upgrade test (solely the Long Running Jupyter Notebook test only) - using releases/2.16.0 with this backported - see [2.16][fix] the Verify Notebook Has Not Restarted upgrade test #2174
  3. Performed the upgrade to 2.17 nightly build (manually)
  4. Run the post_upgrade test (solely the Verify Notebook Has Not Restarted test only) - using this branch which is based on master

Jenkins runs:

  • rhoai-test-flow/2352/ - PreUpgrade
  • rhoai-test-flow/2353/ - PostUpgrade

@jstourac jstourac requested review from jiridanek and kobihk January 13, 2025 09:43
@jstourac jstourac self-assigned this Jan 13, 2025

# Get the notebook pod creation timestamp
${notebook_pod_name}= Set Variable jupyter-nb-ldap-2dadmin2-0
${return_code} ${ntb_creation_timestamp} = Run And Return Rc And Output

Check warning

Code scanning / Robocop

The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning test

The assignment sign is not consistent within the file. Expected '=' but got ' =' instead
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

Check warning

Code scanning / Robocop

The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning test

The assignment sign is not consistent within the file. Expected '=' but got ' =' instead
${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}
${return_code} ${cmd_output} = Run And Return Rc And Output

Check warning

Code scanning / Robocop

The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning test

The assignment sign is not consistent within the file. Expected '=' but got ' =' instead
Copy link
Contributor

github-actions bot commented Jan 13, 2025

Robot Results

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

jiridanek
jiridanek previously approved these changes Jan 13, 2025
jiridanek
jiridanek previously approved these changes Jan 13, 2025
@openshift-ci openshift-ci bot added the lgtm label Jan 13, 2025
kobihk
kobihk previously approved these changes Jan 14, 2025
This refactores this test - the first test part is moved to "pre_upgrade"
phase, because this phase is run on the pre-upgrade version with the
pre-upgrade code-base (branch). This is crucial since the further phases
will be run with the code-base of the upgraded product and we may hit
some issues in the differences in the product otherwise.

There are done other changes and fixes to the test to make it more
robust including the notebook deletion in the post upgrade phase.

Apart from that, to propagate the timestamp value between the phases,
this introduces a configmap in the "upgrade" namespace, where we can put
some context that should be passed to the followup phase.
@jstourac jstourac dismissed stale reviews from kobihk and jiridanek via 0b50a42 January 15, 2025 11:26
@openshift-ci openshift-ci bot removed the lgtm label Jan 15, 2025
@@ -178,10 +178,9 @@
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)

Check warning

Code scanning / Robocop

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

Line is too long (131/120)
[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

Check warning

Code scanning / Robocop

The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning test

The assignment sign is not consistent within the file. Expected '=' but got ' =' instead
# robocop:disable
[Documentation] Verify Notebook pod has not restarted after the upgrade
[Tags] Upgrade
${notebook_name}= Get User CR Notebook Name ${TEST_USER2.USERNAME}

Check warning

Code scanning / Robocop

The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning test

The assignment sign is not consistent within the file. Expected '' but got '=' instead
[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}

Check warning

Code scanning / Robocop

The assignment sign is not consistent within the file. Expected '{{ expected_sign }}' but got '{{ actual_sign }}' instead Warning test

The assignment sign is not consistent within the file. Expected '' but got '=' instead
@openshift-ci openshift-ci bot added the lgtm label Jan 15, 2025
@jstourac jstourac enabled auto-merge (rebase) January 15, 2025 15:49
@jstourac jstourac added verified This PR has been tested with Jenkins enhancements Bugfixes, enhancements, refactoring, ... in tests or libraries (PR will be listed in release-notes) labels Jan 15, 2025
@jstourac jstourac merged commit 930e0e9 into red-hat-data-services:master Jan 15, 2025
11 of 12 checks passed
Copy link

openshift-ci bot commented Jan 15, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jiridanek, jstourac, kobihk

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jstourac jstourac deleted the fixUpgradeTests branch January 16, 2025 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancements Bugfixes, enhancements, refactoring, ... in tests or libraries (PR will be listed in release-notes) lgtm verified This PR has been tested with Jenkins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants