Skip to content

Commit

Permalink
Moved kfp-kubernetes-execution-tests to GitHub Actions
Browse files Browse the repository at this point in the history
Signed-off-by: hbelmiro <helber.belmiro@gmail.com>
  • Loading branch information
hbelmiro committed Jun 18, 2024
1 parent 4dab191 commit a965f78
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 49 deletions.
93 changes: 93 additions & 0 deletions .github/workflows/kfp-kubernetes-execution-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: k8s execution tests

on:
push:
branches: [master]

pull_request:
paths:
- '.github/workflows/kfp-kubernetes-execution-tests.yml'
- 'sdk/python/**'
- 'api/v2alpha1/**'
- 'kubernetes_platform/**'

jobs:
kfp-kubernetes-execution-tests:
runs-on: ubuntu-24.04
strategy:
matrix:
python: [
{ 'version': '3.9' },
{ 'version': '3.10' },
{ 'version': '3.11' },
{ 'version': '3.12' }
]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Create k8s Kind Cluster
uses: container-tools/kind-action@v2
with:
cluster_name: kfp
kubectl_version: v1.29.2
version: v0.22.0
node_image: kindest/node:v1.29.2

- name: Build images
run: ./scripts/deploy/github/build-images.sh

- name: Deploy KFP
run: ./scripts/deploy/github/deploy-kfp.sh

- name: Forward API port
run: ./scripts/deploy/github/forward-port.sh "kubeflow" "ml-pipeline" 8888 8888

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{matrix.python.version}}

- name: apt-get update
run: sudo apt-get update

- name: Install protobuf-compiler
run: sudo apt-get install protobuf-compiler -y

- name: Install setuptools
run: |
pip3 install setuptools
pip3 freeze
- name: Install Wheel
run: pip3 install wheel==0.42.0

- name: Install protobuf
run: pip3 install protobuf==4.25.3

- name: Generate API proto files
working-directory: ./api
run: make clean python

- name: Install kfp-pipeline-spec from source
run: |
python3 -m pip install api/v2alpha1/python
- name: Generate kfp-kubernetes proto files from source
working-directory: ./kubernetes_platform
run: make clean python

- name: Install kfp-kubernetes from source
run: |
# rust needed for transitive deps in dev extras on Python:3.12
sudo apt-get install rustc -y
pip install -e ./kubernetes_platform/python[dev]
- name: Install requirements
run: pip install -r ./test/kfp-kubernetes-execution-tests/requirements.txt

- name: Run tests
run: |
export KFP_ENDPOINT="http://localhost:8888"
export TIMEOUT_SECONDS=2700
pytest ./test/kfp-kubernetes-execution-tests/sdk_execution_tests.py --asyncio-task-timeout $TIMEOUT_SECONDS
1 change: 1 addition & 0 deletions kubernetes_platform/python/generate_proto.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def generate_proto(source: str) -> None:
protoc_command = [
PROTOC,
f'-I={PROTO_DIR}',
f'--experimental_allow_proto3_optional',
f'--python_out={PKG_DIR}',
source,
]
Expand Down
24 changes: 16 additions & 8 deletions kubernetes_platform/python/test/snapshot/test_data_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,23 @@


test_cases:
- module: create_mount_delete_dynamic_pvc
name: my_pipeline
# Disabled while https://github.com/kubeflow/pipelines/issues/10918 is failing
# - module: create_mount_delete_dynamic_pvc
# name: my_pipeline

- module: create_mount_delete_existing_pvc
name: my_pipeline
- module: create_mount_delete_existing_pvc_from_task_output
name: my_pipeline
- module: secret_as_env
name: my_pipeline
- module: secret_as_vol
name: my_pipeline
- module: node_selector
name: my_pipeline

# Disabled while https://github.com/kubeflow/pipelines/issues/10918 is failing
# - module: secret_as_env
# name: my_pipeline

# Disabled while https://github.com/kubeflow/pipelines/issues/10918 is failing
# - module: secret_as_vol
# name: my_pipeline

# Disabled while https://github.com/kubeflow/pipelines/issues/10918 is failing
# - module: node_selector
# name: my_pipeline
41 changes: 0 additions & 41 deletions test/presubmit-kfp-kubernetes-execution-tests.sh

This file was deleted.

0 comments on commit a965f78

Please sign in to comment.