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

RHOAIENG-4720 -Add an integration test that runs iris pipeline to completion #621

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

VaniHaripriya
Copy link
Contributor

The issue resolved by this Pull Request:

Resolves RHOAIENG-4720

Description of your changes:

Adding Integration tests to create an iris pipeline run and testing its successful completion.

Testing instructions

Please follow the instructions from here to run the integration tests.

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

@amadhusu amadhusu left a comment

Choose a reason for hiding this comment

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

Nice job, this works as advertised as it tested the sample iris pipeline running successfully.

test suite logs
$ make integrationtest  K8SAPISERVERHOST=${TARGET_CLUSTER}  DSPANAMESPACE=${TARGET_NAMESPACE}  KUBECONFIGPATH=${KUBECONFIG_PATH}
cd tests && \
go test ./... --tags=test_integration -v -kubeconfig=/home/amadhusu/.kube/config -k8sApiServerHost=https://api.amadhusu-2.dev.datahub.redhat.com:6443 -DSPANamespace=test-project -DSPAPath=resources/dspa-lite.yaml
?   	github.com/opendatahub-io/data-science-pipelines-operator/tests/util	[no test files]
=== RUN   TestIntegrationTestSuite
2024-04-06T01:24:31+05:30	INFO	Deploying DSPA...
2024-04-06T01:24:31+05:30	INFO	Waiting for DSPA pods to ready...
2024-04-06T01:25:52+05:30	INFO	DSPA Deployed.
2024-04-06T01:25:52+05:30	INFO	Setting up Portforwarding service.
Forwarding service: ds-pipeline-test-dspa to pod ds-pipeline-test-dspa-69d4689577-qjb4w ...
Forwarding from 127.0.0.1:8888 -> 8888
Forwarding from [::1]:8888 -> 8888
2024-04-06T01:25:53+05:30	INFO	Portforwarding service Successfully set up.
=== RUN   TestIntegrationTestSuite/TestAPIServerDeployment
=== RUN   TestIntegrationTestSuite/TestAPIServerDeployment/Should_successfully_fetch_pipelines
Handling connection for 8888
2024-04-06T01:25:54+05:30	INFO	{"pipelines":[{"pipeline_id":"1d97e090-eec5-4623-8a83-ae5d9ed47796","display_name":"[Demo] iris-training","description":"[source code](https://github.com/opendatahub-io/data-science-pipelines/tree/master/samples/iris-sklearn) A simple pipeline to demonstrate a basic ML Training workflow","created_at":"2024-04-05T19:55:45Z"}],"total_size":1}
=== RUN   TestIntegrationTestSuite/TestAPIServerDeployment/Should_successfully_upload_a_pipeline
2024-04-06T01:25:55+05:30	INFO	{"pipeline_id":"4ff97970-cf6e-4955-a0b6-6befa55b2c5d","display_name":"test-pipeline-run.yaml","created_at":"2024-04-05T19:55:55Z"}
=== RUN   TestIntegrationTestSuite/TestDSPADeployment
=== RUN   TestIntegrationTestSuite/TestDSPADeployment/with_default_MariaDB_and_Minio
=== RUN   TestIntegrationTestSuite/TestDSPADeployment/with_default_MariaDB_and_Minio/should_have_8_pods
=== RUN   TestIntegrationTestSuite/TestDSPADeployment/with_default_MariaDB_and_Minio/should_have_a_ready_ds-pipeline-test-dspa_deployment
=== RUN   TestIntegrationTestSuite/TestDSPADeployment/with_default_MariaDB_and_Minio/should_have_a_ready_ds-pipeline-persistenceagent-test-dspa_deployment
=== RUN   TestIntegrationTestSuite/TestDSPADeployment/with_default_MariaDB_and_Minio/should_have_a_ready_ds-pipeline-scheduledworkflow-test-dspa_deployment
=== RUN   TestIntegrationTestSuite/TestDSPADeployment/with_default_MariaDB_and_Minio/should_have_a_ready_mariadb-test-dspa_deployment
=== RUN   TestIntegrationTestSuite/TestDSPADeployment/with_default_MariaDB_and_Minio/should_have_a_ready_minio-test-dspa_deployment
=== RUN   TestIntegrationTestSuite/TestFetchExperiments
=== RUN   TestIntegrationTestSuite/TestFetchExperiments/Should_successfully_fetch_experiments
2024-04-06T01:25:59+05:30	INFO	{"experiments":[{"experiment_id":"a6b7d9cb-8bd5-48f9-bd7a-cf84aca9f90e","display_name":"Default","description":"All runs created without specifying an experiment will be grouped here.","created_at":"2024-04-05T19:55:47Z","storage_state":"AVAILABLE"}],"total_size":1}
=== RUN   TestIntegrationTestSuite/TestPipelineSuccessfulRun
=== RUN   TestIntegrationTestSuite/TestPipelineSuccessfulRun/Should_create_a_Pipeline_Run
2024-04-06T01:26:01+05:30	INFO	{"experiment_id":"a6b7d9cb-8bd5-48f9-bd7a-cf84aca9f90e","run_id":"45fb6e04-b2e2-438e-bf52-05f7ad4b4fad","display_name":"iris-pipeline","storage_state":"AVAILABLE","pipeline_version_reference":{"pipeline_id":"1d97e090-eec5-4623-8a83-ae5d9ed47796","pipeline_version_id":"a721471b-d6b2-4736-833b-52d5dc0d95b7"},"service_account":"pipeline-runner-test-dspa","created_at":"2024-04-05T19:55:59Z","scheduled_at":"2024-04-05T19:55:59Z","finished_at":"1970-01-01T00:00:00Z","state":"PENDING","state_history":[{"update_time":"2024-04-05T19:56:01Z","state":"PENDING"}]}
=== RUN   TestIntegrationTestSuite/TestPipelineSuccessfulRun/Should_successfully_complete_the_Pipeleine_Run
=== RUN   TestIntegrationTestSuite/TestPipelineSuccessfulRun/Should_successfully_complete_the_Pipeleine_Run/should_have_7_pods
--- PASS: TestIntegrationTestSuite (393.92s)
    --- PASS: TestIntegrationTestSuite/TestAPIServerDeployment (2.03s)
        --- PASS: TestIntegrationTestSuite/TestAPIServerDeployment/Should_successfully_fetch_pipelines (0.98s)
        --- PASS: TestIntegrationTestSuite/TestAPIServerDeployment/Should_successfully_upload_a_pipeline (1.05s)
    --- PASS: TestIntegrationTestSuite/TestDSPADeployment (2.35s)
        --- PASS: TestIntegrationTestSuite/TestDSPADeployment/with_default_MariaDB_and_Minio (2.35s)
            --- PASS: TestIntegrationTestSuite/TestDSPADeployment/with_default_MariaDB_and_Minio/should_have_8_pods (0.92s)
            --- PASS: TestIntegrationTestSuite/TestDSPADeployment/with_default_MariaDB_and_Minio/should_have_a_ready_ds-pipeline-test-dspa_deployment (0.27s)
            --- PASS: TestIntegrationTestSuite/TestDSPADeployment/with_default_MariaDB_and_Minio/should_have_a_ready_ds-pipeline-persistenceagent-test-dspa_deployment (0.27s)
            --- PASS: TestIntegrationTestSuite/TestDSPADeployment/with_default_MariaDB_and_Minio/should_have_a_ready_ds-pipeline-scheduledworkflow-test-dspa_deployment (0.27s)
            --- PASS: TestIntegrationTestSuite/TestDSPADeployment/with_default_MariaDB_and_Minio/should_have_a_ready_mariadb-test-dspa_deployment (0.27s)
            --- PASS: TestIntegrationTestSuite/TestDSPADeployment/with_default_MariaDB_and_Minio/should_have_a_ready_minio-test-dspa_deployment (0.36s)
    --- PASS: TestIntegrationTestSuite/TestFetchExperiments (1.13s)
        --- PASS: TestIntegrationTestSuite/TestFetchExperiments/Should_successfully_fetch_experiments (1.13s)
    --- PASS: TestIntegrationTestSuite/TestPipelineSuccessfulRun (303.43s)
        --- PASS: TestIntegrationTestSuite/TestPipelineSuccessfulRun/Should_create_a_Pipeline_Run (1.97s)
        --- PASS: TestIntegrationTestSuite/TestPipelineSuccessfulRun/Should_successfully_complete_the_Pipeleine_Run (1.45s)
            --- PASS: TestIntegrationTestSuite/TestPipelineSuccessfulRun/Should_successfully_complete_the_Pipeleine_Run/should_have_7_pods (1.45s)
PASS
ok  	github.com/opendatahub-io/data-science-pipelines-operator/tests	393.947s

Copy link
Member

@DharmitD DharmitD left a comment

Choose a reason for hiding this comment

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

Checked CI output to make sure pipeline run goes through.
/lgtm
Great work!

tests/util/rest.go Outdated Show resolved Hide resolved
tests/util/rest.go Outdated Show resolved Hide resolved
tests/util/rest.go Outdated Show resolved Hide resolved
tests/util/rest.go Outdated Show resolved Hide resolved
@openshift-ci openshift-ci bot removed the lgtm label Apr 10, 2024
@VaniHaripriya VaniHaripriya force-pushed the RHOAIENG-4720 branch 2 times, most recently from f617f65 to 860c0e0 Compare April 10, 2024 19:15
@VaniHaripriya VaniHaripriya changed the title Add an integration test that runs iris pipeline to completion RHOAIENG-4720 -Add an integration test that runs iris pipeline to completion Apr 11, 2024
tests/util/rest.go Outdated Show resolved Hide resolved
tests/util/rest.go Outdated Show resolved Hide resolved
Copy link
Contributor

@hbelmiro hbelmiro left a comment

Choose a reason for hiding this comment

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

@VaniHaripriya I left a few nitpick suggestions.

tests/pipeline_runs_test.go Outdated Show resolved Hide resolved
tests/pipeline_runs_test.go Outdated Show resolved Hide resolved
tests/util/rest.go Outdated Show resolved Hide resolved
Copy link
Contributor

@amadhusu amadhusu left a comment

Choose a reason for hiding this comment

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

No nitpicks from my side. Looks good again!

tests/util/rest.go Outdated Show resolved Hide resolved
tests/util/rest.go Outdated Show resolved Hide resolved
@openshift-ci openshift-ci bot removed the lgtm label Apr 24, 2024
Fix pre-commit issue

Updated test

Update test

Paremeterize Pipeline display name

Update nitpick suggestions

Update test
@HumairAK
Copy link
Contributor

/lgtm
/approve

@HumairAK HumairAK merged commit 017e6a5 into opendatahub-io:main Apr 30, 2024
4 of 5 checks passed
@openshift-ci openshift-ci bot added the lgtm label Apr 30, 2024
Copy link
Contributor

openshift-ci bot commented Apr 30, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: amadhusu, HumairAK

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

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.

5 participants