Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1 from gmfrasca-rhods-dev/fix-dsp-tests
Browse files Browse the repository at this point in the history
Update Data Science Pipelines Tests
  • Loading branch information
rimolive committed Oct 7, 2022
2 parents b692535 + d16cc9a commit fc4d801
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Open Data Hub is an end-to-end AI/ML platform on top of OpenShift Container Plat
* [Thrift Server](thriftserver/README.md)
* [Trino](trino/README.md)
* [ODH Notebook Controller](odh-notebook-controller/README.md)
* [ML Pipelines](ml-pipelines/README.md)
* [Data Science Pipelines](data-science-pipelines/README.md)

## Deploy

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,27 @@ RESOURCEDIR="${MY_DIR}/../resources"
os::test::junit::declare_suite_start "$MY_SCRIPT"

function check_resources() {
header "Testing ML pipelines installation"
header "Testing Data Science Pipelines installation"
os::cmd::expect_success "oc project ${ODHPROJECT}"
os::cmd::try_until_text "oc get crd pipelineruns.tekton.dev " "pipelineruns.tekton.dev" $odhdefaulttimeout $odhdefaultinterval
os::cmd::try_until_text "oc get pods -l application-crd-id=kubeflow-pipelines --field-selector='status.phase!=Running,status.phase!=Completed' -o jsonpath='{$.items[*].metadata.name}' | wc -w" "0" $odhdefaulttimeout $odhdefaultinterval
running_pods=$(oc get pods -l application-crd-id=kubeflow-pipelines --field-selector='status.phase=Running' -o jsonpath='{$.items[*].metadata.name}' | wc -w)
os::cmd::try_until_text "oc get pods -l application-crd-id=data-science-pipelines --field-selector='status.phase!=Running,status.phase!=Completed' -o jsonpath='{$.items[*].metadata.name}' | wc -w" "0" $odhdefaulttimeout $odhdefaultinterval
running_pods=$(oc get pods -l application-crd-id=data-science-pipelines --field-selector='status.phase=Running' -o jsonpath='{$.items[*].metadata.name}' | wc -w)
os::cmd::expect_success "if [ "$running_pods" -gt "0" ]; then exit 0; else exit 1; fi"
}

function check_ui_overlay() {
header "Checking UI overlay Kfdef deploys the UI"
os::cmd::try_until_text "oc get pods -l app=ml-pipeline-ui --field-selector='status.phase=Running' -o jsonpath='{$.items[*].metadata.name}' | wc -w" "1" $odhdefaulttimeout $odhdefaultinterval
os::cmd::try_until_text "oc get pods -l app=ds-pipeline-ui --field-selector='status.phase=Running' -o jsonpath='{$.items[*].metadata.name}' | wc -w" "1" $odhdefaulttimeout $odhdefaultinterval
}

function create_pipeline() {
header "Creating a pipeline"
route=`oc get route ml-pipeline || echo ""`
route=`oc get route ds-pipeline || echo ""`
if [[ -z $route ]]; then
oc expose service ml-pipeline
oc expose service ds-pipeline
fi
ROUTE=$(oc get route ml-pipeline --template={{.spec.host}})
PIPELINE_ID=$(curl -s -F "uploadfile=@${RESOURCEDIR}/ml-pipelines/test-pipeline-run.yaml" ${ROUTE}/apis/v1beta1/pipelines/upload | jq -r .id)
ROUTE=$(oc get route ds-pipeline --template={{.spec.host}})
PIPELINE_ID=$(curl -s -F "uploadfile=@${RESOURCEDIR}/ds-pipelines/test-pipeline-run.yaml" ${ROUTE}/apis/v1beta1/pipelines/upload | jq -r .id)
os::cmd::try_until_not_text "curl -s ${ROUTE}/apis/v1beta1/pipelines/${PIPELINE_ID} | jq" "null" $odhdefaulttimeout $odhdefaultinterval
}

Expand Down Expand Up @@ -94,6 +94,6 @@ setup_monitoring
test_metrics
delete_runs
delete_pipeline
oc delete route ml-pipeline
oc delete route ds-pipeline

os::test::junit::declare_suite_end
12 changes: 7 additions & 5 deletions tests/setup/kfctl_openshift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,18 @@ spec:
name: odh-notebook-controller
- kustomizeConfig:
overlays:
- metadata-store-mysql
- ml-pipeline-ui
- metadata-store-mariadb
- ds-pipeline-ui
- object-store-minio
repoRef:
name: manifests
path: ml-pipelines
name: ml-pipelines
name: prototype
path: data-science-pipelines
name: data-science-pipelines
repos:
- name: kf-manifests
uri: https://github.com/opendatahub-io/manifests/tarball/master
- name: manifests
uri: https://github.com/opendatahub-io/odh-manifests/tarball/master
- name: prototype
uri: https://github.com/rimolive/odh-manifests/tarball/rmartine-upstream
version: master

0 comments on commit fc4d801

Please sign in to comment.