Skip to content

fix: Add URL in SoftwareInventory in UI/cli.#3781

Merged
abvarshney-nv merged 1 commit into
NVIDIA:mainfrom
abvarshney-nv:update_url_inventory
Jul 21, 2026
Merged

fix: Add URL in SoftwareInventory in UI/cli.#3781
abvarshney-nv merged 1 commit into
NVIDIA:mainfrom
abvarshney-nv:update_url_inventory

Conversation

@abvarshney-nv

Copy link
Copy Markdown
Contributor

Add URL in SoftwareInventory in UI/cli.

Related issues

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.)

Additional Notes

@abvarshney-nv
abvarshney-nv requested a review from a team as a code owner July 21, 2026 17:36
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Summary by CodeRabbit

  • Bug Fixes
    • Fixed DPU software inventory updates to resolve the correct DPU “device name” and populate component entries with the proper service URL (previously left blank).
    • Improved DPU service-version resolution to include the correct service version and corresponding URL.
    • Updated DPU versions reporting to detect HBN versions by matching any component name containing “hbn” (instead of only specific name variants).
  • Documentation
    • Clarified how component “URL” is derived (image repository vs Helm repository) to match the updated resolution behavior.

Walkthrough

The change aligns DPF service-version lookup naming, derives service URLs from image or Helm metadata, computes the DPU name from BMC identifiers, propagates URLs into machine inventory, and broadens HBN component matching in DPU version views.

Changes

DPF service metadata and inventory

Layer / File(s) Summary
Align service-version lookup naming
crates/dpf/src/sdk.rs, crates/machine-controller/src/dpf.rs
The lookup parameter is renamed to dpu_name across the SDK, trait, and implementation, with related error messages updated.
Derive service version URLs
crates/dpf/src/sdk.rs, crates/dpf/src/types.rs
Service versions now derive names, versions, and URLs from image repositories or Helm source metadata, with the public type documentation updated.
Populate inventory component URLs
crates/api-core/src/handlers/dpu.rs
The inventory path loads the managed host snapshot, computes the DPU name from BMC identifiers, and stores returned service version URLs in software components.

Broaden HBN version extraction

Layer / File(s) Summary
Match HBN component names
crates/admin-cli/src/dpu/versions/cmd.rs, crates/api-web/src/dpu_versions.rs
DPU version conversion now accepts any inventory component whose name contains hbn, rather than only the two exact legacy names.

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

Sequence Diagram(s)

sequenceDiagram
  participant InventoryHandler
  participant DpfSdk
  participant DPUDeployment
  InventoryHandler->>InventoryHandler: Load managed host snapshot
  InventoryHandler->>InventoryHandler: Derive dpu_name from DPU and host dpf_id values
  InventoryHandler->>DpfSdk: get_service_versions_for_dpu(dpu_name)
  DpfSdk->>DPUDeployment: Read image or Helm metadata
  DPUDeployment-->>DpfSdk: Return service metadata
  DpfSdk-->>InventoryHandler: Return service versions with URLs
  InventoryHandler->>InventoryHandler: Populate software component URLs
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change: adding URL support to SoftwareInventory in UI/CLI.
Description check ✅ Passed The description directly describes the UI/CLI SoftwareInventory URL fix and aligns with the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@abvarshney-nv
abvarshney-nv force-pushed the update_url_inventory branch from d424336 to 4073df8 Compare July 21, 2026 17:57

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/api-core/src/handlers/dpu.rs`:
- Around line 841-843: Normalize the CarbideError messages in the DPU/DPF error
handling around the visible DPF SDK message and the related messages at the
referenced locations: start each message with lowercase wording, including
acronyms such as DPF/DPU where needed, preserve the original meaning, and omit
trailing periods.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7ff033ee-f84f-4de5-8f2a-8bb1898a27c2

📥 Commits

Reviewing files that changed from the base of the PR and between d424336 and 4073df8.

📒 Files selected for processing (4)
  • crates/api-core/src/handlers/dpu.rs
  • crates/dpf/src/sdk.rs
  • crates/dpf/src/types.rs
  • crates/machine-controller/src/dpf.rs
🚧 Files skipped from review as they are similar to previous changes (2)
  • crates/dpf/src/types.rs
  • crates/dpf/src/sdk.rs

Comment thread crates/api-core/src/handlers/dpu.rs
@abvarshney-nv
abvarshney-nv force-pushed the update_url_inventory branch 2 times, most recently from fd0962e to c657b7f Compare July 21, 2026 18:23
@abvarshney-nv
abvarshney-nv force-pushed the update_url_inventory branch from c657b7f to 58f8485 Compare July 21, 2026 18:38

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
crates/admin-cli/src/dpu/versions/cmd.rs (1)

104-104: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Cover the broadened HBN matching in both conversion paths.

The supplied doca-hbn fixture was already supported, so it cannot detect regressions in the new substring behavior. Add aligned table-driven cases for a non-legacy HBN-containing name, both legacy names, and a non-match.

  • crates/admin-cli/src/dpu/versions/cmd.rs#L104-L104: verify the CLI conversion extracts the expected version.
  • crates/api-web/src/dpu_versions.rs#L109-L109: verify the web conversion produces the same result.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/admin-cli/src/dpu/versions/cmd.rs` at line 104, Add aligned
table-driven tests covering a non-legacy HBN-containing name, both legacy names,
and a non-match, asserting the expected version for each case. Update tests near
the CLI conversion logic in crates/admin-cli/src/dpu/versions/cmd.rs:104-104 and
the web conversion logic in crates/api-web/src/dpu_versions.rs:109-109; both
sites require equivalent coverage and results.

Sources: Coding guidelines, Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/dpf/src/types.rs`:
- Around line 480-482: Update the documentation for the `name` field in the
relevant type to describe the third fallback: when both the image basename and
Helm chart name are empty, it uses the DPUDeployment service name assigned by
`get_service_versions_for_dpu`. Preserve the existing image and Helm fallback
descriptions.

---

Nitpick comments:
In `@crates/admin-cli/src/dpu/versions/cmd.rs`:
- Line 104: Add aligned table-driven tests covering a non-legacy HBN-containing
name, both legacy names, and a non-match, asserting the expected version for
each case. Update tests near the CLI conversion logic in
crates/admin-cli/src/dpu/versions/cmd.rs:104-104 and the web conversion logic in
crates/api-web/src/dpu_versions.rs:109-109; both sites require equivalent
coverage and results.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 692a6a70-ae36-4453-a415-d16f7639f10d

📥 Commits

Reviewing files that changed from the base of the PR and between c657b7f and 58f8485.

📒 Files selected for processing (6)
  • crates/admin-cli/src/dpu/versions/cmd.rs
  • crates/api-core/src/handlers/dpu.rs
  • crates/api-web/src/dpu_versions.rs
  • crates/dpf/src/sdk.rs
  • crates/dpf/src/types.rs
  • crates/machine-controller/src/dpf.rs
🚧 Files skipped from review as they are similar to previous changes (3)
  • crates/machine-controller/src/dpf.rs
  • crates/api-core/src/handlers/dpu.rs
  • crates/dpf/src/sdk.rs

Comment thread crates/dpf/src/types.rs
@abvarshney-nv
abvarshney-nv enabled auto-merge (squash) July 21, 2026 18:43
@abvarshney-nv
abvarshney-nv merged commit 1d6b20d into NVIDIA:main Jul 21, 2026
61 checks passed
@abvarshney-nv
abvarshney-nv deleted the update_url_inventory branch July 22, 2026 02:28
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.

2 participants