Skip to content

Commit

Permalink
make commands for local testing
Browse files Browse the repository at this point in the history
parent 7bb0c44
author chahatsagarmain <chahatsagar2003@gmail.com> 1740067717 +0530
committer chahatsagarmain <chahatsagar2003@gmail.com> 1740068190 +0530

parent 7bb0c44
author chahatsagarmain <chahatsagar2003@gmail.com> 1740067717 +0530
committer chahatsagarmain <chahatsagar2003@gmail.com> 1740068098 +0530

make commands for local testing and ci refactor

Signed-off-by: chahatsagarmain <chahatsagar2003@gmail.com>

chore: use local proto go packages for ci (kubeflow#11629)

Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com>

fix(backend): upgrade go version to 1.22.12 to fix CVE-2024-45336 (kubeflow#11631)

Signed-off-by: Daniel Dowler <12484302+dandawg@users.noreply.github.com>

fix(backend) fix run retry for argo (kubeflow#11585)

Signed-off-by: arpechenin <arpechenin@avito.ru>

fix(frontend): restrict file explorer to show only .yaml, .yml, .zip, and .tar.gz files (kubeflow#11623)

* fix(frontend): restrict file explorer to show only .yaml, .yml, .zip, and .tar.gz files

Signed-off-by: muzzlol <muzxmmilkhxn@gmail.com>

* test(frontend): update NewPipelineVersion snapshot for file filters

Signed-off-by: muzzlol <muzxmmilkhxn@gmail.com>

---------

Signed-off-by: muzzlol <muzxmmilkhxn@gmail.com>

fix(backend): fixes DAG status update to reflect completion of all tasks (kubeflow#11651)

Signed-off-by: VaniHaripriya <vmudadla@redhat.com>

chore(test): Increased timeout in test (kubeflow#11658)

Signed-off-by: Helber Belmiro <helber.belmiro@gmail.com>

make commands to test locally and ci refactor

Signed-off-by: chahatsagarmain <chahatsagar2003@gmail.com>

add missing step

Signed-off-by: chahatsagarmain <chahatsagar2003@gmail.com>
  • Loading branch information
chahatsagarmain committed Feb 20, 2025
1 parent 1c4f676 commit a4a5abc
Show file tree
Hide file tree
Showing 25 changed files with 424 additions and 266 deletions.
4 changes: 2 additions & 2 deletions .github/actions/kfp-cluster/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ runs:

- name: Build images
shell: bash
run: ./.github/resources/scripts/build-images.sh
run: make build-images

- name: Deploy KFP
shell: bash
run: ./.github/resources/scripts/deploy-kfp.sh
run: make deploy-kfp
4 changes: 2 additions & 2 deletions .github/actions/kfp-tekton-cluster/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ runs:

- name: Build images
shell: bash
run: ./.github/resources/scripts/build-images.sh
run: make build-images

- name: Deploy KFP
shell: bash
run: ./.github/resources/scripts/deploy-kfp-tekton.sh
run: make deploy-kfp-tekton
2 changes: 1 addition & 1 deletion .github/workflows/backend-visualization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
python-version: '3.9'

- name: Run tests
run: ./test/presubmit-backend-visualization.sh
run: make test-backend-visualization-test
21 changes: 7 additions & 14 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,45 +40,39 @@ jobs:
python-version: '3.9'
- name: Install sdk
run: |
python3 -m venv .venv
. .venv/bin/activate
pip install -e sdk/python
make setup-backend-test
- name: Create KFP cluster
uses: ./.github/actions/kfp-tekton-cluster


- name: "flip coin test"
id: flip-coin
run: |
. .venv/bin/activate
TEST_SCRIPT="test-flip-coin.sh" ./.github/resources/scripts/e2e-test.sh
make test-backend-test-flip-coin
continue-on-error: true

- name: "static loop test"
id: static-loop
run: |
. .venv/bin/activate
TEST_SCRIPT="test-static-loop.sh" ./.github/resources/scripts/e2e-test.sh
make test-backend-test-static-loop
continue-on-error: true

- name: "dynamic loop test"
id: dynamic-loop
run: |
. .venv/bin/activate
TEST_SCRIPT="test-dynamic-loop.sh" ./.github/resources/scripts/e2e-test.sh
make test-backend-test-dynamic-loop
continue-on-error: true

- name: "use env"
id: use-env
run: |
. .venv/bin/activate
TEST_SCRIPT="test-env.sh" ./.github/resources/scripts/e2e-test.sh
make test-backend-test-env
continue-on-error: true

- name: "use volume"
id: use-volume
run: |
. .venv/bin/activate
TEST_SCRIPT="test-volume.sh" ./.github/resources/scripts/e2e-test.sh
make test-backend-test-volume
continue-on-error: true

- name: Collect failed logs
Expand All @@ -93,4 +87,3 @@ jobs:
with:
name: kfp-tekton-backend-artifacts
path: /tmp/tmp*/*

64 changes: 12 additions & 52 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,9 @@ jobs:
with:
k8s_version: ${{ matrix.k8s_version }}

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

- name: Initialization tests v1
- name: Forward Port and initialize tests v1
id: tests
working-directory: ./backend/test/initialization
run: go test -v ./... -namespace kubeflow -args -runIntegrationTests=true
run: make test-e2e-initialization-tests-v1
continue-on-error: true

- name: Collect failed logs
Expand Down Expand Up @@ -79,13 +75,9 @@ jobs:
with:
k8s_version: ${{ matrix.k8s_version }}

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

- name: Initialization tests v2
id: tests
working-directory: ./backend/test/v2/initialization
run: go test -v ./... -namespace kubeflow -args -runIntegrationTests=true
run: make test-e2e-initialization-tests-v2
continue-on-error: true

- name: Collect failed logs
Expand Down Expand Up @@ -121,16 +113,9 @@ jobs:
with:
k8s_version: ${{ matrix.k8s_version }}

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

- name: Forward MySQL port
run: ./.github/resources/scripts/forward-port.sh "kubeflow" "mysql" 3306 3306

- name: API integration tests v1
id: tests
working-directory: ./backend/test/integration
run: go test -v ./... -namespace kubeflow -args -runIntegrationTests=true
run: make test-e2e-api-integration-tests-v1
continue-on-error: true

- name: Collect failed logs
Expand Down Expand Up @@ -166,13 +151,9 @@ jobs:
with:
k8s_version: ${{ matrix.k8s_version }}

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

- name: API integration tests v2
id: tests
working-directory: ./backend/test/v2/integration
run: go test -v ./... -namespace kubeflow -args -runIntegrationTests=true
run: make test-e2e-api-integration-tests-v2
continue-on-error: true

- name: Collect failed logs
Expand Down Expand Up @@ -208,20 +189,9 @@ jobs:
with:
k8s_version: ${{ matrix.k8s_version }}

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

- name: Forward Frontend port
run: ./.github/resources/scripts/forward-port.sh "kubeflow" "ml-pipeline-ui" 3000 3000

- name: Build frontend integration tests image
working-directory: ./test/frontend-integration-test
run: docker build . -t kfp-frontend-integration-test:local
continue-on-error: true

- name: Frontend integration tests
- name: Forward API port and run integration test
id: tests
run: docker run --net=host kfp-frontend-integration-test:local --remote-run true
run: make test-e2e-frontend-integration-test
continue-on-error: true

- name: Collect failed logs
Expand All @@ -236,7 +206,7 @@ jobs:
with:
name: kfp-frontend-integration-test-artifacts-k8s-${{ matrix.k8s_version }}
path: /tmp/tmp*/*

basic-sample-tests:
runs-on: ubuntu-latest
strategy:
Expand All @@ -257,23 +227,13 @@ jobs:
with:
k8s_version: ${{ matrix.k8s_version }}

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

- name: Install prerequisites
run: pip3 install -r ./test/sample-test/requirements.txt

- name: Basic sample tests - sequential
id: sequential-test
run: python3 ./test/sample-test/sample_test_launcher.py sample_test run_test --namespace kubeflow --test-name sequential --results-gcs-dir output

- name: Basic sample tests - exit_handler
id: sample-test
run: python3 ./test/sample-test/sample_test_launcher.py sample_test run_test --namespace kubeflow --test-name exit_handler --expected-result failed --results-gcs-dir output
- name: Forward API port and run integration tests
id: tests
run: make test-e2e-basic-sample-tests
continue-on-error: true

- name: Collect failed logs
if: ${{ (steps.sequential-test.outcome != 'success') || (steps.sample-test.outcome != 'success')}}
if: steps.tests.outcome != 'success'
run: |
./.github/resources/scripts/collect-logs.sh --ns kubeflow --output /tmp/tmp_pod_log.txt
exit 1
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,9 @@ jobs:
with:
node-version: '22'

- name: Clean npm cache
run: npm cache clean --force

- name: Install dependencies
run: cd ./frontend && npm ci
- name: Setup frontend test
run: make setup-frontend-test

- name: Run Frontend Tests
run: cd ./frontend && npm run test:ci
run: make test-frontend

34 changes: 3 additions & 31 deletions .github/workflows/gcpc-modules-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,8 @@ jobs:
with:
python-version: 3.9

- 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 python sdk
run: pip install sdk/python

- 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: Install google-cloud component
run: pip install components/google-cloud

- name: Install Pytest
run: pip install $(grep 'pytest==' sdk/python/requirements-dev.txt)
- name: Install requirements
run: make setup-grpc-modules-test

- name: Run test
run: pytest ./test/gcpc-tests/run_all_gcpc_modules.py
run: make test-grpc-modules
51 changes: 6 additions & 45 deletions .github/workflows/kfp-kubernetes-execution-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,55 +33,16 @@ jobs:
with:
k8s_version: ${{ matrix.k8s_version }}

- name: Forward API port
run: ./.github/resources/scripts/forward-port.sh "kubeflow" "ml-pipeline" 8888 8888
- name: Install requirements
run: make setup-kfp-kubernetes-execution-tests-without-kfp

- 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: |
pip install -e ./kubernetes_platform/python[dev]
- name: Install requirements
run: pip install -r ./test/kfp-kubernetes-execution-tests/requirements.txt

- name: Run tests
id: test
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
- name: Forward port and run tests
id: tests
run: make test-kfp-kubernetes-execution-tests
continue-on-error: true

- name: Collect failed logs
if: steps.test.outcome != 'success'
if: steps.tests.outcome != 'success'
run: |
./.github/resources/scripts/collect-logs.sh --ns kubeflow --output /tmp/tmp_pod_log.txt
exit 1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kfp-kubernetes-library-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
python-version: ${{matrix.python.version}}

- name: Run tests
run: ./test/presubmit-test-kfp-kubernetes-library.sh
run: make test-kfp-kubernetes-library-test
7 changes: 2 additions & 5 deletions .github/workflows/kfp-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,12 @@ jobs:
docker build -f samples/v2/modelcar_import/Dockerfile -t registry.domain.local/modelcar:test .
kind --name kfp load docker-image registry.domain.local/modelcar:test
- name: Forward API port
run: ./.github/resources/scripts/forward-port.sh "kubeflow" "ml-pipeline" 8888 8888

- name: Run Samples Tests
- name: Forward port and run samples tests
id: tests
env:
PULL_NUMBER: ${{ github.event.pull_request.number }}
run: |
./backend/src/v2/test/sample-test.sh
make test-kfp-samples
continue-on-error: true

- name: Collect failed logs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kfp-sdk-runtime-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
- name: Run KFP Runtime Code Tests
run: |
export PULL_NUMBER="${{ github.event.inputs.pull_number || github.event.pull_request.number }}"
./test/presubmit-test-kfp-runtime-code.sh
make test-kfp-sdk-runtime-tests
3 changes: 1 addition & 2 deletions .github/workflows/kfp-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Run SDK Tests
run: |
./test/presubmit-tests-sdk.sh
run: make test-kfp-sdk-tests
2 changes: 1 addition & 1 deletion .github/workflows/kubeflow-pipelines-manifests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
uses: actions/checkout@v4

- name: Run tests
run: ./manifests/kustomize/hack/presubmit.sh
run: make test-kubeflow-pipelines-manifests
12 changes: 3 additions & 9 deletions .github/workflows/periodic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,10 @@ jobs:
uses: ./.github/actions/kfp-cluster
with:
k8s_version: ${{ matrix.k8s_version }}

- name: Port forward kfp apiserver
run: |
nohup kubectl port-forward --namespace kubeflow svc/ml-pipeline 8888:8888 &
- name: Run Functional Tests

- name: Port forward and run Functional Tests
id: tests
run: |
log_dir=$(mktemp -d)
./test/kfp-functional-test/kfp-functional-test.sh > $log_dir/periodic_tests.txt
run: make test-periodic-test
continue-on-error: true

- name: Collect failed logs
Expand Down
Loading

0 comments on commit a4a5abc

Please sign in to comment.