Skip to content

Commit a9014f8

Browse files
committed
chore: removes envoy installation requirement for running extproc tests
Signed-off-by: Takeshi Yoneda <[email protected]>
1 parent 29f243f commit a9014f8

File tree

3 files changed

+11
-26
lines changed

3 files changed

+11
-26
lines changed

.github/workflows/build_and_test.yaml

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -140,16 +140,15 @@ jobs:
140140
strategy:
141141
fail-fast: false
142142
matrix:
143-
# Note: we cannot run the latest Envoy version on macOS due to https://github.com/tetratelabs/archive-envoy/issues/12.
144-
# Once it's supported, the following "binary installation" steps below can be just removed and
145-
# 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.
146143
include:
147-
- version: 1.35.0 # NOTE: when updating this, also update the comment in the CONTRIBUTING.md file.
144+
- version: 1.35.0
148145
os: ubuntu-latest
149-
- version: 1.35.0 # NOTE: when updating this, also update the comment in the CONTRIBUTING.md file.
146+
- version: 1.35.0
150147
os: macos-latest
151-
- version: latest
148+
- version: 1.36.0
152149
os: ubuntu-latest
150+
- version: 1.36.0
151+
os: macos-latest
153152
runs-on: ${{ matrix.os }}
154153
steps:
155154
- uses: actions/checkout@v4
@@ -164,19 +163,6 @@ jobs:
164163
~/go/pkg/mod
165164
~/go/bin
166165
key: extproc-tests-${{ hashFiles('**/go.mod', '**/go.sum', '**/Makefile') }}
167-
- name: Install stable Envoy via func-e
168-
if: matrix.version != 'latest'
169-
run: |
170-
go tool -modfile=tools/go.mod func-e use ${{ matrix.version }}
171-
echo $HOME/.func-e/versions/${{ matrix.version }}/bin >> $GITHUB_PATH
172-
- name: Install latest Envoy
173-
if: matrix.version == 'latest'
174-
run: |
175-
export ENVOY_BIN_DIR=$HOME/envoy/bin
176-
mkdir -p $ENVOY_BIN_DIR
177-
docker run -v $ENVOY_BIN_DIR:/tmp/ci -w /tmp/ci \
178-
--entrypoint /bin/cp envoyproxy/envoy-dev:latest /usr/local/bin/envoy .
179-
echo $ENVOY_BIN_DIR >> $GITHUB_PATH
180166
- env:
181167
TEST_AWS_ACCESS_KEY_ID: ${{ secrets.AWS_BEDROCK_USER_AWS_ACCESS_KEY_ID }}
182168
TEST_AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_BEDROCK_USER_AWS_SECRET_ACCESS_KEY }}
@@ -187,6 +173,8 @@ jobs:
187173
TEST_SAMBANOVA_API_KEY: ${{ secrets.ENVOY_AI_GATEWAY_SAMBANOVA_API_KEY }}
188174
TEST_DEEPINFRA_API_KEY: ${{ secrets.ENVOY_AI_GATEWAY_DEEPINFRA_API_KEY }}
189175
TEST_GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
176+
# This will be picked up by func-e to run the specified Envoy version.
177+
ENVOY_VERSION: ${{ matrix.version }}
190178
run: make test-extproc
191179

192180
test_e2e:

CONTRIBUTING.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@ For example,
4343

4444
- The latest `kubectl` binary for running `make test-e2e`.
4545
- See: https://kubernetes.io/docs/tasks/tools/
46-
- The latest `envoy` binary for running `make test-extproc`. The current required version is v1.35 or later.
47-
- On Linux, you can download the latest Envoy binary as described in https://www.envoyproxy.io/docs/envoy/latest/start/install.
48-
Alternatively, you can use `func-e` on Linux as well like on macOS below.
49-
- On macOS, since `brew envoy` tends to behind the latest version, it is recommended use `func-e` to run the latest Envoy. See https://func-e.io/.
50-
- `alias envoy='func-e run'` is a convenient way to run the latest Envoy binary via `func-e` on both macOS and Linux.
51-
For example, `func-e use 1.34` can be used to switch to a specific version of Envoy to be run with `func-e run`.
5246

5347
Other than that, everything will be automatically managed and installed via `make` targets,
5448
and you should not need to worry about the dependencies (tell us if you do).

tests/internal/testenvironment/test_environment.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919
"testing"
2020
"time"
2121

22+
testsinternal "github.com/envoyproxy/ai-gateway/tests/internal"
2223
"github.com/stretchr/testify/require"
2324
"golang.org/x/sync/errgroup"
2425

@@ -257,14 +258,16 @@ func requireEnvoy(t testing.TB,
257258
envoyYamlPath := t.TempDir() + "/envoy.yaml"
258259
require.NoError(t, os.WriteFile(envoyYamlPath, []byte(processedConfig), 0o600))
259260

260-
cmd := exec.CommandContext(t.Context(), "envoy",
261+
cmd := testsinternal.GoToolCmdContext(t.Context(), "func-e", "run",
261262
"-c", envoyYamlPath,
262263
"--concurrency", strconv.Itoa(max(runtime.NumCPU(), 2)),
263264
// This allows multiple Envoy instances to run in parallel.
264265
"--base-id", strconv.Itoa(time.Now().Nanosecond()),
265266
// Add debug logging for extproc.
266267
"--component-log-level", "ext_proc:trace,http:debug,connection:debug",
267268
)
269+
// Use the existing environment for func-e.
270+
cmd.Env = os.Environ()
268271

269272
// wait for the ready message or exit.
270273
StartAndAwaitReady(t, cmd, stdout, stderr, "starting main dispatch loop")

0 commit comments

Comments
 (0)