Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update registry1 weekly to 0.13.1, API, and testing workflows #1101

Merged
merged 66 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
ca0ff03
update to 0.13.0, fix versioning
justinthelaw Sep 23, 2024
d365660
fix registry1 workflow, add prints
justinthelaw Sep 23, 2024
2e24a6b
chainguard login, fix registry1 uds setup
justinthelaw Sep 23, 2024
bd3d7ff
Merge branch 'main' into chore-update-registry1-weekly-bundle-0.13.0
justinthelaw Sep 23, 2024
c468b2c
fix permissions
justinthelaw Sep 23, 2024
44d4a0e
centralize integration llm config, no-cache-dir
justinthelaw Sep 23, 2024
c0af7c7
centralize integration llm config, pt.2
justinthelaw Sep 23, 2024
332d348
better make clean-all
justinthelaw Sep 23, 2024
14ab833
complete overhaul of registry1 weekly
justinthelaw Sep 23, 2024
3caed3a
revert formatting
justinthelaw Sep 23, 2024
cbbdc20
update yq command for zarf.yaml
justinthelaw Sep 23, 2024
8518d71
yq sub typo
justinthelaw Sep 23, 2024
f11dd73
go back to using latest bundle
justinthelaw Sep 23, 2024
4079620
package create modifications
justinthelaw Sep 23, 2024
dd52e03
typo UDS zarf package create
justinthelaw Sep 23, 2024
a4fb386
correct bundle pointers and mutation
justinthelaw Sep 23, 2024
7192692
different zarf package ref location
justinthelaw Sep 23, 2024
d465753
log level debug
justinthelaw Sep 23, 2024
58b67c6
confirm missing C lib, more dynamic API create
justinthelaw Sep 24, 2024
25a1223
README improvement
justinthelaw Sep 24, 2024
9185ebf
README improvement, pt.2
justinthelaw Sep 24, 2024
c7ca585
Merge branch 'main' into chore-update-registry1-weekly-bundle-0.13.0
justinthelaw Sep 25, 2024
5e545f6
Merge branch 'main' into chore-update-registry1-weekly-bundle-0.13.0
justinthelaw Sep 25, 2024
91da0ce
modify release-please-config
justinthelaw Sep 25, 2024
240e2c1
weekly sunday 12AM pst
justinthelaw Sep 25, 2024
d673244
move install to JIT
justinthelaw Sep 25, 2024
81c598c
remove udsCliVersion
justinthelaw Sep 25, 2024
301e9dd
comment typo
justinthelaw Sep 25, 2024
340414f
add v to registry ref
justinthelaw Sep 25, 2024
8c4e194
Merge branch 'main' into chore-update-registry1-weekly-bundle-0.13.0
justinthelaw Sep 25, 2024
3defb55
better sub yq cmd
justinthelaw Sep 25, 2024
da1e466
add failure logging
justinthelaw Sep 25, 2024
94d2385
Merge branch 'main' into chore-update-registry1-weekly-bundle-0.13.0
justinthelaw Sep 26, 2024
ccd99e9
Merge branch 'main' into chore-update-registry1-weekly-bundle-0.13.0
justinthelaw Sep 26, 2024
649406d
Update release-please-config.json
justinthelaw Sep 27, 2024
20a73b7
Update and rename e2e-registry1-weekly.yaml to weekly-registry1-e2e-t…
justinthelaw Sep 27, 2024
a4f4c0f
Update and rename weekly-registry1-e2e-testing.yaml to weekly-registr…
justinthelaw Sep 27, 2024
0928698
Merge branch 'main' into chore-update-registry1-weekly-bundle-0.13.0
justinthelaw Sep 27, 2024
5cca687
0.13.1
justinthelaw Sep 27, 2024
c878283
Merge branch 'main' into chore-update-registry1-weekly-bundle-0.13.0
justinthelaw Sep 27, 2024
be13c59
filename typo
justinthelaw Sep 27, 2024
db7e27a
make target typo
justinthelaw Sep 27, 2024
ef2f559
env variabilized
justinthelaw Sep 27, 2024
bcc1287
make target just does not work
justinthelaw Sep 27, 2024
03837c9
image_versions explicit set
justinthelaw Sep 27, 2024
8e4faf3
image_versions explicit set, pt.2
justinthelaw Sep 27, 2024
7a3c365
Merge branch 'main' into chore-update-registry1-weekly-bundle-0.13.0
justinthelaw Sep 27, 2024
f77bcfe
use version pattern from release.yaml
justinthelaw Sep 27, 2024
14351c1
remove the v
justinthelaw Sep 27, 2024
ce4c30f
Merge branch 'main' into chore-update-registry1-weekly-bundle-0.13.0
justinthelaw Sep 30, 2024
f502e06
fix lint
justinthelaw Sep 30, 2024
fd2c153
cutover to utils.client.py
justinthelaw Oct 1, 2024
d22439e
Merge branch 'main' into chore-update-registry1-weekly-bundle-0.13.0
justinthelaw Oct 1, 2024
ae68868
cutover to utils.client.py, pt.2
justinthelaw Oct 1, 2024
ca55f72
cutover to utils.client.py, pt.3
justinthelaw Oct 1, 2024
807fbdc
fix text embeddings backend full
justinthelaw Oct 1, 2024
a9c34fb
remove extraneous env
justinthelaw Oct 1, 2024
a6f0af0
add get_supabase_url, default model warnings
justinthelaw Oct 1, 2024
d590268
supabase base url incorrect
justinthelaw Oct 1, 2024
17e20fa
supabase_url in wrong position
justinthelaw Oct 1, 2024
76efca3
Merge remote-tracking branch 'origin/main' into chore-update-registry…
justinthelaw Oct 1, 2024
1211e69
fastapi status code usage
justinthelaw Oct 1, 2024
5ee07cf
new missing JWT
justinthelaw Oct 1, 2024
b647a62
minor if-statement change
justinthelaw Oct 1, 2024
855cdd7
Merge branch 'main' into chore-update-registry1-weekly-bundle-0.13.0
justinthelaw Oct 1, 2024
4bd7b38
minor if-statement change, pt.2
justinthelaw Oct 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
"path": "**/zarf.yaml",
"glob": true
},
{
"type": "generic",
"path": "**/zarf-config.yaml",
"glob": true
},
{
"type": "generic",
"path": "**/uds-bundle.yaml",
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/e2e-llama-cpp-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ jobs:
runs-on: ai-ubuntu-big-boy-8-core
if: ${{ !github.event.pull_request.draft }}

permissions:
contents: read
packages: read
id-token: write # This is needed for OIDC federation.

steps:
- name: Checkout Repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand All @@ -69,6 +74,7 @@ jobs:
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
ghToken: ${{ secrets.GITHUB_TOKEN }}
chainguardIdentity: ${{ secrets.CHAINGUARD_IDENTITY }}

- name: Setup API and Supabase
uses: ./.github/actions/lfai-core
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/e2e-playwright.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ jobs:
runs-on: ai-ubuntu-big-boy-8-core
if: ${{ !github.event.pull_request.draft }}

permissions:
contents: read
packages: read
id-token: write # This is needed for OIDC federation.

steps:
- name: Checkout Repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand All @@ -82,6 +87,7 @@ jobs:
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
ghToken: ${{ secrets.GITHUB_TOKEN }}
chainguardIdentity: ${{ secrets.CHAINGUARD_IDENTITY }}

- name: Create Test User
run: |
Expand Down Expand Up @@ -120,7 +126,7 @@ jobs:
- name: UI/API/Supabase E2E Playwright Tests
run: |
cp src/leapfrogai_ui/.env.example src/leapfrogai_ui/.env
rm src/leapfrogai_ui/tests/global.teardown.ts
rm src/leapfrogai_ui/tests/global.teardown.ts
mkdir -p src/leapfrogai_ui/playwright/.auth
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"
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/e2e-text-backend-full-cpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ jobs:
runs-on: ai-ubuntu-big-boy-8-core
if: ${{ !github.event.pull_request.draft }}

permissions:
contents: read
packages: read
id-token: write # This is needed for OIDC federation.

steps:
- name: Checkout Repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand All @@ -69,6 +74,8 @@ jobs:
with:
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
ghToken: ${{ secrets.GITHUB_TOKEN }}
chainguardIdentity: ${{ secrets.CHAINGUARD_IDENTITY }}

- name: Setup LFAI-API and Supabase
uses: ./.github/actions/lfai-core
Expand Down Expand Up @@ -97,5 +104,7 @@ jobs:
# Test
##########
- name: Test Text Backend
env:
LEAPFROGAI_MODEL: llama-cpp-python
run: |
python -m pytest ./tests/e2e/test_text_backend_full.py -v
6 changes: 6 additions & 0 deletions .github/workflows/e2e-text-embeddings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ jobs:
runs-on: ai-ubuntu-big-boy-8-core
if: ${{ !github.event.pull_request.draft }}

permissions:
contents: read
packages: read
id-token: write # This is needed for OIDC federation.

steps:
- name: Checkout Repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand All @@ -71,6 +76,7 @@ jobs:
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
ghToken: ${{ secrets.GITHUB_TOKEN }}
chainguardIdentity: ${{ secrets.CHAINGUARD_IDENTITY }}

- name: Setup LFAI-API and Supabase
uses: ./.github/actions/lfai-core
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/e2e-vllm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ jobs:
runs-on: ai-ubuntu-big-boy-8-core
if: ${{ !github.event.pull_request.draft }}

permissions:
contents: read
packages: read
id-token: write # This is needed for OIDC federation.

steps:
- name: Checkout Repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand All @@ -73,7 +78,7 @@ jobs:
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
ghToken: ${{ secrets.GITHUB_TOKEN }}
udsCliVersion: 0.14.0
chainguardIdentity: ${{ secrets.CHAINGUARD_IDENTITY }}

##########
# vLLM
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/e2e-whisper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ jobs:
runs-on: ai-ubuntu-big-boy-8-core
if: ${{ !github.event.pull_request.draft }}

permissions:
contents: read
packages: read
id-token: write # This is needed for OIDC federation.

steps:
- name: Checkout Repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand All @@ -71,6 +76,7 @@ jobs:
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
ghToken: ${{ secrets.GITHUB_TOKEN }}
chainguardIdentity: ${{ secrets.CHAINGUARD_IDENTITY }}

- name: Setup LFAI-API and Supabase
uses: ./.github/actions/lfai-core
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ on:
- "!packages/ui/**"

# Declare default permissions as read only.
permissions: read-all
permissions:
contents: read
packages: read
id-token: write # This is needed for OIDC federation.

concurrency:
group: pytest-integration-${{ github.ref }}
Expand Down Expand Up @@ -98,6 +101,7 @@ jobs:
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
ghToken: ${{ secrets.GITHUB_TOKEN }}
chainguardIdentity: ${{ secrets.CHAINGUARD_IDENTITY }}

- name: Setup API and Supabase
uses: ./.github/actions/lfai-core
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: e2e-registry1-weekly
name: weekly-registry1-flavor-test

on:
schedule:
- cron: "0 0 * * 6" # Run every Sunday at 12 AM EST
- cron: "0 8 * * 0" # Run every Sunday at 12 AM PST
workflow_dispatch: # trigger manually as needed
pull_request:
types:
Expand All @@ -12,79 +12,110 @@ on:
- ready_for_review # don't run on draft PRs
- milestoned # allows us to trigger on bot PRs
paths:
- .github/workflows/e2e-registry1-weekly.yaml
- .github/workflows/weekly-registry1-flavor-test.yaml
- bundles/latest/**

concurrency:
group: e2e-registry1-weekly-${{ github.ref }}
group: weekly-registry1-flavor-test-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
test-flavors:
registry1-flavor-test:
runs-on: ai-ubuntu-big-boy-8-core
name: e2e_registry1_weekly
name: weekly_registry1_flavor_test
if: ${{ !github.event.pull_request.draft }}

permissions:
contents: read
packages: write
packages: read
id-token: write # This is needed for OIDC federation.

steps:
- name: Checkout Repo
# Checkout main just to see the latest release in the release-please manifest
- name: Checkout Repo (main)
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
# x-release-please-start-version
ref: "caf4f9c3093a55a003b49fcbf05c03221be6a232" # 0.12.2 w/ integration tests turned-on
# x-release-please-end
ref: main

- name: Setup Python
uses: ./.github/actions/python
- name: Get Latest Release Version
id: get_version
run: |
LFAI_VERSION=$(jq -r '.["."]' .github/.release-please-manifest.json)
echo "LFAI_VERSION=$LFAI_VERSION" >> $GITHUB_OUTPUT

- name: Install API and SDK Dev Dependencies
run : |
make install
################
# LATEST RELEASE
################

- name: Checkout Repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-tags: true
ref: v${{ steps.get_version.outputs.LFAI_VERSION }}

- name: Setup UDS Cluster
uses: ./.github/actions/uds-cluster
- name: Setup UDS Environment
uses: defenseunicorns/uds-common/.github/actions/setup@24c8a2a48eeb33773b76b3587c489cb17496c9e0 # v0.12.0
with:
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
ghToken: ${{ secrets.GITHUB_TOKEN }}
udsCliVersion: 0.14.0
chainguardIdentity: ${{ secrets.CHAINGUARD_IDENTITY }}

- name: Create UDS Cluster
shell: bash
- name: Setup Python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c #v5.0.0
with:
python-version-file: "pyproject.toml"

- name: Install Python Dependencies
run: pip install ".[dev]" "src/leapfrogai_api" "src/leapfrogai_sdk" --no-cache-dir

- name: Mutation of the Zarf Packages
run: |
UDS_CONFIG=.github/config/uds-config.yaml make create-uds-cpu-cluster
uds zarf tools yq -i '
.components[].images[0] |= sub(":v[0-9\.]+$", ":v${{ steps.get_version.outputs.LFAI_VERSION }}")
' packages/api/zarf.yaml
uds zarf tools yq -i '.api.image.tag = "v${{ steps.get_version.outputs.LFAI_VERSION }}"' packages/api/values/registry1-values.yaml

- name: Setup Playwright
- name: Print the Modified Zarf Packages
run: |
npm --prefix src/leapfrogai_ui ci
npx --prefix src/leapfrogai_ui playwright install
cat packages/api/zarf.yaml
cat packages/api/values/registry1-values.yaml

- name: Create Registry1 Packages
- name: Create Registry1 Zarf Packages
run: |
LOCAL_VERSION=registry1 FLAVOR=registry1 make build-api
uds zarf package create packages/api --set image_version="${{ steps.get_version.outputs.LFAI_VERSION }}" --flavor registry1 -a amd64 --confirm

# Mutate UDS bundle definition to use Registry1 packages
- name: Mutation to Registry1 Bundle
# TODO: fix bundle path
# Mutate non-Registry1 packages to be the current tagged version
- name: Mutation of the UDS Bundle
run: |
uds zarf tools yq -i '.packages[1] |= del(.repository)' bundles/latest/cpu/uds-bundle.yaml
uds zarf tools yq -i '.packages[1] |= .ref = "registry1"' bundles/latest/cpu/uds-bundle.yaml
uds zarf tools yq -i '.packages[1] |= .path = "../../../packages/api"' bundles/latest/cpu/uds-bundle.yaml
uds zarf tools yq -i '.metadata.version = "registry1"' bundles/latest/cpu/uds-bundle.yaml

- name: Create and Deploy Bundle
uds zarf tools yq -i '.packages[].ref |= sub("^[^ ]+-upstream$", "${{ steps.get_version.outputs.LFAI_VERSION }}-upstream")' bundles/latest/cpu/uds-bundle.yaml

uds zarf tools yq -i '.packages[1] |= del(.repository)' bundles/latest/cpu/uds-bundle.yaml
uds zarf tools yq -i '.packages[1] |= .ref = "${{ steps.get_version.outputs.LFAI_VERSION }}"' bundles/latest/cpu/uds-bundle.yaml
uds zarf tools yq -i '.packages[1] |= .path = "../../../"' bundles/latest/cpu/uds-bundle.yaml

- name: Print the Modified UDS Bundle
run: |
cat bundles/latest/cpu/uds-config.yaml
cat bundles/latest/cpu/uds-bundle.yaml

- name: Create UDS Cluster
shell: bash
run: |
UDS_CONFIG=.github/config/uds-config.yaml make create-uds-cpu-cluster

- name: Create and Deploy Registry1 Bundle
run: |
cd bundles/latest/cpu
uds create . --confirm && \
uds deploy uds-bundle-leapfrogai-amd64-registry1.tar.zst --confirm --no-progress && \
uds deploy uds-bundle-leapfrogai-amd64-registry1.tar.zst --confirm --no-progress --log-level debug && \
rm -rf uds-bundle-leapfrogai-amd64-registry1.tar.zst && \
docker system prune -af

Expand All @@ -107,32 +138,19 @@ jobs:
echo "ANON_KEY is set: ${{ steps.generate_secrets.outputs.ANON_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: [email protected]
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 E2E Tests
env:
ANON_KEY: ${{ steps.generate_secrets.outputs.ANON_KEY }}
SERVICE_KEY: ${{ steps.generate_secrets.outputs.SERVICE_KEY }}
LEAPFROGAI_MODEL: llama-cpp-python
run: |
python -m pytest -vvv -s ./tests/e2e

- name: Setup Playwright
run: |
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
npm --prefix src/leapfrogai_ui ci
npx --prefix src/leapfrogai_ui playwright install

- name: Run Playwright E2E Tests
env:
Expand All @@ -156,3 +174,12 @@ jobs:
name: playwright-report
path: src/leapfrogai_ui/e2e-report/
retention-days: 30

- name: Get Cluster Debug Information
id: debug
if: ${{ !cancelled() }}
uses: defenseunicorns/uds-common/.github/actions/debug-output@e3008473beab00b12a94f9fcc7340124338d5c08 # v0.13.1

- name: Get Cluster Debug Information
if: ${{ !cancelled() && steps.debug.conclusion == 'success' }}
uses: defenseunicorns/uds-common/.github/actions/save-logs@e3008473beab00b12a94f9fcc7340124338d5c08 # v0.13.1
Loading