Skip to content

chore: add cases for LWP env#287

Merged
cheyang merged 1 commit intosgl-project:mainfrom
Syspretor:chore/add-e2e-case-for-lwp
Apr 22, 2026
Merged

chore: add cases for LWP env#287
cheyang merged 1 commit intosgl-project:mainfrom
Syspretor:chore/add-e2e-case-for-lwp

Conversation

@Syspretor
Copy link
Copy Markdown
Collaborator

Ⅰ. Motivation

Ⅱ. Modifications

Ⅲ. Does this pull request fix one issue?

fixes #XXXX

Ⅳ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.

Ⅴ. Describe how to verify it

VI. Special notes for reviews

Checklist

  • Format your code make fmt.
  • Add unit tests or integration tests.
  • Update the documentation related to the change.

Copy link
Copy Markdown

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

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 enhances the E2E testing framework by adding a Clientset to the Framework struct and implementing a GetPodLogs helper method. It also introduces new test cases for the leaderWorkerPattern, including environment variable injection verification and a distributed CPU torchrun job. Feedback was provided regarding the inefficiency and potential flakiness of installing heavy dependencies like PyTorch via pip during test execution, with a recommendation to use a pre-built container image instead.

Comment thread test/e2e/testcase/v1alpha2/lws.go
Comment thread test/e2e/testcase/v1alpha2/lws.go
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds new end-to-end coverage for LeaderWorkerPattern (LWP) environment variable injection and a functional multi-node torchrun job, plus a framework helper to fetch Pod logs for these assertions.

Changes:

  • Add e2e test validating RBG_LWP_* env vars are injected for leader/worker Pods in default RoleInstanceSet mode.
  • Add e2e test that runs a simple CPU torchrun distributed all-reduce using injected LWP env vars.
  • Extend e2e framework with a Clientset and GetPodLogs helper for reading Pod logs.

Reviewed changes

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

File Description
test/e2e/testcase/v1alpha2/lws.go Adds two new LWP-focused e2e test cases (env var validation + torchrun functional job).
test/e2e/framework/framework.go Adds client-go Clientset wiring and a helper to stream Pod logs for assertions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/e2e/testcase/v1alpha2/lws.go
Comment thread test/e2e/testcase/v1alpha2/lws.go
Comment thread test/e2e/testcase/v1alpha2/lws.go
@Syspretor Syspretor force-pushed the chore/add-e2e-case-for-lwp branch from 9e3dea0 to a71e6e5 Compare April 22, 2026 09:55
Copy link
Copy Markdown
Collaborator

@cheyang cheyang left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@cheyang cheyang merged commit 8cc1f2b into sgl-project:main Apr 22, 2026
9 checks passed
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