Skip to content

Fix placement for malformed GPU pod requests - #23

Open
googs1025 wants to merge 1 commit into
InftyAI:mainfrom
googs1025:fix-contradictory-gpu-pod-placement
Open

Fix placement for malformed GPU pod requests#23
googs1025 wants to merge 1 commit into
InftyAI:mainfrom
googs1025:fix-contradictory-gpu-pod-placement

Conversation

@googs1025

Copy link
Copy Markdown
Member

Summary

  • Keep opted-in Pods gated when they request nvidia.com/gpu without an accelerator-type label
  • Avoid silently treating malformed GPU requests as CPU-only placements
  • Add a placement regression test covering the malformed request

Test Plan

  • /Users/zhenyu.jiang/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.26.4.darwin-arm64/bin/go test ./internal/controller ./pkg/util -count=1

Copilot AI lite review requested due to automatic review settings August 10, 2026 04:59
@InftyAI-Agent InftyAI-Agent added needs-triage Indicates an issue or PR lacks a label and requires one. needs-priority Indicates a PR lacks a label and requires one. do-not-merge/needs-kind Indicates a PR lacks a label and requires one. labels Aug 10, 2026
@InftyAI-Agent
InftyAI-Agent requested a review from kerthcet August 10, 2026 04:59

Copilot AI 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.

Pull request overview

This PR changes the Pod placement controller to treat malformed GPU requests (a nvidia.com/gpu count without an accelerator-type label) as invalid and keep the Pod scheduling-gated, instead of silently placing it as CPU-only.

Changes:

  • Handle util.AcceleratorRequest(pod) errors in placement selection and leave the Pod gated on invalid accelerator requests.
  • Add a regression test ensuring a malformed GPU request does not get a provider nodeSelector or NodeClaim.

Reviewed changes

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

File Description
internal/controller/pod_placement_helpers.go Stops ignoring AcceleratorRequest errors so malformed GPU requests remain gated and unplaced.
internal/controller/pod_placement_controller_test.go Adds a controller-level regression test for GPU-count-without-accelerator-type behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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

Labels

do-not-merge/needs-kind Indicates a PR lacks a label and requires one. needs-priority Indicates a PR lacks a label and requires one. needs-triage Indicates an issue or PR lacks a label and requires one.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants