The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
[Infra] CI/CD - Bump up docker version for e2e ui testing (#16506)
yuneng-jiang627463b21f2f
diff --git a/.circleci/config.yml b/.circleci/config.ymlindex 1e3ca2defce..63b06e6f2bb 100644--- a/.circleci/config.yml+++ b/.circleci/config.yml@@ -1,8 +1,8 @@version: 2.1orbs:codecov: codecov/[email protected]- node: circleci/[email protected] # Add this line to declare the node orb- win: circleci/[email protected] # Add Windows orb+ node: circleci/[email protected] # Add this line to declare the node orb+ win: circleci/[email protected] # Add Windows orbcommands:setup_google_dns:@@ -50,7 +50,7 @@ jobs:name: Run Windows-specific testcommand: |python -m pytest tests/windows_tests/test_litellm_on_windows.py -v-+mypy_linting:docker:- image: cimg/python:3.12@@ -500,7 +500,7 @@ jobs:paths:- litellm_router_coverage.xml- litellm_router_coverage-+litellm_router_unit_testing: # Runs all tests with the "router" keyworddocker:- image: cimg/python:3.11@@ -1571,7 +1571,7 @@ jobs:python -m pytest -vv tests/local_testing/test_basic_python_version.pyhelm_chart_testing:machine:- image: ubuntu-2204:2023.10.1 # Use machine executor instead of docker+ image: ubuntu-2204:2023.10.1 # Use machine executor instead of dockerresource_class: mediumworking_directory: ~/project@@ -1583,7 +1583,7 @@ jobs:name: Install Helmcommand: |curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash-+# Install kind- run:name: Install Kind@@ -1591,7 +1591,7 @@ jobs:curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-amd64chmod +x ./kindsudo mv ./kind /usr/local/bin/kind-+# Install kubectl- run:name: Install kubectl@@ -1599,19 +1599,19 @@ jobs:curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"chmod +x kubectlsudo mv kubectl /usr/local/bin/-+# Create kind cluster- run:name: Create Kind Clustercommand: |kind create cluster --name litellm-test-+# Run helm lint- run:name: Run helm lintcommand: |helm lint ./deploy/charts/litellm-helm-+# Run helm tests- run:name: Run helm tests@@ -1620,22 +1620,21 @@ jobs:# Wait for pod to be readyecho "Waiting 30 seconds for pod to be ready..."sleep 30-+# Print pod logs before running testsecho "Printing pod logs..."kubectl logs $(kubectl get pods -l app.kubernetes.io/name=litellm -o jsonpath="{.items[0].metadata.name}")-+# Run the helm testshelm test litellm --logshelm test litellm --logs-+# Cleanup- run:name: Cleanupcommand: |kind delete cluster --name litellm-test- when: always # This ensures cleanup runs even if previous steps fail-+ when: always # This ensures cleanup runs even if previous steps failcheck_code_and_doc_quality:docker:@@ -1747,7 +1746,7 @@ jobs:echo "=== Printing Full Container Startup Logs ==="docker logs my-appecho "=== End of Full Container Startup Logs ==="-+if docker logs my-app 2>&1 | grep -q "prisma schema out of sync with db. Consider running these sql_commands to sync the two"; thenecho "Expected message found in logs. Test passed."else@@ -1760,7 +1759,6 @@ jobs:python -m pytest -vv tests/basic_proxy_startup_tests -x --junitxml=test-results/junit-2.xml --durations=5no_output_timeout: 120m-build_and_test:machine:image: ubuntu-2204:2023.10.1@@ -2565,8 +2563,7 @@ jobs:pwdlspython -m pytest -vv tests/store_model_in_db_tests -x --junitxml=test-results/junit.xml --durations=5- no_output_timeout:- 120m+ no_output_timeout: 120m- run:name: Stop and remove containerscommand: |@@ -2577,7 +2574,7 @@ jobs:when: always- store_test_results:path: test-results-+proxy_build_from_pip_tests:# Change from docker to machine executormachine:@@ -2795,17 +2792,17 @@ jobs:curl -sSL https://rvm.io/mpapis.asc | gpg --import -curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -}-+# Install Ruby version manager (RVM)curl -sSL https://get.rvm.io | bash -s stable-+# Source RVM from the correct locationsource $HOME/.rvm/scripts/rvm-+# Install Ruby 3.2.2rvm install 3.2.2rvm use 3.2.2 --default-+# Install latest Bundlergem install bundler@@ -2959,32 +2956,32 @@ jobs:python -m pip install toml# Get current version from pyproject.tomlCURRENT_VERSION=$(python -c "import toml; print(toml.load('pyproject.toml')['tool']['poetry']['version'])")-+# Get last published version from PyPILAST_VERSION=$(curl -s https://pypi.org/pypi/litellm-proxy-extras/json | python -c "import json, sys; print(json.load(sys.stdin)['info']['version'])")-+echo "Current version: $CURRENT_VERSION"echo "Last published version: $LAST_VERSION"-+# Compare versions using Python's packaging.versionVERSION_COMPARE=$(python -c "from packaging import version; print(1 if version.parse('$CURRENT_VERSION') < version.parse('$LAST_VERSION') else 0)")-+echo "Version compare: $VERSION_COMPARE"if [ "$VERSION_COMPARE" = "1" ]; thenecho "Error: Current version ($CURRENT_VERSION) is less than last published version ($LAST_VERSION)"exit 1fi-+# If versions are equal or current is greater, check contentspip download --no-deps litellm-proxy-extras==$LAST_VERSION -d /tmp-+echo "Contents of /tmp directory:"ls -la /tmp-+# Find the downloaded file (could be .whl or .tar.gz)DOWNLOADED_FILE=$(ls /tmp/litellm_proxy_extras-*)echo "Downloaded file: $DOWNLOADED_FILE"-+# Extract based on file extensionif [[ "$DOWNLOADED_FILE" == *.whl ]]; thenecho "Extracting wheel file..."@@ -2995,10 +2992,10 @@ jobs:tar -xzf "$DOWNLOADED_FILE" -C /tmpEXTRACTED_DIR="/tmp/litellm_proxy_extras-$LAST_VERSION"fi-+echo "Contents of extracted package:"ls -R "$EXTRACTED_DIR"-+# Compare contentsif ! diff -r "$EXTRACTED_DIR/litellm_proxy_extras" ./litellm_proxy_extras; thenif [ "$CURRENT_VERSION" = "$LAST_VERSION" ]; then@@ -3064,23 +3061,24 @@ jobs:export NVM_DIR="/opt/circleci/.nvm"source "$NVM_DIR/nvm.sh"source "$NVM_DIR/bash_completion"-+# Install and use Node versionnvm install v20nvm use v20-+cd ui/litellm-dashboard-+# Install dependencies firstnpm install-+# Now source the build scriptsource ./build_ui.sh- run:- name: Install Docker CLI (In case it's not already installed)+ name: Upgrade Docker to v24.x (API 1.44+)command: |- sudo apt-get update- sudo apt-get install -y docker-ce docker-ce-cli containerd.io+ curl -fsSL https://get.docker.com | sh+ sudo usermod -aG docker $USER+ docker version- run:name: Install Python 3.9command: |@@ -3128,10 +3126,10 @@ jobs:source "$NVM_DIR/nvm.sh"nvm install 20nvm use 20-+cd ui/litellm-dashboardnpm ci || npm install-+# CI run, with both LCOV (Codecov) and HTML (artifact you can click)CI=true npm run test -- --run --coverage \--coverage.provider=v8 \@@ -3139,7 +3137,6 @@ jobs:--coverage.reporter=html \--coverage.reportsDirectory=coverage/html-- run:name: Build Docker imagecommand: docker build -t my-app:latest -f ./docker/Dockerfile.database .@@ -3584,4 +3581,3 @@ workflows:- check_code_and_doc_quality- publish_proxy_extras- guardrails_testing-