feat(launcher): Add credential refresh to launcher #1823
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: KFP Python Client Tests | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| paths: | |
| - '.github/workflows/kfp-sdk-client-tests.yml' | |
| - '.github/actions/create-cluster/**' | |
| - '.github/resources/**' | |
| - 'sdk/python/**' | |
| - 'api/v2alpha1/**' | |
| - 'backend/**' | |
| - '!**/*.md' | |
| - '!**/OWNERS' | |
| concurrency: | |
| group: sdk-client-tests-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| PYTHON_BUILD_PKG_VERSION: "1.3.0" | |
| jobs: | |
| build: | |
| uses: ./.github/workflows/image-builds-with-cache.yml | |
| sdk-client-tests: | |
| runs-on: ubuntu-24.04 | |
| needs: build | |
| strategy: | |
| matrix: | |
| k8s_version: [ "v1.29.2", "v1.34.0" ] | |
| name: KFP SDK Client Tests - K8s ${{ matrix.k8s_version }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| # This must occur after "Free up space" step | |
| # otherwise python version will be overridden | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| - name: Create KFP cluster | |
| id: create-kfp-cluster | |
| uses: ./.github/actions/create-cluster | |
| with: | |
| k8s_version: ${{ matrix.k8s_version }} | |
| continue-on-error: true | |
| - name: Deploy | |
| id: deploy | |
| uses: ./.github/actions/deploy | |
| if: ${{ steps.create-kfp-cluster.outcome == 'success' }} | |
| with: | |
| image_path: ${{ needs.build.outputs.IMAGE_PATH }} | |
| image_tag: ${{ needs.build.outputs.IMAGE_TAG }} | |
| image_registry: ${{ needs.build.outputs.IMAGE_REGISTRY }} | |
| - name: Forward API port | |
| id: forward-api-port | |
| if: ${{ steps.deploy.outcome == 'success' }} | |
| run: ./.github/resources/scripts/forward-port.sh "kubeflow" "ml-pipeline" 8888 8888 | |
| continue-on-error: true | |
| - name: Install protobuf dependencies & kfp-pipeline-spec | |
| if: ${{ steps.forward-api-port.outcome == 'success' }} | |
| id: install-protobuf-deps | |
| uses: ./.github/actions/protobuf | |
| - name: Install build tool | |
| shell: bash | |
| run: | | |
| pip install --upgrade pip | |
| pip install build==${{ env.PYTHON_BUILD_PKG_VERSION }} | |
| - name: Install Test dependencies | |
| run: | | |
| pip install -r sdk/python/requirements.txt | |
| pip install -r sdk/python/requirements-dev.txt | |
| pip install pytest | |
| pip install pytest-cov | |
| - name: Build & install kfp-server-api dist | |
| id: install-kfp-server-api | |
| shell: bash | |
| working-directory: backend/api/v2beta1/python_http_client | |
| run: | | |
| rm -rf dist/ | |
| python -m build . | |
| pip install dist/*.whl | |
| - name: Run tests | |
| id: tests | |
| if: ${{ steps.forward-api-port.outcome == 'success' }} | |
| env: | |
| apiUrl: "http://localhost:8888" | |
| namespace: "kubeflow" | |
| SETUP_ENV: false | |
| run: | | |
| ./test/presubmit-tests-sdk-client.sh | |
| continue-on-error: true | |
| - name: Collect failed logs | |
| if: ${{ steps.deploy.outcome != 'success' || steps.forward-api-port.outcome != 'success' || steps.tests.outcome != 'success'}} | |
| run: | | |
| ./.github/resources/scripts/collect-logs.sh --ns kubeflow --output /tmp/tmp_pod_log.txt | |
| exit 1 | |
| - name: Collect test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: periodic-functional-artifacts-k8s-${{ matrix.k8s_version }} | |
| path: /tmp/tmp*/* |