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

Support environment variables as parameter #704

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

diegolovison
Copy link
Contributor

@diegolovison diegolovison commented Sep 19, 2024

The issue resolved by this Pull Request:

Break down the solution for #RHOAIENG-10212 into smaller PRs to facilitate review.

Description of your changes:

  • Introducing the CLEANUP flag allows for optional resource cleanup before the tests. Useful while retrying the test in the OpenShift environment. The final cleanup solution will be discussed in other PR.
  • The K8SAPISERVERHOST variable provides more flexibility, enabling it to be set via a command line argument, rather than being hardcoded within the test functions."
  • Removed DSPA_NAME and DSPA_EXTERNAL_NAME as redundant variables, simplifying namespace handling by directly using DSPA_NAMESPACE and DSPA_EXTERNAL_NAMESPACE. This removes unnecessary duplication.
  • Replaced the use of kubectl whoami --show-server for K8SAPISERVERHOST in the run_tests and run_tests_dspa_external_connections functions. This allows the user to define K8SAPISERVERHOST explicitly via command line arguments, offering better control over the testing environment, especially for air-gapped setups.
  • Added deletion for DSPA_NAMESPACE and DSPA_EXTERNAL_NAMESPACE during the resource cleanup process. Ensures that all test-related namespaces are properly cleaned up.
  • Renamed run_kind_tests to setup_kind_requirements and run_rhoai_tests to setup_rhoai_requirements. This better reflects their functionality as preparation steps rather than test execution steps. Testing is now decoupled from resource setup.
  • Added support for new CLI options like --cleanup, --k8s-api-server-host, --dspa-namespace, and --dspa-path. This allows users to customize their test environments more dynamically when running the script.

Testing instructions

==============================================================================
[ WARN ] No Prometheus namespace found
Run Data Science Pipelines Operator Integration Tests :: Run Data ... | PASS |
------------------------------------------------------------------------------
Tests.Data Science Pipelines.Test-Run-Data-Science-Pipelines-Opera... | PASS |
1 test, 1 passed, 0 failed
==============================================================================
Tests.Data Science Pipelines                                          | PASS |
1 test, 1 passed, 0 failed
==============================================================================
Tests                                                                 | PASS |
1 test, 1 passed, 0 failed
==============================================================================

Checklist

  • 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

Copy link
Contributor

openshift-ci bot commented Sep 19, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@VaniHaripriya
Copy link
Contributor

/verified
/lgtm
Looks good to me, also verified the changes by running the provided command in the cluster where RHOAI is installed, and all the tests passed successfully.

Tests.Data Science Pipelines.Test-Run-Data-Science-Pipelines-Operator-E2E-T...
==============================================================================
[ WARN ] No Prometheus namespace found
Run Data Science Pipelines Operator Integration Tests :: Run Data ... | PASS |
------------------------------------------------------------------------------
Tests.Data Science Pipelines.Test-Run-Data-Science-Pipelines-Opera... | PASS |
1 test, 1 passed, 0 failed
==============================================================================
Tests.Data Science Pipelines                                          | PASS |
1 test, 1 passed, 0 failed
==============================================================================
Tests                                                                 | PASS |
1 test, 1 passed, 0 failed
==============================================================================

@rimolive
Copy link
Contributor

/lgtm

@rimolive
Copy link
Contributor

/approve

Copy link
Contributor

openshift-ci bot commented Sep 23, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rimolive

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-merge-bot openshift-merge-bot bot merged commit b81616c into opendatahub-io:main Sep 23, 2024
6 checks passed
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.

3 participants