fix(validator): use DRA GA API for dra-support check#523
Merged
Conversation
3 tasks
Coverage Report ✅
Coverage BadgeCoverage unchanged by this PR. |
mchmarny
previously approved these changes
Apr 10, 2026
cafb04f to
e1adf3a
Compare
11 tasks
15008f9 to
724fb38
Compare
…heck The dra-support check gated on resource.k8s.io/v1beta1 discovery, which was removed in K8s 1.34 when DRA graduated to GA. This caused the check to skip on 1.34+ clusters even though DRA was fully operational. Switch the API gate to resource.k8s.io/v1 which is consistent with all downstream DRA code (ResourceSlices, ResourceClaims, secure-access-check, gang-scheduling-check). Fixes: #491
724fb38 to
89c0bf0
Compare
mchmarny
approved these changes
Apr 10, 2026
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.
Summary
Switch the dra-support check API gate from
resource.k8s.io/v1beta1toresource.k8s.io/v1so the check no longer false-skips on K8s 1.34+ clusters where DRA graduated to GA.Motivation / Context
DRA graduated to GA (
resource.k8s.io/v1) in K8s 1.34 andv1beta1was removed. The dra-support check gated onv1beta1discovery, causing it to skip on 1.34+ clusters even though DRA was fully operational (confirmed by secure-accelerator-access check which successfully creates ResourceClaims and runs GPU workloads via DRA).Fixes: #491
Related: N/A
Type of Change
Component(s) Affected
cmd/aicr,pkg/cli)cmd/aicrd,pkg/api,pkg/server)pkg/recipe)pkg/bundler,pkg/component/*)pkg/collector,pkg/snapshotter)pkg/validator)pkg/errors,pkg/k8s)docs/,examples/)Implementation Notes
dra_support_check.go:41fromresource.k8s.io/v1beta1toresource.k8s.io/v1ResourceSlices,ResourceClaims,secure_access_check.go,gang_scheduling_check.go) already usesresource.k8s.io/v1exclusivelyTesting
go test -v -race ./validators/conformance/ -run TestCheckDRASupport golangci-lint run ./validators/conformance/TestCheckDRASupport_SkipsWhenNoDRAAPI— no DRA API registered, check skips gracefullyTestCheckDRASupport_V1GatePassesThenChecksDriver— v1 API present, check proceeds past gate to driver detection (does not false-skip)Risk Assessment
Rollout notes: Clusters running K8s < 1.34 that only have
v1beta1will now see the check skip with a clear message about requiring K8s 1.34+. This is correct behavior since all DRA validation code uses the GA API.Checklist
make testwith-race)make lint)git commit -S)