Skip to content

Commit 4f644e6

Browse files
committed
Merge branch 'main' of ssh://github.com/envoyproxy/ai-gateway
2 parents eeedbc6 + 29905d5 commit 4f644e6

File tree

521 files changed

+53789
-12080
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

521 files changed

+53789
-12080
lines changed

.codespell.ignorewords

Whitespace-only changes.

.codespell.skip

Lines changed: 0 additions & 13 deletions
This file was deleted.

.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ charset = utf-8
55
end_of_line = lf
66
insert_final_newline = true
77
trim_trailing_whitespace = true
8+
9+
# Automatically formatted by prettier, which sometimes has trailing whitespace
10+
# in codeblocks. We don't need to check here since it's the formatting is checked
11+
# instead.
12+
[*.md]
13+
trim_trailing_whitespace = false

.env.ollama

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
CHAT_MODEL=qwen2.5:0.5b
2+
THINKING_MODEL=qwen3:1.7b
3+
COMPLETION_MODEL=qwen2.5:0.5b
24
EMBEDDINGS_MODEL=all-minilm:33m

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
blank_issues_enabled: false
22
contact_links:
3-
- name: "Crash bug"
4-
url: https://github.com/envoyproxy/envoy/security/policy
5-
about: "Please file any crash bug with [email protected]."
3+
- name: "Crash bug"
4+
url: https://github.com/envoyproxy/envoy/security/policy
5+
about: "Please file any crash bug with [email protected]."
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this project
4-
title: ''
4+
title: ""
55
labels: enhancement,triage
6-
assignees: ''
7-
6+
assignees: ""
87
---
98

10-
*Description*:
11-
>Describe the desired behavior, what scenario it enables and how it
12-
would be used.
9+
_Description_:
10+
11+
> Describe the desired behavior, what scenario it enables and how it
12+
> would be used.
1313
1414
[optional *Relevant Links*:]
15-
>Any extra documentation required to understand the issue.
15+
16+
> Any extra documentation required to understand the issue.
Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
---
22
name: Bug
33
about: Bugs
4-
title: ''
4+
title: ""
55
labels: bug,triage
6-
assignees: ''
7-
6+
assignees: ""
87
---
98

10-
*Description*:
11-
>What issue is being seen? Describe what should be happening instead of
12-
the bug, for example: Envoy should not crash, the expected value isn't
13-
returned, etc.
9+
_Description_:
10+
11+
> What issue is being seen? Describe what should be happening instead of
12+
> the bug, for example: Envoy should not crash, the expected value isn't
13+
> returned, etc.
14+
15+
_Repro steps_:
1416

15-
*Repro steps*:
1617
> Include sample requests, environment, etc. All data and inputs
17-
required to reproduce the bug.
18+
> required to reproduce the bug.
19+
20+
> **Note**: If there are privacy concerns, sanitize the data prior to
21+
> sharing.
22+
23+
_Environment_:
1824

19-
>**Note**: If there are privacy concerns, sanitize the data prior to
20-
sharing.
25+
> Include the environment like gateway version, envoy version and so on.
2126
22-
*Environment*:
23-
>Include the environment like gateway version, envoy version and so on.
27+
_Logs_:
2428

25-
*Logs*:
26-
>Include the access logs and the Envoy logs.
29+
> Include the access logs and the Envoy logs.

.github/ISSUE_TEMPLATE/other.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
---
22
name: Other
33
about: Questions, design proposals, tech debt, etc.
4-
title: ''
4+
title: ""
55
labels: triage
6-
assignees: ''
7-
6+
assignees: ""
87
---
98

10-
*Description*:
11-
>Describe the issue.
9+
_Description_:
10+
11+
> Describe the issue.
1212
1313
[optional *Relevant Links*:]
14-
>Any extra documentation required to understand the issue.
14+
15+
> Any extra documentation required to understand the issue.

.github/codecov.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ ignore:
2020
- "tests/internal/e2elib/**/*"
2121
- "tests/internal/testenvironment/**/*"
2222
- "tests/internal/testopeninference/openai_proxy.go"
23+
- "tests/internal/testmcp/**/*"
2324
- "internal/testing/**/*"
2425
- "internal/controller/controller.go"

.github/workflows/build_and_test.yaml

Lines changed: 143 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ name: Build and Test
22
on:
33
pull_request:
44
branches:
5-
- 'main'
5+
- "main"
66
# Release branches are like "release/v0.1", "release/v0.2", etc. where we backport the changes to non EOL versions.
77
# The branch will be created from the main branch after the initial release tag is cut. For example, when we cut v0.8.0 release,
88
# we will create a branch "release/v0.8" from the main branch. For rc release, we simply iterate on main branch.
99
#
1010
# See RELEASES.md for more details.
11-
- 'release/**'
11+
- "release/**"
1212

1313
push:
1414
branches:
15-
- 'main'
16-
- 'release/**'
15+
- "main"
16+
- "release/**"
1717

1818
concurrency:
1919
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-concurrency-to-cancel-any-in-progress-job-or-run
@@ -38,8 +38,8 @@ jobs:
3838
- '!**/*.md'
3939
- '!site/**'
4040
- '!netlify.toml'
41-
predicate-quantifier: every # Make the filters be AND-ed
42-
token: "" # don't use github api
41+
predicate-quantifier: every # Make the filters be AND-ed
42+
token: "" # don't use github api
4343
outputs:
4444
code: ${{ steps.changes.outputs.code }}
4545

@@ -74,18 +74,30 @@ jobs:
7474
- name: Start Ollama server
7575
if: matrix.os == 'ubuntu-latest'
7676
run: |
77-
curl -fsSL https://ollama.com/install.sh | sh
77+
curl -fsSL https://ollama.com/install.sh | sh && sudo systemctl stop ollama
78+
nohup ollama serve > ollama.log 2>&1 &
7879
timeout 30 sh -c 'until nc -z localhost 11434; do sleep 1; done'
79-
ollama pull qwen3:0.6b
80-
80+
grep _MODEL .env.ollama | cut -d= -f2 | xargs -I{} ollama pull {}
81+
env:
82+
OLLAMA_CONTEXT_LENGTH: 131072 # Larger context for goose
83+
OLLAMA_HOST: 0.0.0.0
84+
# Download Envoy via func-e using implicit default version `aigw` would
85+
# otherwise need to download during test runs.
86+
- name: Download Envoy via func-e
87+
run: go tool -modfile=tools/go.mod func-e run --version
88+
env:
89+
FUNC_E_HOME: /tmp/envoy-gateway # hard-coded directory in EG
8190
- env:
8291
TEST_AWS_ACCESS_KEY_ID: ${{ secrets.AWS_BEDROCK_USER_AWS_ACCESS_KEY_ID }}
8392
TEST_AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_BEDROCK_USER_AWS_SECRET_ACCESS_KEY }}
8493
TEST_OPENAI_API_KEY: ${{ secrets.ENVOY_AI_GATEWAY_OPENAI_API_KEY }}
94+
TEST_GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8595
run: make test-coverage
96+
- if: failure()
97+
run: cat ollama.log || true
8698
- name: Upload coverage to Codecov
8799
if: matrix.os == 'ubuntu-latest'
88-
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
100+
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
89101
with:
90102
fail_ci_if_error: true
91103
files: ./out/go-test-coverage.out
@@ -157,9 +169,9 @@ jobs:
157169
# Once it's supported, the following "binary installation" steps below can be just removed and
158170
# we can simply exec.Cmd with "go tool -modfile=tools/go.mod func-e run" with the envoy version configured via ENVOY_VERSION env var.
159171
include:
160-
- version: 1.35.0 # NOTE: when updating this, also update the comment in the CONTRIBUTING.md file.
172+
- version: 1.35.0 # NOTE: when updating this, also update the comment in the CONTRIBUTING.md file.
161173
os: ubuntu-latest
162-
- version: 1.35.0 # NOTE: when updating this, also update the comment in the CONTRIBUTING.md file.
174+
- version: 1.35.0 # NOTE: when updating this, also update the comment in the CONTRIBUTING.md file.
163175
os: macos-latest
164176
- version: latest
165177
os: ubuntu-latest
@@ -199,6 +211,7 @@ jobs:
199211
TEST_GROK_API_KEY: ${{ secrets.ENVOY_AI_GATEWAY_GROK_API_KEY }}
200212
TEST_SAMBANOVA_API_KEY: ${{ secrets.ENVOY_AI_GATEWAY_SAMBANOVA_API_KEY }}
201213
TEST_DEEPINFRA_API_KEY: ${{ secrets.ENVOY_AI_GATEWAY_DEEPINFRA_API_KEY }}
214+
TEST_GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
202215
run: make test-extproc
203216

204217
test_e2e:
@@ -242,23 +255,51 @@ jobs:
242255
TEST_GEMINI_API_KEY: ${{ secrets.ENVOY_AI_GATEWAY_GEMINI_API_KEY }}
243256
run: make test-e2e
244257

258+
test_e2e_upgrade:
259+
needs: changes
260+
if: ${{ needs.changes.outputs.code == 'true' }}
261+
name: E2E Test for Upgrades (k8s ${{ matrix.k8s-version }})
262+
runs-on: ubuntu-latest
263+
strategy:
264+
fail-fast: false
265+
matrix:
266+
# Note: this is to simply ensure that the controller working as expected with or without
267+
# extproc being inserted as a k8s sidecar (init container with the restartPolicy=always).
268+
# On newer k8s versions (v1.33+), that is always enabled by default, so we only need to test
269+
# on older versions. After v1.32 reaches EOL, we can remove the older k8s versions from here.
270+
k8s-version:
271+
- v1.33.4
272+
- v1.32.8
273+
steps:
274+
- uses: actions/checkout@v4
275+
- uses: actions/setup-go@v5
276+
with:
277+
cache: false
278+
go-version-file: go.mod
279+
- uses: actions/cache@v4
280+
with:
281+
path: |
282+
~/.cache/go-build
283+
~/.cache/golangci-lint
284+
~/go/pkg/mod
285+
~/go/bin
286+
key: e2e-test-${{ hashFiles('**/go.mod', '**/go.sum', '**/Makefile') }}
287+
- uses: docker/setup-buildx-action@v3
288+
- run: make test-e2e-upgrade
289+
env:
290+
# We only need to test the upgrade from the latest stable version of EG.
291+
EG_VERSION: v1.5.0
292+
K8S_VERSION: ${{ matrix.k8s-version }}
293+
245294
test_e2e_inference_extension:
246295
needs: changes
247296
if: ${{ needs.changes.outputs.code == 'true' }}
248-
name: E2E Test for Inference Extensions (Envoy Gateway ${{ matrix.name }})
297+
name: E2E Test for Inference Extensions
249298
# TODO: make it possible to run this job on macOS as well, which is a bit tricky due to the nested
250299
# virtualization is not supported on macOS runners.
251300
# E.g. Use https://github.com/douglascamata/setup-docker-macos-action per the comment in
252301
# https://github.com/actions/runner-images/issues/17#issuecomment-1971073406
253302
runs-on: ubuntu-latest
254-
strategy:
255-
fail-fast: false
256-
matrix:
257-
include:
258-
- name: latest
259-
envoy_gateway_version: v0.0.0-latest
260-
- name: v1.5.0
261-
envoy_gateway_version: v1.5.0
262303
steps:
263304
- uses: actions/checkout@v4
264305
- uses: actions/setup-go@v5
@@ -275,12 +316,90 @@ jobs:
275316
key: e2e-test-${{ hashFiles('**/go.mod', '**/go.sum', '**/Makefile') }}
276317
- uses: docker/setup-buildx-action@v3
277318
- run: make test-e2e-inference-extension
319+
env:
320+
# We only need to test with the latest stable version of EG, since these e2e tests
321+
# do not depend on the EG version.
322+
EG_VERSION: v1.5.0
323+
324+
test_e2e_namespaced:
325+
needs: changes
326+
if: ${{ needs.changes.outputs.code == 'true' }}
327+
name: E2E Test for Namespaced Controller
328+
# TODO: make it possible to run this job on macOS as well, which is a bit tricky due to the nested
329+
# virtualization is not supported on macOS runners.
330+
# E.g. Use https://github.com/douglascamata/setup-docker-macos-action per the comment in
331+
# https://github.com/actions/runner-images/issues/17#issuecomment-1971073406
332+
runs-on: ubuntu-latest
333+
steps:
334+
- uses: actions/checkout@v4
335+
- uses: actions/setup-go@v5
336+
with:
337+
cache: false
338+
go-version-file: go.mod
339+
- uses: actions/cache@v4
340+
with:
341+
path: |
342+
~/.cache/go-build
343+
~/.cache/golangci-lint
344+
~/go/pkg/mod
345+
~/go/bin
346+
key: e2e-test-${{ hashFiles('**/go.mod', '**/go.sum', '**/Makefile') }}
347+
- uses: docker/setup-buildx-action@v3
348+
- run: make test-e2e-namespaced
349+
env:
350+
# We only need to test with the latest stable version of EG, since these e2e tests
351+
# do not depend on the EG version.
352+
EG_VERSION: v1.5.0
353+
354+
test_e2e_aigw:
355+
needs: changes
356+
name: E2E Test for aigw CLI
357+
if: ${{ needs.changes.outputs.code == 'true' }}
358+
runs-on: ubuntu-latest
359+
steps:
360+
- uses: actions/checkout@v4
361+
- uses: actions/setup-go@v5
362+
with:
363+
cache: false
364+
go-version-file: go.mod
365+
- uses: actions/cache@v4
366+
with:
367+
path: |
368+
~/.cache/go-build
369+
~/.cache/golangci-lint
370+
~/go/pkg/mod
371+
~/go/bin
372+
key: e2e-aigw-test-${{ hashFiles('**/go.mod', '**/go.sum', '**/Makefile') }}
373+
- uses: docker/setup-buildx-action@v3
374+
- name: Start Ollama server
375+
run: |
376+
curl -fsSL https://ollama.com/install.sh | sh && sudo systemctl stop ollama
377+
nohup ollama serve > ollama.log 2>&1 &
378+
timeout 30 sh -c 'until nc -z localhost 11434; do sleep 1; done'
379+
grep _MODEL .env.ollama | cut -d= -f2 | xargs -I{} ollama pull {}
380+
env:
381+
OLLAMA_CONTEXT_LENGTH: 131072 # Larger context for goose
382+
OLLAMA_HOST: 0.0.0.0
383+
# Download Envoy via func-e using implicit default version `aigw` would
384+
# otherwise need to download during test runs.
385+
- name: Download Envoy via func-e
386+
run: go tool -modfile=tools/go.mod func-e run --version
387+
env:
388+
FUNC_E_HOME: /tmp/envoy-gateway # hard-coded directory in EG
389+
- name: Install Goose
390+
env:
391+
GOOSE_VERSION: v1.8.0
392+
run: |
393+
curl -fsSL https://github.com/block/goose/releases/download/stable/download_cli.sh | CONFIGURE=false bash
394+
- run: make test-e2e-aigw
395+
- if: failure()
396+
run: cat ollama.log || true
278397

279398
docker_push:
280399
# Docker builds are verified in test_e2e job, so we only need to push the images when the event is a push event.
281400
if: github.event_name == 'push'
282401
name: Push Docker Images
283-
needs: [unittest, test_crdcel, test_controller, test_extproc, test_e2e, test_e2e_inference_extension]
402+
needs: [ci-required]
284403
uses: ./.github/workflows/docker_build_job.yaml
285404
secrets: inherit
286405

@@ -312,7 +431,9 @@ jobs:
312431
- test_controller
313432
- test_extproc
314433
- test_e2e
434+
- test_e2e_upgrade
315435
- test_e2e_inference_extension
436+
- test_e2e_aigw
316437
# We need this to run always to force-fail (and not skip) if any needed
317438
# job has failed. Otherwise, a skipped job will not fail the workflow.
318439
if: always()

0 commit comments

Comments
 (0)