Skip to content

feat(dpf): Add DPF DPUService create, patch and delete support - #5005

Open
hanyux-nv wants to merge 1 commit into
NVIDIA:mainfrom
hanyux-nv:dpu_service_crd
Open

feat(dpf): Add DPF DPUService create, patch and delete support#5005
hanyux-nv wants to merge 1 commit into
NVIDIA:mainfrom
hanyux-nv:dpu_service_crd

Conversation

@hanyux-nv

@hanyux-nv hanyux-nv commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

This PR adds

  • Create, merge-patch, and delete operations for DPF DPUService resources.
  • Expose namespace-scoped DPUService lifecycle methods through DpfSdk.
  • Add SDK mock coverage for the create, patch, delete lifecycle.

Related issues

#4738

Type of Change

  • Add - New feature or capability
  • Change - Changes in existing functionality
  • Fix - Bug fixes
  • Remove - Removed features or deprecated functionality
  • Internal - Internal changes (refactoring, tests, docs, etc.)

Breaking Changes

  • This PR contains breaking changes

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Signed-off-by: Felicity Xu <hanyux@nvidia.com>
@hanyux-nv
hanyux-nv requested a review from a team as a code owner August 14, 2026 19:11
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 8382ba36-4fe7-44de-90b7-e9219bcd4257

📥 Commits

Reviewing files that changed from the base of the PR and between e62e6cc and 05081b3.

📒 Files selected for processing (4)
  • crates/dpf/src/repository/kube.rs
  • crates/dpf/src/repository/traits.rs
  • crates/dpf/src/sdk.rs
  • crates/machine-controller/src/dpf.rs

Summary by CodeRabbit

  • New Features

    • Added support for creating detached DPU services in the configured namespace.
    • Added support for updating DPU services with JSON patches.
    • Added support for deleting DPU services by name.
    • Extended machine-controller operations to manage the full DPU service lifecycle.
  • Bug Fixes

    • Creation now correctly respects the service namespace, with a default fallback when unspecified.
  • Tests

    • Added coverage for DPU service creation, patching, deletion, and namespace handling.

Walkthrough

Changes

The change adds create, JSON merge-patch, and delete operations for detached DPUService resources. The repository, SDK, machine-controller interface, SDK adapter, mocks, and lifecycle tests now support these operations.

DPUService lifecycle

Layer / File(s) Summary
Repository lifecycle operations
crates/dpf/src/repository/traits.rs, crates/dpf/src/repository/kube.rs
DpuServiceRepository now creates, patches, and deletes DPUService resources. Creation uses the resource namespace with a default fallback. Kubernetes API errors propagate through DpfError.
SDK service API and lifecycle tests
crates/dpf/src/sdk.rs
DpfSdk now creates services in its configured namespace, patches services by name, and deletes services. Mocks and lifecycle tests cover namespace assignment, patch delegation, and deletion.
Machine-controller delegation
crates/machine-controller/src/dpf.rs
DpfOperations exposes the new service operations. DpfSdkOps delegates each operation to DpfSdk.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to 05081

The PR adds DPUService lifecycle operations without any actionable merge-blocking risk remaining; it is merge-ready after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant DpfOperations
  participant DpfSdkOps
  participant DpfSdk
  participant DpuServiceRepository
  participant KubernetesAPI
  DpfOperations->>DpfSdkOps: create, patch, or delete DPUService
  DpfSdkOps->>DpfSdk: delegate operation
  DpfSdk->>DpuServiceRepository: execute namespace-scoped operation
  DpuServiceRepository->>KubernetesAPI: apply resource operation
  KubernetesAPI-->>DpuServiceRepository: return result or API error
  DpuServiceRepository-->>DpfSdk: return operation result
  DpfSdk-->>DpfSdkOps: return operation result
  DpfSdkOps-->>DpfOperations: return operation result
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main change: adding DPF DPUService create, patch, and delete support.
Description check ✅ Passed The description directly explains the DPUService lifecycle operations, SDK exposure, testing, and related issue.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant