diff --git a/.github/workflows/e2e-registry1-weekly.yaml b/.github/workflows/e2e-registry1-weekly.yaml index 352501b81..31ea00232 100644 --- a/.github/workflows/e2e-registry1-weekly.yaml +++ b/.github/workflows/e2e-registry1-weekly.yaml @@ -41,6 +41,10 @@ jobs: - name: Setup Python uses: ./.github/actions/python + - name: Install API and SDK Dev Dependencies + run : | + make install + - name: Setup UDS Cluster uses: ./.github/actions/uds-cluster with: @@ -69,45 +73,60 @@ jobs: run: | cd bundles/latest/cpu uds create . --confirm && \ - uds deploy uds-bundle-leapfrogai-amd64-registry1.tar.zst \ - --set LEAPFROGAI_API_BASE_URL="http://leapfrogai-api.leapfrogai.svc.cluster.local:8080" --confirm --no-progress && \ + uds deploy uds-bundle-leapfrogai-amd64-registry1.tar.zst --confirm --no-progress && \ rm -rf uds-bundle-leapfrogai-amd64-registry1.tar.zst && \ docker system prune -af - name: Generate Secrets id: generate_secrets run: | - PASSWORD=$(cat <(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9!@#$%^&*()_+-=[]{}|;:,.<>?' | head -c 20) <(echo '!@1Aa') | fold -w1 | shuf | tr -d '\n') - echo "::add-mask::$PASSWORD" - echo "FAKE_E2E_USER_PASSWORD=$PASSWORD" >> $GITHUB_OUTPUT ANON_KEY=$(uds zarf tools kubectl get secret supabase-bootstrap-jwt -n leapfrogai -o jsonpath='{.data.anon-key}' | base64 -d) echo "::add-mask::$ANON_KEY" echo "ANON_KEY=$ANON_KEY" >> $GITHUB_OUTPUT - SERVICE_ROLE_KEY=$(uds zarf tools kubectl get secret -n leapfrogai supabase-bootstrap-jwt -o jsonpath={.data.service-key} | base64 -d) - echo "::add-mask::$SERVICE_ROLE_KEY" - echo "SERVICE_ROLE_KEY=$SERVICE_ROLE_KEY" >> $GITHUB_OUTPUT + FAKE_PASSWORD=$(cat <(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9!@#$%^&*()_+-=[]{}|;:,.<>?' | head -c 20) <(echo '!@1Aa') | fold -w1 | shuf | tr -d '\n') + echo "::add-mask::$FAKE_PASSWORD" + echo "FAKE_PASSWORD=$FAKE_PASSWORD" >> $GITHUB_OUTPUT + SERVICE_KEY=$(uds zarf tools kubectl get secret -n leapfrogai supabase-bootstrap-jwt -o jsonpath={.data.service-key} | base64 -d) + echo "::add-mask::$SERVICE_KEY" + echo "SERVICE_KEY=$SERVICE_KEY" >> $GITHUB_OUTPUT - name: Verify Secrets run: | - echo "FAKE_E2E_USER_PASSWORD is set: ${{ steps.generate_secrets.outputs.FAKE_E2E_USER_PASSWORD != '' }}" + echo "FAKE_PASSWORD is set: ${{ steps.generate_secrets.outputs.FAKE_PASSWORD != '' }}" echo "ANON_KEY is set: ${{ steps.generate_secrets.outputs.ANON_KEY != '' }}" - echo "SERVICE_ROLE_KEY is set: ${{ steps.generate_secrets.outputs.SERVICE_ROLE_KEY != '' }}" + echo "SERVICE_KEY is set: ${{ steps.generate_secrets.outputs.SERVICE_KEY != '' }}" + + - name: Run Integration Tests + env: + SUPABASE_ANON_KEY: ${{ steps.generate_secrets.outputs.ANON_KEY }} + SUPABASE_PASS: ${{ steps.generate_secrets.outputs.FAKE_PASSWORD }} + SUPABASE_EMAIL: integration@uds.dev + SUPABASE_URL: https://supabase-kong.uds.dev + # Turn off NIAH tests that are not applicable for integration testing using the Repeater model + LFAI_RUN_NIAH_TESTS: "false" + run: | + uds zarf connect --name=llama-cpp-python-model --namespace=leapfrogai --local-port=50051 --remote-port=50051 & + while ! nc -z localhost 50051; do sleep 1; done + + make test-user-pipeline + env $(cat .env | xargs) python -m pytest -v -s tests/integration/api # Backends - - name: Run Backend Tests + - name: Run Backend E2E Tests env: ANON_KEY: ${{ steps.generate_secrets.outputs.ANON_KEY }} + SERVICE_KEY: ${{ steps.generate_secrets.outputs.SERVICE_KEY }} run: | - python -m pytest ./tests/e2e/test_llama.py -v - python -m pytest ./tests/e2e/test_text_embeddings.py -v - python -m pytest ./tests/e2e/test_whisper.py -v - python -m pytest ./tests/e2e/test_supabase.py -v - python -m pytest ./tests/e2e/test_api.py -v + python -m pytest ./tests/e2e/test_llama.py -vv + python -m pytest ./tests/e2e/test_text_embeddings.py -vv + python -m pytest ./tests/e2e/test_whisper.py -vv + python -m pytest ./tests/e2e/test_supabase.py -vv + python -m pytest ./tests/e2e/test_api.py -vv - name: Run Playwright E2E Tests env: - SERVICE_ROLE_KEY: ${{ steps.generate_secrets.outputs.SERVICE_ROLE_KEY }} - FAKE_E2E_USER_PASSWORD: ${{ steps.generate_secrets.outputs.FAKE_E2E_USER_PASSWORD }} + SERVICE_ROLE_KEY: ${{ steps.generate_secrets.outputs.SERVICE_KEY }} + FAKE_E2E_USER_PASSWORD: ${{ steps.generate_secrets.outputs.FAKE_PASSWORD }} ANON_KEY: ${{ steps.generate_secrets.outputs.ANON_KEY }} run: | chmod +x ./.github/scripts/createUser.sh diff --git a/bundles/latest/cpu/uds-bundle.yaml b/bundles/latest/cpu/uds-bundle.yaml index 3e183415f..8f8ce3020 100644 --- a/bundles/latest/cpu/uds-bundle.yaml +++ b/bundles/latest/cpu/uds-bundle.yaml @@ -4,37 +4,35 @@ kind: UDSBundle metadata: name: leapfrogai description: A UDS bundle for deploying LeapfrogAI - # x-release-please-start-version - version: 0.12.2 - # x-release-please-end + version: 0.12.2-upstream packages: # Supabase backend for the UI and API to interface with Postgresql - name: supabase - repository: ghcr.io/defenseunicorns/packages/leapfrogai/supabase - ref: 0.11.0 + repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/supabase + ref: 0.12.2-upstream - # OpenAI-like API + # API - name: leapfrogai-api - repository: ghcr.io/defenseunicorns/packages/leapfrogai/leapfrogai-api - ref: 0.11.0 + repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/leapfrogai-api + ref: 0.12.2-upstream - # Model for generic chat and summarization + # Chat Model - name: llama-cpp-python - repository: ghcr.io/defenseunicorns/packages/leapfrogai/llama-cpp-python - ref: 0.11.0 + repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/llama-cpp-python + ref: 0.12.2-upstream - # Model for providing vector embeddings for text + # Text Embeddings Model - name: text-embeddings - repository: ghcr.io/defenseunicorns/packages/leapfrogai/text-embeddings - ref: 0.11.0 + repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/text-embeddings + ref: 0.12.2-upstream - # Model for converting audio to text + # Transcription Model - name: whisper - repository: ghcr.io/defenseunicorns/packages/leapfrogai/whisper - ref: 0.11.0 + repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/whisper + ref: 0.12.2-upstream # UI - name: leapfrogai-ui - repository: ghcr.io/defenseunicorns/packages/leapfrogai/leapfrogai-ui - ref: 0.11.0 + repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/leapfrogai-ui + ref: 0.12.2-upstream diff --git a/bundles/latest/gpu/uds-bundle.yaml b/bundles/latest/gpu/uds-bundle.yaml index d7147c4ff..9c9de9bfa 100644 --- a/bundles/latest/gpu/uds-bundle.yaml +++ b/bundles/latest/gpu/uds-bundle.yaml @@ -4,37 +4,35 @@ kind: UDSBundle metadata: name: leapfrogai description: A UDS bundle for deploying LeapfrogAI - # x-release-please-start-version - version: 0.12.2 - # x-release-please-end + version: 0.12.2-upstream packages: # Supabase backend for the UI and API to interface with Postgresql - name: supabase - repository: ghcr.io/defenseunicorns/packages/leapfrogai/supabase - ref: 0.11.0 + repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/supabase + ref: 0.12.2-upstream # OpenAI-like API - name: leapfrogai-api - repository: ghcr.io/defenseunicorns/packages/leapfrogai/leapfrogai-api - ref: 0.11.0 + repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/leapfrogai-api + ref: 0.12.2-upstream # Model for generic chat and summarization - name: vllm - repository: ghcr.io/defenseunicorns/packages/leapfrogai/vllm - ref: 0.11.0 + repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/vllm + ref: 0.12.2-upstream # Model for providing vector embeddings for text - name: text-embeddings - repository: ghcr.io/defenseunicorns/packages/leapfrogai/text-embeddings - ref: 0.11.0 + repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/text-embeddings + ref: 0.12.2-upstream # Model for converting audio to text - name: whisper - repository: ghcr.io/defenseunicorns/packages/leapfrogai/whisper - ref: 0.11.0 + repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/whisper + ref: 0.12.2-upstream # UI - name: leapfrogai-ui - repository: ghcr.io/defenseunicorns/packages/leapfrogai/leapfrogai-ui - ref: 0.11.0 + repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/leapfrogai-ui + ref: 0.12.2-upstream diff --git a/packages/api/values/registry1-values.yaml b/packages/api/values/registry1-values.yaml index 70e3bcad2..8fa2954b6 100644 --- a/packages/api/values/registry1-values.yaml +++ b/packages/api/values/registry1-values.yaml @@ -2,7 +2,7 @@ api: image: repository: registry1.dso.mil/ironbank/opensource/defenseunicorns/leapfrogai/api # x-release-please-start-version - tag: v0.11.0 + tag: v0.12.2 # x-release-please-end env: diff --git a/packages/api/zarf.yaml b/packages/api/zarf.yaml index fb3e6a089..fca95cf0a 100644 --- a/packages/api/zarf.yaml +++ b/packages/api/zarf.yaml @@ -45,7 +45,7 @@ components: valuesFiles: - "values/registry1-values.yaml" images: - - "registry1.dso.mil/ironbank/opensource/defenseunicorns/leapfrogai/api:v0.11.0" + - "registry1.dso.mil/ironbank/opensource/defenseunicorns/leapfrogai/api:v0.12.2" # TODO: replace with Ironbank image once hardened: registry1.dso.mil/ironbank/opensource/defenseunicorns/leapfrogai/api/migrations - "ghcr.io/defenseunicorns/leapfrogai/api-migrations:###ZARF_PKG_TMPL_IMAGE_VERSION###" - "registry1.dso.mil/ironbank/kiwigrid/k8s-sidecar:1.23.3"