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

Add more test cases for R Studio notebook #392

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

atheo89
Copy link
Member

@atheo89 atheo89 commented Jan 31, 2024

Description

This is an enhancement on the test framework for RStudio notebook.

The new tests include:

  • Create, save, and execute R script.
  • Evaluate if can be download R package

How Has This Been Tested?

  1. Copy your login cmd from your ocp cluster to your terminal
  2. Run make rstudio-c9s-python-3.9 -e IMAGE_REGISTRY=quay.io/${YOUR_QUAY_USER}/workbench-images
  3. Run make deploy-c9s-rstudio-c9s-python-3.9
  4. Give a bit of time till the pod be in running status and run make validate-rstudio-image image=rstudio-c9s-python-3.9-2023b_20230129 (check to be the correct tag)
  5. Once you evaluate/enhance the testing run make undeploy-c9s-rstudio-c9s-python-3.9 to destroy the testing pod

Bellow are are the logs from the make validate-rstudio-image image=rstudio-c9s-python-3.9-2023b_20230129 execution:

# Running tests for  RStudio image...
bin/kubectl wait --for=condition=ready pod rstudio-pod --timeout=300s
pod/rstudio-pod condition met
=> Checking container image rstudio-c9s-python-3.9-2023b_20230129 for package intallation...
Tinytex installation successful!
=> Checking container image rstudio-c9s-python-3.9-2023b_20230129 for curl...
curl executed successfuly!
=> Checking container image rstudio-c9s-python-3.9-2023b_20230129 for python...
python executed successfuly!
=> Checking container image rstudio-c9s-python-3.9-2023b_20230129 for oc...
oc executed successfuly!
=> Checking container image rstudio-c9s-python-3.9-2023b_20230129 for /usr/lib/rstudio-server/bin/rserver...
/usr/lib/rstudio-server/bin/rserver executed successfuly!
=> Creating R file and executing on the container...
R script executed successfully!

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

@openshift-ci openshift-ci bot requested review from dibryant and harshad16 January 31, 2024 09:23
@jiridanek
Copy link
Member

General workflow suggestion: What's the point of having a How Has This Been Tested? docs on test PRs?

Since we care whether the tests run in CI or not, I think the most practical way to test tests is to create a PR, wait for CI to run the added tests, and then add a link to the test report from the CI.

The instructions on how to run tests locally on your own machine should be in a .md file in the repository, not repeated every time on every PR.

@atheo89
Copy link
Member Author

atheo89 commented Jan 31, 2024

General workflow suggestion: What's the point of having a How Has This Been Tested? docs on test PRs?

Since we care whether the tests run in CI or not, I think the most practical way to test tests is to create a PR, wait for CI to run the added tests, and then add a link to the test report from the CI.

The instructions on how to run tests locally on your own machine should be in a .md file in the repository, not repeated every time on every PR.

We need enhancements for sure! However, this section serves as a mandatory requirement for the developer to document the testing process steps. It is crucial to provide clear instructions to the reviewer, ensuring they can easily catch up and replicate the pull request on their end.

@jiridanek
Copy link
Member

We need enhancements for sure! However, this section serves as a mandatory requirement for the developer to document the testing process steps.

Sure, but since what you are adding here are automated test scripts, it seems unproductive to me to repeatedly document the steps needed for their execution in every PR raised. This should be done once, in a https://github.com/opendatahub-io/notebooks/blob/main/docs/developer-guide.md or a separate document linked to it, and then it can be referenced as needed.

Besides, what is important is not checking that the tests run as expected on people's laptops, but that the tests run on the CI. Reviewers should not need to manually repeat automated tests that the CI is already running. (CI is running this, I hope).

Copy link
Member

@harshad16 harshad16 left a comment

Choose a reason for hiding this comment

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

Great work,
one small comment

Copy link
Contributor

openshift-ci bot commented Feb 9, 2024

@jiridanek: changing LGTM is restricted to collaborators

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Member

@harshad16 harshad16 left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

thanks 💯

Copy link
Contributor

openshift-ci bot commented Feb 9, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: harshad16, jiridanek

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

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved label Feb 9, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 395be20 into opendatahub-io:main Feb 9, 2024
6 checks passed
@harshad16 harshad16 mentioned this pull request Feb 23, 2024
7 tasks
@harshad16
Copy link
Member

/cherrypick 2023b

@openshift-cherrypick-robot

@harshad16: new pull request created: #424

In response to this:

/cherrypick 2023b

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

harshad16 added a commit to harshad16/odh-notebooks that referenced this pull request Oct 4, 2024
* Update file via digest-updater-11184497402 GitHub action

* Fix the runtime-image to be referenced from modh repos

Signed-off-by: Harshad Reddy Nalla <[email protected]>

---------

Signed-off-by: Harshad Reddy Nalla <[email protected]>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Harshad Reddy Nalla <[email protected]>
@atheo89 atheo89 deleted the rstudio-test branch October 23, 2024 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants