Skip to content

make building image and setting infra optional - #598

Merged
lionelvillard merged 2 commits into
llm-d:mainfrom
lionelvillard:optional-env
Jan 16, 2026
Merged

make building image and setting infra optional#598
lionelvillard merged 2 commits into
llm-d:mainfrom
lionelvillard:optional-env

Conversation

@lionelvillard

Copy link
Copy Markdown
Collaborator

See below.

Signed-off-by: Lionel Villard <villard@us.ibm.com>
Copilot AI review requested due to automatic review settings January 16, 2026 21:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request refactors test utility functions by moving llm-d-sim resource creation functions from test/utils/e2eutils.go to a new dedicated package test/utils/resources. Additionally, it introduces optional environment variables for the e2e-saturation test suite to skip building images and setting up infrastructure, enabling faster test iterations during development.

Changes:

  • Moved llm-d-sim deployment, service, and ServiceMonitor creation functions to test/utils/resources/llmdsim.go
  • Added support for skipping image builds (IMAGE_BUILD_SKIP) and infrastructure setup/teardown (INFRA_SETUP_SKIP, INFRA_TEARDOWN_SKIP) in e2e-saturation tests
  • Updated all test files to import and use the new resources package

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/utils/resources/llmdsim.go New file containing three helper functions for creating llm-d-sim Kubernetes resources
test/utils/e2eutils.go Removed llm-d-sim resource creation functions and their import dependencies
test/e2e/e2e_test.go Updated imports and function calls to use the new resources package
test/e2e-saturation-based/e2e_saturation_test.go Updated imports and function calls to use the new resources package
test/e2e-saturation-based/e2e_saturation_suite_test.go Added environment variables for optional test setup steps with conditional logic
internal/controller/variantautoscaling_controller_test.go Updated imports and function calls to use the new resources package
Makefile Updated documentation for new environment variables

// These variables are useful if CertManager is already installed, avoiding
// re-installation and conflicts.
// - IMAGE_BUILD_SKIP=true: Skips building the WVA docker image during test setup.
// - DEPLOY_INFRA_SKIP=true: Skips deploying the WVA controller manager during test setup.

Copilot AI Jan 16, 2026

Copy link

Choose a reason for hiding this comment

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

The comment references DEPLOY_INFRA_SKIP but the actual environment variable used in the code (line 44) is INFRA_SETUP_SKIP. This inconsistency could confuse users.

Suggested change
// - DEPLOY_INFRA_SKIP=true: Skips deploying the WVA controller manager during test setup.
// - INFRA_SETUP_SKIP=true: Skips deploying the WVA controller manager during test setup.

Copilot uses AI. Check for mistakes.
_, err = utils.Run(cmd)
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to build the manager(Operator) image")
} else {
_, _ = fmt.Fprintf(GinkgoWriter, "Skipping WVA image build (WVA_IMAGE_BUILD_SKIP=true)\n")

Copilot AI Jan 16, 2026

Copy link

Choose a reason for hiding this comment

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

The message references WVA_IMAGE_BUILD_SKIP but the actual environment variable used in the code (line 43) is IMAGE_BUILD_SKIP. The variable names should be consistent.

Suggested change
_, _ = fmt.Fprintf(GinkgoWriter, "Skipping WVA image build (WVA_IMAGE_BUILD_SKIP=true)\n")
_, _ = fmt.Fprintf(GinkgoWriter, "Skipping WVA image build (IMAGE_BUILD_SKIP=true)\n")

Copilot uses AI. Check for mistakes.
Signed-off-by: Lionel Villard <villard@us.ibm.com>

@asm582 asm582 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

/lgtm

@lionelvillard
lionelvillard merged commit d0c4cd9 into llm-d:main Jan 16, 2026
6 checks passed
@lionelvillard
lionelvillard deleted the optional-env branch June 18, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants