feat(hygon): add resourcePrefix for DCU/HCU upgrade compat… #3375
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.42) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 329 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.347
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3375"
general
weight: 0.35
spencercjh
What type of PR is this?
/kind feature
What this PR does / why we need it:
Hygon renamed DCU to HCU. Newer HAMi and device-plugin builds advertise
hygon.com/hcunum(and related keys), while older clusters still reporthygon.com/dcunum. Upgrading the scheduler without aligning those names leaves pods unschedulable.This PR adds a single
resourcePrefix(Helm:devices.hygon.resourcePrefix, defaulthcu) that must match the Hygon device plugin. Only one prefix is accepted: lowercase alphanumeric and must containcu(practicallyhcuordcu). No dual-stack /*cuwildcard.From that prefix the scheduler derives:
hygon.com/<prefix>num|mem|coreshygon.com/use-<prefix>type,hygon.com/nouse-<prefix>typehami.io/node-handshake-<prefix>,hami.io/node-<prefix>-register,hami.io/<prefix>-devices-to-allocate,hami.io/<prefix>-devices-allocatedUUID annotations (
hygon.com/use-gpuuuid/nouse-gpuuuid) and the node lock stay unchanged. The chart derives the three resource names from the prefix for the device ConfigMap and extender managed-resources list. An explicit custom resource name still wins. The historical defaultshygon.com/hcunum,hygon.com/hcumem, andhygon.com/hcucoresare treated as unset whenresourcePrefixis nothcu, so a Helm upgrade that still carries those defaults follows the new prefix.The scheduler device id stays
HCU. Changing it toDCUwould drop pods already recorded underHCU. Card models are matched againstresourcePrefixinstead:DCU-K100_AImatchesdcu, andHCU-K100_AImatcheshcu.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
devices.hygon.resourcePrefix: dcuon HAMi and keep the same prefix on the Hygon device plugin.hcu.dcuResourceName/hcuResourceNamerejection messages are unchanged.--hcu-name,--hcu-memory, and--hcu-coresstay registered so existing command lines still parse. They are not a source of resource names.Apply()and model matching.Does this PR introduce a user-facing change?:
``
release-note
``Add devices.hygon.resourcePrefix (default hcu) to select the Hygon resource/annotation prefix for DCU↔HCU upgrades. Set dcu when the device plugin still reports DCU resources. The scheduler device id stays HCU.