WIP: feat(resource_claim): add ResourceClaim and ResourceClaimTemplate wrappers #2837
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 225 lines diff across 2 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.324
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #2837"
general
weight: 0.35
azhivovk
##### Short description:
Add auto-generated
ResourceClaimandResourceClaimTemplatewrappers (resource.k8s.io/v1, Dynamic Resource Allocation).##### More details:
Both classes are generated via
class-generator(no manual edits between the generated-code markers):ResourceClaim—devicesfield +to_dict.ResourceClaimTemplate—metadataand requiredspec_spec(guarded byMissingRequiredArgumentError) +to_dict, correctly nestingspec.spec/spec.metadata.Supporting changes required for generation to work and to reproduce without a cluster:
RESOURCE_K8S_IOtoResource.ApiGroup._definitions.json+ resources mappings) for both kinds.test_class_generatorentries.##### What this PR does / why we need it:
Provides
ResourceClaimandResourceClaimTemplatewrappers so they can be consumed from the tests repo (and anywhere DRA resources are managed), instead of hand-building raw API payloads.##### Which issue(s) this PR fixes: -
##### Special notes for reviewer: -
##### Bug: -
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
Added support for Kubernetes
ResourceClaimandResourceClaimTemplateresources in theresource.k8s.ioAPI group.ResourceClaimcan include device claim details.ResourceClaimTemplatesupports specification and optional metadata, and reports an error if its required specification is missing.Resource serialization now preserves the
specproperty under the correct key while continuing to exclude it from other generated dictionaries.<!-- end of auto-generated comment: release notes by coderabbit.ai -->