Skip to content

Fix placement for malformed GPU pod requests - #23

Merged
InftyAI-Agent merged 1 commit into
InftyAI:mainfrom
googs1025:fix-contradictory-gpu-pod-placement
Aug 10, 2026
Merged

Fix placement for malformed GPU pod requests#23
InftyAI-Agent merged 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
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 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.

@googs1025

Copy link
Copy Markdown
Member Author

/kind bug

@InftyAI-Agent InftyAI-Agent added bug Categorizes issue or PR as related to a bug. and removed do-not-merge/needs-kind Indicates a PR lacks a label and requires one. labels Aug 10, 2026
@kerthcet

Copy link
Copy Markdown
Member

/lgtm
/approve

Thanks @googs1025

@InftyAI-Agent InftyAI-Agent added lgtm Looks good to me, indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 10, 2026

@InftyAI-Agent InftyAI-Agent left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved: PR has both lgtm and approved labels

@InftyAI-Agent
InftyAI-Agent merged commit e95b524 into InftyAI:main Aug 10, 2026
42 of 43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. bug Categorizes issue or PR as related to a bug. lgtm Looks good to me, indicates that a PR is ready to be merged. 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.

4 participants