Skip to content

fix(validator): use DRA GA API for dra-support check#523

Merged
mchmarny merged 2 commits intomainfrom
fix/issue-491-dra-v1-detection
Apr 10, 2026
Merged

fix(validator): use DRA GA API for dra-support check#523
mchmarny merged 2 commits intomainfrom
fix/issue-491-dra-v1-detection

Conversation

@yuanchen8911
Copy link
Copy Markdown
Contributor

Summary

Switch the dra-support check API gate from resource.k8s.io/v1beta1 to resource.k8s.io/v1 so 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 and v1beta1 was removed. The dra-support check gated on v1beta1 discovery, 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

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • Build/CI/tooling

Component(s) Affected

  • CLI (cmd/aicr, pkg/cli)
  • API server (cmd/aicrd, pkg/api, pkg/server)
  • Recipe engine / data (pkg/recipe)
  • Bundlers (pkg/bundler, pkg/component/*)
  • Collectors / snapshotter (pkg/collector, pkg/snapshotter)
  • Validator (pkg/validator)
  • Core libraries (pkg/errors, pkg/k8s)
  • Docs/examples (docs/, examples/)
  • Other: ____________

Implementation Notes

  • Changed the API discovery gate at dra_support_check.go:41 from resource.k8s.io/v1beta1 to resource.k8s.io/v1
  • No v1beta1 fallback — all downstream DRA code (ResourceSlices, ResourceClaims, secure_access_check.go, gang_scheduling_check.go) already uses resource.k8s.io/v1 exclusively
  • Skip message now clarifies "requires K8s 1.34+"
  • This is a 2-line change in the check itself (gate version + skip message)

Testing

go test -v -race ./validators/conformance/ -run TestCheckDRASupport
golangci-lint run ./validators/conformance/
  • TestCheckDRASupport_SkipsWhenNoDRAAPI — no DRA API registered, check skips gracefully
  • TestCheckDRASupport_V1GatePassesThenChecksDriver — v1 API present, check proceeds past gate to driver detection (does not false-skip)
  • Note: tests are focused on the API gate fix; full DRA happy path (driver pods, ResourceSlices, allocation) requires a live cluster

Risk Assessment

  • Low — Isolated change, well-tested, easy to revert

Rollout notes: Clusters running K8s < 1.34 that only have v1beta1 will 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

  • Tests pass locally (make test with -race)
  • Linter passes (make lint)
  • I did not skip/disable tests to make CI green
  • I added/updated tests for new functionality
  • I updated docs if user-facing behavior changed
  • Changes follow existing patterns in the codebase
  • Commits are cryptographically signed (git commit -S)

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

Coverage Report ✅

Metric Value
Coverage 74.5%
Threshold 70%
Status Pass
Coverage Badge
![Coverage](https://img.shields.io/badge/coverage-74.5%25-green)

Coverage unchanged by this PR.

mchmarny
mchmarny previously approved these changes Apr 10, 2026
@mchmarny mchmarny added this to the v0.12 milestone Apr 10, 2026
@yuanchen8911 yuanchen8911 force-pushed the fix/issue-491-dra-v1-detection branch 2 times, most recently from cafb04f to e1adf3a Compare April 10, 2026 17:24
@yuanchen8911 yuanchen8911 requested a review from a team as a code owner April 10, 2026 17:24
@yuanchen8911 yuanchen8911 requested a review from mchmarny April 10, 2026 17:59
@yuanchen8911 yuanchen8911 force-pushed the fix/issue-491-dra-v1-detection branch from 15008f9 to 724fb38 Compare April 10, 2026 18:03
@github-actions github-actions bot removed the area/ci label Apr 10, 2026
…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
@yuanchen8911 yuanchen8911 force-pushed the fix/issue-491-dra-v1-detection branch from 724fb38 to 89c0bf0 Compare April 10, 2026 18:49
@mchmarny mchmarny enabled auto-merge (squash) April 10, 2026 19:47
@mchmarny mchmarny merged commit c225ce2 into main Apr 10, 2026
17 checks passed
@mchmarny mchmarny deleted the fix/issue-491-dra-v1-detection branch April 10, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: dra-support check skipped on K8s 1.34+

2 participants