Skip to content

feat(launcher): Add credential refresh to launcher #2036

feat(launcher): Add credential refresh to launcher

feat(launcher): Add credential refresh to launcher #2036

name: KFP API Integration V2 (Legacy)
on:
push:
branches: [master]
pull_request:
paths:
- '.github/workflows/legacy-v2-api-integration-tests.yml'
- '.github/actions/create-cluster/**'
- '.github/resources/**'
- 'api/**'
- 'go.mod'
- 'go.sum'
- 'backend/**'
- 'manifests/kustomize/**'
- 'test/**'
- '!**/*.md'
- '!**/OWNERS'
concurrency:
group: legacy-integration-v2-tests-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
uses: ./.github/workflows/image-builds-with-cache.yml
api-integration-tests-v2:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
pipeline_store: [ "database", "kubernetes" ]
k8s_version: [ "v1.34.0" ]
pod_to_pod_tls_enabled: [ true, false ]
exclude:
# Pod to Pod TLS manifests are not yet implemented for Kubernetes Native API mode
- pipeline_store: "kubernetes"
pod_to_pod_tls_enabled: true
name: API integration tests v2 - K8s with ${{ matrix.pipeline_store }} ${{ matrix.k8s_version }} pod_to_pod_tls_enabled=${{ matrix.pod_to_pod_tls_enabled }}
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.9
- 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 }}
pipeline_store: ${{ matrix.pipeline_store }}
pod_to_pod_tls_enabled: ${{ matrix.pod_to_pod_tls_enabled }}
- name: Configure Cluster CA Cert for TLS-Enabled Tests
shell: bash
if: ${{ matrix.pod_to_pod_tls_enabled }}
run: |
kubectl get secret kfp-api-tls-cert -n kubeflow -o jsonpath='{.data.ca\.crt}' | base64 -d > "${{ github.workspace }}/ca.crt"
echo "CA_CERT_PATH=${{ github.workspace }}/ca.crt" >> "$GITHUB_ENV"
- name: Forward MLMD port
id: forward-mlmd-port
if: ${{ steps.deploy.outcome == 'success' }}
run: kubectl -n kubeflow port-forward svc/metadata-grpc-service 8080:8080 &
continue-on-error: true
- name: API integration tests v2
id: tests
if: ${{ steps.forward-mlmd-port.outcome == 'success' }}
working-directory: ./backend/test/v2/integration
run: go test -v ./... -args -runIntegrationTests=true -namespace=kubeflow -tlsEnabled=${{ matrix.pod_to_pod_tls_enabled }} -caCertPath=${{ env.CA_CERT_PATH }} -repoName=${{ github.repository }} -branchName=${{ github.ref_name }}
env:
PULL_NUMBER: ${{ github.event.pull_request.number }}
PIPELINE_STORE: ${{ matrix.pipeline_store }}
continue-on-error: true
- name: Collect failed logs
if: ${{ steps.deploy.outcome != 'success' || steps.forward-mlmd-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: kfp-api-integration-tests-v2-artifacts-k8s-${{ matrix.k8s_version }}-${{ matrix.pipeline_store }}-tls-${{ matrix.pod_to_pod_tls_enabled }}
path: /tmp/tmp*/*