Skip to content

fix(models): hardcoded adapters sidecar img#325

Merged
benmccown merged 5 commits into
mainfrom
fix-hardcoded-sidecar-image/bmccown
Jun 15, 2026
Merged

fix(models): hardcoded adapters sidecar img#325
benmccown merged 5 commits into
mainfrom
fix-hardcoded-sidecar-image/bmccown

Conversation

@benmccown

@benmccown benmccown commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • LoRA adapters sidecar configuration is now customizable via backend settings, including image name (with registry/tag integration), command, args, and an optional entrypoint override for both Docker and Kubernetes deployments.
  • Refactor

    • Sidecar setup now uses backend-provided configuration rather than hardcoded command/image details, improving flexibility for overrides and local development.

Signed-off-by: Ben McCown <bmccown@nvidia.com>
@benmccown benmccown requested review from a team as code owners June 12, 2026 23:01
@github-actions github-actions Bot added the fix label Jun 12, 2026
Signed-off-by: Ben McCown <bmccown@nvidia.com>
@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 19462/25829 75.3% 60.9%
Integration Tests 11372/24601 46.2% 20.2%

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

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: 3cc35ac3-70f2-4eff-89f9-ace537a3a32d

📥 Commits

Reviewing files that changed from the base of the PR and between 6a39e3f and 5de8c6f.

📒 Files selected for processing (1)
  • docs/set-up/config-reference.mdx

📝 Walkthrough

Walkthrough

LoRA sidecar settings are now exposed as config fields on Docker and K8s backend configs (image name, command, args, optional entrypoint). Docker reconciler and K8s nimservice compiler resolve sidecar containers from those fields instead of hardcoded values. Configuration reference docs describe the new settings.

Changes

LoRA Sidecar Configurability

Layer / File(s) Summary
Config schema additions
services/core/models/src/nmp/core/models/controllers/backends/docker/config.py, services/core/models/src/nmp/core/models/controllers/backends/k8s_nim_operator/config.py
Docker and K8s backend configs add Pydantic fields: lora_sidecar_image_name, lora_sidecar_command, optional lora_sidecar_entrypoint/lora_sidecar_args.
Docker sidecar container setup
services/core/models/src/nmp/core/models/controllers/backends/docker/creation_reconciler.py
Docker reconciler now resolves sidecar image from lora_sidecar_image_name, injects lora_sidecar_command, and conditionally sets entrypoint from config.
K8s Nimservice sidecar spec
services/core/models/src/nmp/core/models/controllers/backends/k8s_nim_operator/nimservice_compiler.py
Nimservice compiler builds LoRA sidecar ContainerSpec using backend-configured lora_sidecar_image_name, lora_sidecar_command, and lora_sidecar_args.
Configuration reference docs
docs/set-up/config-reference.mdx
Docs describe Docker and K8s LoRA sidecar config fields: image name, command, args, and optional entrypoint overrides.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Title accurately describes the main change: making hardcoded adapters sidecar configuration (image, command, entrypoint) configurable across Docker and K8s backends.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-hardcoded-sidecar-image/bmccown

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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
`@services/core/models/src/nmp/core/models/controllers/backends/k8s_nim_operator/config.py`:
- Around line 47-55: The lora_sidecar_command Field allows an empty list which
will cause Kubernetes container creation to fail; update the Field definition
for lora_sidecar_command to add validation by specifying min_length=1 in the
Field call so an empty list is rejected at config validation time (locate the
lora_sidecar_command variable in the config.py and add min_length=1 to its
Field(...) parameters).
🪄 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: 50851ed0-49ad-4835-ae26-14a40fcff694

📥 Commits

Reviewing files that changed from the base of the PR and between 3d7fa34 and 6a39e3f.

📒 Files selected for processing (2)
  • services/core/models/src/nmp/core/models/controllers/backends/k8s_nim_operator/config.py
  • services/core/models/src/nmp/core/models/controllers/backends/k8s_nim_operator/nimservice_compiler.py

Signed-off-by: Ben McCown <bmccown@nvidia.com>
@github-actions

Copy link
Copy Markdown
Contributor

@benmccown benmccown enabled auto-merge June 15, 2026 18:21
@benmccown benmccown added this pull request to the merge queue Jun 15, 2026
Merged via the queue into main with commit 6d3b4fc Jun 15, 2026
50 checks passed
@benmccown benmccown deleted the fix-hardcoded-sidecar-image/bmccown branch June 15, 2026 18:27
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.

2 participants