feat: support mixed MIG profiles#8869
Draft
karenychen wants to merge 6 commits into
Draft
Conversation
Contributor
|
The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for a new plural MigProfiles/mig_profiles contract while preserving the legacy scalar GPUInstanceProfile path by resolving both into a single “MIG profiles list” used across AgentBaker templating, aks-node-controller parsing, and the Linux MIG partitioning script.
Changes:
- Resolve legacy
GPUInstanceProfileand newMIGProfiles/mig_profilesinto a single MIG profile list and propagate it viaGPU_INSTANCE_PROFILEand newMIG_PROFILESenv vars. - Extend
mig-partition.shto support mixed profile lists whenNVIDIA_MIG_STRATEGY=Mixed, and update systemd env wiring. - Update aks-node-controller proto + generated code and add/extend unit + ShellSpec coverage for mixed MIG profiles.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| spec/parts/linux/cloud-init/artifacts/mig_partition_spec.sh | Adds ShellSpec coverage for single and mixed MIG profile partitioning behavior. |
| pkg/agent/variables.go | Computes resolved MIG profiles list and emits MIG_NODE, GPU_INSTANCE_PROFILE, and migProfiles variables accordingly. |
| pkg/agent/datamodel/types.go | Adds MIGProfiles to NodeBootstrappingConfiguration and a helper to resolve legacy vs new fields. |
| pkg/agent/datamodel/helper.go | Updates IsMIGNode to operate on a resolved MIG profile list. |
| pkg/agent/baker.go | Exposes GetMIGProfiles and updates MIG-related template funcs to use the resolved list. |
| pkg/agent/baker_test.go | Adds a test covering mixed MIG profiles flowing into CSE vars. |
| parts/linux/cloud-init/artifacts/mig-partition.sh | Implements mixed MIG layout generation and legacy-compatible parsing of env/args. |
| parts/linux/cloud-init/artifacts/cse_config.sh | Passes MIG_PROFILES and NVIDIA_MIG_STRATEGY into the mig-partition systemd unit environment. |
| parts/linux/cloud-init/artifacts/cse_cmd.sh | Adds MIG_PROFILES to the generated CSE env var set. |
| aks-node-controller/proto/README.md | Documents new MIG_PROFILES mapping for GPUConfig. |
| aks-node-controller/proto/aksnodeconfig/v1/gpu_config.proto | Adds repeated string mig_profiles = 9 and updates MIG strategy comment. |
| aks-node-controller/pkg/gen/aksnodeconfig/v1/gpu_config.pb.go | Regenerates Go bindings for the new mig_profiles field. |
| aks-node-controller/parser/parser.go | Emits MIG_NODE, GPU_INSTANCE_PROFILE, and MIG_PROFILES from a resolved profile list. |
| aks-node-controller/parser/parser_test.go | Adds mixed MIG profile test case and asserts empty MIG_PROFILES when unset. |
| aks-node-controller/parser/helper.go | Adds getMIGProfiles resolver and updates MIG detection to use the resolved list. |
Files not reviewed (1)
- aks-node-controller/pkg/gen/aksnodeconfig/v1/gpu_config.pb.go: Generated file
Comment on lines
+54
to
+66
| trim_profile() { | ||
| local profile="$1" | ||
| profile="${profile#"${profile%%[![:space:]]*}"}" | ||
| profile="${profile%"${profile##*[![:space:]]}"}" | ||
| echo "$profile" | ||
| } | ||
|
|
||
| mixed_gpu_instance_profiles_layout() { | ||
| local profiles_csv="$1" | ||
| local layout="" | ||
| local profile | ||
| local profile_id | ||
|
|
karenychen
force-pushed
the
codex/mig-profiles-contract
branch
from
July 17, 2026 15:11
56354d3 to
98b6ee1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Adds AgentBaker support for the new
MigProfilescontract while preserving the legacyGPUInstanceProfilepath. The parser resolves the mutually exclusive legacy scalar and new plural field into one MIG profile list for shared logic, and the Linux MIG partitioning script can now apply multiple GPU instance profiles.This also updates the aks-node-controller proto/generated code and snapshots/spec coverage for the mixed-profile path.
Which issue(s) this PR fixes:
Fixes #
Testing:
make generatemake testmake test-shellgo test ./aks-node-controller/parser ./pkg/agentgit diff --check origin/main...HEAD