pipelines/test
Connor McCarthy 2009dfb2f1
test(sdk): add `kfp-kubernetes` execution tests (#10304)
2023-12-15 22:31:54 +00:00
..
api-integration-test test: pin an older golang image in building presubmit test images. Fixes #9650 (#9648) 2023-06-17 07:10:37 +00:00
cloudbuild MetadataStore: Update to release metadata-envoy in each release (#4026) 2020-06-23 19:07:17 -07:00
frontend-integration-test test(frontend): Improve v1 frontend-integration-test (#9811) 2023-08-08 21:16:33 +00:00
gcpc-tests fix(sdk): fix GCPC break in KFP SDK (#9791) 2023-07-27 23:02:32 +00:00
imagebuilder Assigned copyright to the project authors (#5587) 2021-05-05 13:53:22 +08:00
images update doc (#3151) 2020-02-24 09:24:48 -08:00
initialization-test test: pin an older golang image in building presubmit test images. Fixes #9650 (#9648) 2023-06-17 07:10:37 +00:00
kfp-functional-test test: enabe back archiving experiment action in kfp_functional_test (#9748) 2023-08-15 10:07:16 -07:00
kfp-kubernetes-execution-tests test(sdk): add `kfp-kubernetes` execution tests (#10304) 2023-12-15 22:31:54 +00:00
manifests chore: upgrade to Argo v3.3.10 (#9336) 2023-05-08 08:38:55 +00:00
release fix(release): Update release image with the latest api-generator (#9198) 2023-04-21 16:34:41 +00:00
sample-test test: upgrade e2e sample tests to using sdk v2 (#9885) 2023-08-17 09:33:38 +00:00
scripts [Testing] Reduce flakiness caused by iam bindings (#3008) 2020-02-07 00:05:43 -08:00
sdk-execution-tests feat(sdk): support a Pythonic artifact authoring style (#9932) 2023-10-19 18:49:58 +00:00
tools chore(test): create test cluster in us-west1-b (#8821) 2023-02-07 11:53:56 -08:00
.gitignore Move postsubmit tests to lite deployment (#1939) 2019-08-23 14:34:26 -07:00
OWNERS chore: Update OWNERS (#10064) 2023-10-05 18:23:50 -07:00
README.md fix(test): Update reference link in test README.md (#5354) 2021-03-22 17:52:50 -07:00
build-images.sh Assigned copyright to the project authors (#5587) 2021-05-05 13:53:22 +08:00
build_image.yaml test: prepare samples to be emissary executor compatible. Part of #5718 (#6109) 2021-07-22 18:00:01 +08:00
check-argo-status.sh Assigned copyright to the project authors (#5587) 2021-05-05 13:53:22 +08:00
check-build-image-status.sh Assigned copyright to the project authors (#5587) 2021-05-05 13:53:22 +08:00
component_test.yaml test: Revert "fix: Add workaround init container to fix test infra" (#6652) 2021-09-30 12:28:31 -07:00
deploy-cluster.sh chore(test): change hard-coded GKE version to 1.25 (#9841) 2023-08-09 23:48:03 +00:00
deploy-pipeline-lite.sh chore: exclude `sdk-` tags when preparing base deployment for upgrade test (#9477) 2023-05-23 00:08:35 +00:00
deploy-pipeline-mkp-cli.sh Assigned copyright to the project authors (#5587) 2021-05-05 13:53:22 +08:00
e2e_test_gke_v2.yaml test: upgrade e2e sample tests to using sdk v2 (#9885) 2023-08-17 09:33:38 +00:00
install-argo-cli.sh chore: upgrade to Argo v3.3.10 (#9336) 2023-05-08 08:38:55 +00:00
install-argo.sh chore: address kubectl dry-run deprecation (#8643) 2023-01-03 23:08:24 +00:00
postsubmit-tests-with-pipeline-deployment.sh Assigned copyright to the project authors (#5587) 2021-05-05 13:53:22 +08:00
presubmit-backend-test.sh chore: use the upstream go-licenses tool (#7408) 2022-03-16 02:10:34 +00:00
presubmit-backend-visualization.sh feat: upgrade TFX to 1.2.0 (#6375) 2021-08-18 01:50:37 -07:00
presubmit-component-yaml.sh install kfp-pipeline-spec from source for kfp tests (#10300) 2023-12-12 18:05:48 -05:00
presubmit-docformatter-sdk.sh feat(sdk): Add comments to IR YAML file (#8467) 2022-12-05 14:43:14 -08:00
presubmit-isort-sdk.sh chore(sdk): add script to check for unused imports (#8221) 2022-08-31 22:53:51 -07:00
presubmit-kfp-kubernetes-execution-tests.sh test(sdk): add `kfp-kubernetes` execution tests (#10304) 2023-12-15 22:31:54 +00:00
presubmit-sdk-execution-tests.sh install kfp-pipeline-spec from source for kfp tests (#10300) 2023-12-12 18:05:48 -05:00
presubmit-test-kfp-kubernetes-library.sh install kfp-pipeline-spec from source for kfp tests (#10300) 2023-12-12 18:05:48 -05:00
presubmit-test-kfp-runtime-code.sh feat(sdk): enable dependency-free runtime install of kfp (#9886) 2023-08-24 18:31:16 +00:00
presubmit-test-run-all-gcpc-modules.sh install kfp-pipeline-spec from source for kfp tests (#10300) 2023-12-12 18:05:48 -05:00
presubmit-test-sdk-upgrade.sh chore(sdk): undo creation of kfp-dsl namespace package (#9874) 2023-08-15 16:24:52 -07:00
presubmit-tests-mkp.sh Assigned copyright to the project authors (#5587) 2021-05-05 13:53:22 +08:00
presubmit-tests-sdk.sh chore(sdk): undo creation of kfp-dsl namespace package (#9874) 2023-08-15 16:24:52 -07:00
presubmit-tests-tfx.sh chore(sdk): undo creation of kfp-dsl namespace package (#9874) 2023-08-15 16:24:52 -07:00
presubmit-tests-with-pipeline-deployment.sh test: migrate sample integration test to v2 sample test infra (#7115) 2021-12-26 04:17:44 +00:00
presubmit-yapf-sdk.sh chore(test): check single quote in formatting presubmit (#8407) 2022-11-01 12:04:08 -07:00
sample_test.yaml feat(sdk)!: move v1 to deprecated folder (#7291) 2022-03-04 00:52:59 +00:00
tag_for_hosted.sh chore(mlmd): Upgrade ML Metadata to 1.14.0. (#9856) 2023-08-22 17:18:09 +00:00
test-prep.sh chore(test): create test cluster in us-west1-b (#8821) 2023-02-07 11:53:56 -08:00
test_kubernetes_platform_library.sh chore: add kfp-kubernetes docs and update process infrastructure (#8976) 2023-03-15 18:23:12 +00:00
upgrade-tests.sh chore: exclude `sdk-` tags when preparing base deployment for upgrade test (#9477) 2023-05-23 00:08:35 +00:00
upgrade_test_setup.yaml test: prepare samples to be emissary executor compatible. Part of #5718 (#6109) 2021-07-22 18:00:01 +08:00

README.md

ML pipeline test infrastructure

This folder contains the integration/e2e tests for ML pipeline. We use Argo workflow to run the tests.

At a high level, a typical test workflow will

  • build docker images for all components
  • create a dedicate test namespace in the cluster
  • deploy ml pipeline using the newly built components
  • run the test
  • delete the namespace
  • delete the images

All these steps will be taking place in the same Kubernetes cluster. You can use GKE to test against the code in a Github Branch. The image will be temporarily stored in the GCR repository in the same project.

Tests are run automatically on each commit in a Kubernetes cluster using Prow. Tests can also be run manually, see the next section.

Run tests using GKE

You could run the tests against a specific commit.

Setup

Here are the one-time steps to prepare for your GKE testing cluster:

  • Follow the deployment guide to create a GKE cluster.
  • Install Argo in the cluster.
  • Create cluster role binding.
    kubectl create clusterrolebinding default-as-admin --clusterrole=cluster-admin --serviceaccount=default:default
    
  • Follow the guideline to create a ssh deploy key, and store as Kubernetes secret in your cluster, so the job can later access the code. Note it requires admin permission to add a deploy key to github repo. This step is not needed when the project is public.
    kubectl create secret generic ssh-key-secret
    --from-file=id_rsa=/path/to/your/id_rsa
    --from-file=id_rsa.pub=/path/to/your/id_rsa.pub
    

Run tests

Simply submit the test workflow to the GKE cluster, with a parameter specifying the commit you want to test (master HEAD by default):

argo submit integration_test_gke.yaml -p commit-sha=<commit>

You can check the result by doing:

argo list

The workflow will create a temporary namespace with the same name as the Argo workflow. All the images will be stored in gcr.io/project_id/workflow_name/branch_name/*. By default when the test is *finished, the namespace and images will be deleted. However you can keep them by providing additional parameter.

argo submit integration_test_gke.yaml -p branch="my-branch" -p cleanup="false"

Run presubmit-tests-with-pipeline-deployment.sh locally

Run the following commands from root of kubeflow/pipelines repo.

# $WORKSPACE are env variables set by Prow
export WORKSPACE=$(pwd) # root of kubeflow/pipelines git repo
export SA_KEY_FILE=PATH/TO/YOUR/GCP/PROJECT/SERVICE/ACCOUNT/KEY
# (optional) uncomment the following to keep reusing the same cluster
# export TEST_CLUSTER=YOUR_PRECONFIGURED_CLUSTER_NAME
# (optional) uncomment the following to disable built image caching
# export DISABLE_IMAGE_CACHING=true

./test/presubmit-tests-with-pipeline-deployment.sh \
  --workflow_file e2e_test_gke_v2.yaml \ # You can specify other workflows you want to test too.
  --test_result_folder ${FOLDER_NAME_TO_HOLD_TEST_RESULT} \
  --test_result_bucket ${YOUR_GCS_TEST_RESULT_BUCKET} \
  --project ${YOUR_GCS_PROJECT}

Troubleshooting

Q: Why is my test taking so long on GKE?

The cluster downloads a bunch of images during the first time the test runs. It will be faster the second time since the images are cached. The image building steps are running in parallel and usually takes 2~3 minutes in total. If you are experiencing high latency, it might due to the resource constrains on your GKE cluster. In that case you need to deploy a larger cluster.