Skip to content

test: move GAIE CRD builders into test/framework/gaie#33

Open
chethanuk wants to merge 1 commit into
feat/1188-k8s-buildersfrom
feat/1188-gaie-builders
Open

test: move GAIE CRD builders into test/framework/gaie#33
chethanuk wants to merge 1 commit into
feat/1188-k8s-buildersfrom
feat/1188-gaie-builders

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:

Fifth of eight in the llm-d#1188 split. It follows the Pod builder move.

This is where pkg/epp/util/testing loses its last symbols, so the package, the
directory and the testutil alias in .golangci.yml all go with it.

The GAIE builders go to test/framework/gaie. They cannot share a package with the
envtest harness that arrives later in the chain, which is why gaie and epp/harness
are separate rather than one test/framework/epp.
pkg/epp/datastore/datastore_test.go is an in-package test and it calls
MakeInferencePool. The harness imports cmd/epp/runner, which imports
pkg/epp/datastore, so a shared package would put that test in a cycle.

This PR and the Pod builder PR both touch wrappers.go and
pkg/epp/controller/inferencepool_reconciler_test.go. The line changes are disjoint
but the import blocks are not, so the order is strict.

Test plan:

  • go build and go vet ./test/... clean at this commit, so the delete left no
    dangling reference and no cycle
  • go test ./test/framework/... passes, builders at 100% coverage

Which issue(s) this PR fixes:

Part of llm-d#1188

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

NONE

This completes the wrappers.go removal llm-d#1188 asks for. The GAIE builders are
framework-generic: they touch the GAIE and apix API types and pkg/common/routing,
never pkg/epp, so they belong beside the other shared test builders rather than
under pkg/epp/util. With the last symbols gone, the package, its directory and
its importas alias go too, and no config references the dead path afterwards.

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: 9021a90b-efe8-47b2-8c20-ef5df98ec89c

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-gaie-builders

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 builders by moving them from pkg/epp/util/testing to a new package test/framework/gaie (aliased as fwkgaie), and adds comprehensive unit tests for these builders in builders_test.go. Feedback is provided to leverage the newly introduced TargetPorts builder method in test/utils/server.go to simplify the test pool setup.

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 thread test/utils/server.go
Comment on lines +73 to 74
pool := fwkgaie.MakeInferencePool(poolName).Namespace(namespace).ObjRef()
pool.Spec.TargetPorts = []v1.Port{{Number: v1.PortNumber(poolPort)}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The newly introduced TargetPorts builder method can be used here to simplify the setup of the test InferencePool and leverage the fluent API design.

Suggested change
pool := fwkgaie.MakeInferencePool(poolName).Namespace(namespace).ObjRef()
pool.Spec.TargetPorts = []v1.Port{{Number: v1.PortNumber(poolPort)}}
pool := fwkgaie.MakeInferencePool(poolName).Namespace(namespace).TargetPorts(poolPort).ObjRef()

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