## Feature Summary
Please refer [this](https://github.com/kubeflow/pipelines/blob/master/proposals/11551-kubernetes-native-api/README.md) for more details

## Test Sections
### Migration of existing pipelines
#### With the migration script
Create few pipelines in DB mode and migrate it via the migration script

| **Test Case**                                                                                                                        | **Test Steps**                                                                                                                       | **Expected Result**                                                                                                                                                      |
|--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| (KFP DB mode) Create a pipeline and a pipeline version and run migrate script                                                        |                                                                                                                                      | All (except ID) Pipeline and pipeline version fields under spec should match exactly where original ID is stored in a field called `pipelines.kubeflow.org/original-id`  |
| (KFP DB mode) Create a pipeline and 2 pipeline versions with same spec and run migrate script                                        |                                                                                                                                      | All (except ID) Pipeline and pipeline versions fields under spec should match exactly where original ID is stored in a field called `pipelines.kubeflow.org/original-id` |
| (KFP DB mode) Create a pipeline and 2 pipeline versions with different specs and run migrate script                                  |                                                                                                                                      | All (except ID) Pipeline and pipeline versions fields under spec should match exactly where original ID is stored in a field called `pipelines.kubeflow.org/original-id` |
| (KFP DB mode) Create 2 pipelines and 1 pipeline version per pipeline spec and run migrate script                                     |                                                                                                                                      | All (except ID) Pipeline and pipeline versions fields under spec should match exactly where original ID is stored in a field called `pipelines.kubeflow.org/original-id` |
| (KFP DB mode) Create 2 pipeline and 2 pipeline versions with different specs and run migrate script                                  |                                                                                                                                      | All (except ID) Pipeline and pipeline versions fields under spec should match exactly where original ID is stored in a field called `pipelines.kubeflow.org/original-id` |
| (KFP DB mode) Create all pipelines and 1 pipeline version per pipeline spec under "data/pipeline_files/valid" and run migrate script | Run [Pipeline Upload API Tests](https://github.com/nsingla/kfp_pipelines/tree/pipeline_run_tests) without clean up and run migration | Confirm that the migration script does not error out and is able to migrate all pipelines and their versions                                                             |
| (K8s Mode) Create a pipeline in DB mode and switch to k8s mode and try creating the same pipeline without migration                  |                                                                                                                                      | New pipeline with the same name will be created, but what happens to existing runs associated with it? and what happens when we run the migration script?                |
| (K8s Mode) Create a pipeline run in an experiment in DB mode and while the run is in progress switch to k8s mode                     |                                                                                                                                      | The run continue after migration                                                                                                                                         |
| (K8s Mode) Create a pipeline recurring run in an experiment in DB mode and switch to k8s mode                                        |                                                                                                                                      | The run should still exist with the same cron settings                                                                                                                   |
| Create a pipeline run associated with an experiment in the **DB Mode**, migrate it and then rerun the run                            |                                                                                                                                      | Pipeline run should be allowed and the experiment association (to the specific experiment) should stay inplace                                                           |
| --------------After migration--------------------                                                                                    |
| (K8s Mode) Try creating an existing pipeline and pipeline verison                                                                    |                                                                                                                                      | Pipeline should not get created with a duplicate name                                                                                                                    |
| (K8s Mode) Run an existing pipeline and get run details and match                                                                    |                                                                                                                                      |                                                                                                                                                                          |
| (K8s Mode) Run all migrated pipeline and match the run details                                                                       |                                                                                                                                      |                                                                                                                                                                          |
| (K8s Mode) Create an experiment and a run                                                                                            |                                                                                                                                      |                                                                                                                                                                          |

### New Pipelines
Create pipeline and pipeline versions and run pipelines with default and custom experiment

| **Test Case**                                                                                                                        | **Test Steps**                                                                                                         | **Expected Result**                                                       |
|--------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|
| (K8s mode) Create pipeline (via CR) and a pipeline version using CRs                                                                 | Match the pipeline and pipeline version                                                                                | Pipeline and Pipeline version creation should be successful               |
| (K8s mode) Create pipeline (via CR) and 2 pipeline versions with same spec using CRs                                                 | Match the pipeline and pipeline versions                                                                               | Pipeline and Pipeline versions creation should be successful              |
| (K8s mode) Create pipeline (via CR) and 2 pipeline versions with different specs using CRs                                           | Match the pipelines and pipeline versions                                                                              | Pipeline and Pipeline versions creation should be successful              |
| (K8s mode) Create pipeline and a pipeline version (via CR) with a different **pipelineName** than the one in pipelineSpecs           |                                                                                                                        | Should this be allowed? Will webhooks throw a validation error            |
| (K8s mode) Create pipeline run (via API) of the pipeline created via CR                                                              | Get Run details and validate                                                                                           | Run should be successful                                                  |
| (K8s mode) Create pipeline (via API) and a pipeline version (via API)                                                                | Match the pipeline and pipeline version                                                                                | Pipeline and Pipeline version creation should be successful               |
| (K8s mode) Create pipeline run (via API) of the pipeline created via API in the above test                                           | Get Run details and validate                                                                                           | Run should be successful                                                  |
| (K8s mode) Create an experiment and a pipeline run  (via API)                                                                        | Get Experiment and Run details and validate                                                                            | Run should be associated to the correct experiment and should succeed     |
| (K8s mode) Create pipeline (via UI) and a pipeline version using CRs                                                                 | Match the pipeline and pipeline version                                                                                | Pipeline and Pipeline version creation should be successful               |
| (K8s mode) Create pipeline (via UI) and 2 pipeline versions with same spec using CRs                                                 | Match the pipeline and pipeline versions                                                                               | Pipeline and Pipeline versions creation should be successful              |
| (K8s mode) Create pipeline (via UI) and 2 pipeline versions with different specs using CRs                                           | Match the pipelines and pipeline versions                                                                              | Pipeline and Pipeline versions creation should be successful              |
| (K8s mode) Create pipeline run (via UI)                                                                                              | Get Run details and validate                                                                                           | Run should be successful                                                  |
| (K8s mode) Create an experiment and a pipeline run  (via UI)                                                                         | Get Experiment and Run details and validate                                                                            | Run should be associated to the correct experiment and should succeed     |
| (KFP DB mode) Create all pipelines and 1 pipeline version per pipeline spec under "data/pipeline_files/valid" and run migrate script | Use pipelines defined in [Pipeline Upload API Tests](https://github.com/nsingla/kfp_pipelines/tree/pipeline_run_tests) | Confirm that you are able to create all pipelines and pipeline versions   |

### Cluster Config (in Kubeflow Mode)
| **Test Case**                                                                     | **Test Steps**                                        | **Expected Result**                                                                                |
|-----------------------------------------------------------------------------------|-------------------------------------------------------|----------------------------------------------------------------------------------------------------|
| (K8s mode) Create pipeline and a pipeline version using CRs                       | Match the pipeline and pipeline version (DB vs K8s)   | Pipeline and Pipeline version creation should be successful                                        |
| (K8s mode) Create pipeline and 2 pipeline versions with same spec using CRs       | Match the pipeline and pipeline versions (DB vs K8s)  | Pipeline and Pipeline versions creation should be successful                                       |
| (K8s mode) Create pipeline and 2 pipeline versions with different specs using CRs | Match the pipelines and pipeline versions (DB vs K8s) | Pipeline and Pipeline versions creation should be successful                                       |
| (K8s mode) Create pipeline run                                                    | Get Run details and validate                          | Pipeline run should succeed                                                                        |
| (K8s mode) Create an experiment and a pipeline run                                | Get Experiment and Run details and validate           | Pipeline run should be correctly associated to the created experiment and run should be successful |