Skip to content

test: move ext_proc builders into test/framework/epp#34

Open
chethanuk wants to merge 1 commit into
feat/1188-gaie-buildersfrom
feat/1188-extproc-framework
Open

test: move ext_proc builders into test/framework/epp#34
chethanuk wants to merge 1 commit into
feat/1188-gaie-buildersfrom
feat/1188-extproc-framework

Conversation

@chethanuk

Copy link
Copy Markdown
Owner

What type of PR is this?

/kind cleanup
/kind test

What this PR does / why we need it:

Sixth of eight in the llm-d#1188 split. It follows the GAIE builders move.

test/integration/util.go was a 642-line grab bag of ext_proc request builders and
live stream executors, and the suite under test/integration/epp imported the
directory above it as a package. That is the cyclic shape llm-d#1188 calls out: helpers
living inside the tree that consumes them. It moves to test/framework/epp, split
into builders_extproc.go and client_extproc.go. Afterwards the only Go files left
in test/integration sit behind the integration_tests build tag, so the directory
is no longer importable.

Five symbols are deleted rather than moved. ReqLLMWithStream, ReqLLMUnary,
SendRequest and StartExtProcServer have no callers anywhere in the tree, and
GenerateRequestWithStream is reachable only from ReqLLMWithStream.

The new tests are here for the coverage gate: several hundred untested lines would
drag down the shared ./test/framework/... number. They assert message shape, not
EPP behavior.

extPorcConnSetupPollInterval is misspelled. It moves verbatim so the diff stays
readable as a move. Worth a separate cleanup.

Test plan:

  • go build and go vet ./test/... clean at this commit
  • go test ./test/framework/... passes, covering the builders and the stream
    client against an in-process echo server

Which issue(s) this PR fixes:

Part of llm-d#1188

Release note (write NONE if no user-facing change):

NONE

test/integration held a 642-line grab bag of ext_proc request builders and
live executors that the integration suite imported as a package, which is the
cyclic-dependency risk llm-d#1188 calls out: helpers living inside the tree that
consumes them. The builders and executors are framework-generic, so they move
to test/framework/epp and test/integration stops being importable.

Five symbols are deleted rather than moved. ReqLLMWithStream, ReqLLMUnary,
SendRequest and StartExtProcServer have no callers, and GenerateRequestWithStream
is reachable only from ReqLLMWithStream, so moving it would ship a zero-caller
export into the new package.

Part of llm-d#1188

Signed-off-by: ChethanUK <chethanuk@outlook.com>
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4a5ff663-8ce9-42bd-b524-17319256d6f5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/1188-extproc-framework

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the test framework by moving ext_proc request/response builders and gRPC stream executors from the integration package to a dedicated test/framework/epp package. It extracts client execution helpers into client_extproc.go and introduces comprehensive unit tests for both builders and client utilities, updating all integration tests to use the new framework package. The feedback points out a concurrency issue in TestClientWaitsForALateServer where ExtProcServerClient is called inside a background goroutine; since it internally uses require assertions that invoke t.FailNow(), this can cause undefined behavior or deadlocks in Go tests, and should be refactored to return errors or run the server setup in the background instead.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +221 to +224
go func() {
client, conn := ExtProcServerClient(t.Context(), t, port, logr.Discard())
done <- dialed{client: client, conn: conn}
}()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Calling ExtProcServerClient inside a background goroutine is unsafe because it internally uses require.Eventually and require.NoError. In Go's testing package, calling methods that invoke t.FailNow() (such as require assertions) from any goroutine other than the main test goroutine is unsafe and can lead to deadlocks, silent failures, or panics.

To fix this, you can refactor ExtProcServerClient in client_extproc.go to return an error instead of asserting internally, or run the late server setup in the background with a delayed start and call ExtProcServerClient on the main test goroutine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant