Skip to content

fix(nemo-deployments): ship openshell SDK in nmp-api and clarify dropped-executor error - #1075

Merged
maxdubrinsky merged 2 commits into
mainfrom
mdubrinsky/aircore-978-published-nmp-api-image-ships-without-the-openshell-sdk
Aug 7, 2026
Merged

fix(nemo-deployments): ship openshell SDK in nmp-api and clarify dropped-executor error#1075
maxdubrinsky merged 2 commits into
mainfrom
mdubrinsky/aircore-978-published-nmp-api-image-ships-without-the-openshell-sdk

Conversation

@maxdubrinsky

@maxdubrinsky maxdubrinsky commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes AIRCORE-978. Two defects in the published nmp-api image: OpenShell-sandboxed deployments don't work, and a dropped executor is indistinguishable from a typo.

Defect 1 - openshell SDK missing from the image

The image installs the functional-services dep group, which carried nemo-deployments-plugin[docker,k8s] but not the openshell extra. So OpenShellDeploymentBackend couldn't initialise, the plugin skipped the openshell-local executor at startup, and any deployment naming it failed with Executor 'openshell-local' is not registered.

Fix: add nemo-deployments-plugin[openshell] to functional-services.

It goes in functional-services (image-only) rather than the bootstrap groups (enabled-plugins, dev) on purpose: the openshell wheel needs glibc >= 2.39 and has no sdist, and uv markers can't gate on glibc, so a hard dependency would break bare uv sync on older dev hosts. The image builds on a compatible base, so that's the right home for this required-in-image capability.

Defect 2 - dropped executor looks like a typo

A configured executor whose backend was skipped raised the same is not registered error as a misspelled name.

Fix: ExecutorRegistry now remembers skipped executors and resolve() raises a distinct message: Executor 'X' is configured but its backend 'Y' is unavailable: <reason>.

Testing

  • pytest plugins/nemo-deployments/tests/unit/test_registry.py -> 12 passed. Added test_unavailable_executor_reports_distinct_error; tightened test_missing_executor_raises to assert the is not registered wording.
  • uv lock --check in sync; openshell/grpcio/protobuf resolve for all three locked platforms (darwin-arm64, linux-x86_64, linux-aarch64).
  • ruff clean; ty shows only pre-existing diagnostics.

Fixes AIRCORE-978
https://linear.app/nvidia/issue/AIRCORE-978

Summary by CodeRabbit

  • Bug Fixes

    • Improved executor errors when a deployment backend is unavailable, clearly identifying the backend and missing dependency.
    • Clarified errors for executor names that are not registered.
  • New Features

    • Added support for the OpenShell deployment SDK in the functional services environment, enabling deployments that require this integration.

@github-actions github-actions Bot added the fix label Aug 4, 2026
@maxdubrinsky maxdubrinsky changed the title fix(nemo-deployments): ship openshell SDK in nmp-api image and disambiguate unavailable-backend error fix(nemo-deployments): ship openshell SDK in nmp-api and clarify dropped-executor error Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 30782/39277 78.4% 62.8%
Integration Tests 18075/37229 48.5% 21.1%

@maxdubrinsky
maxdubrinsky force-pushed the mdubrinsky/aircore-978-published-nmp-api-image-ships-without-the-openshell-sdk branch from 50077b1 to b948da8 Compare August 5, 2026 19:51
The published nmp-api image builds from the functional-services dependency
group, which pulled in nemo-deployments-plugin[docker,k8s] but not the
openshell extra. Without the openshell SDK, OpenShellDeploymentBackend fails
to initialise, the deployments plugin skips the openshell-local executor at
startup, and later deployments naming it fail with a misleading 'not
registered' error.

Add nemo-deployments-plugin[openshell] to the functional-services group only.
It stays out of enabled-plugins so bare 'uv sync' on unsupported hosts (older
glibc, older macOS) does not hard-fail on the platform-restricted wheels; the
api image runs on a compatible base. Wheels resolve for all locked
environments, so uv.lock stays in sync.

Add a build-time smoke check to Dockerfile.nmp-api that fails the build if the
openshell SDK is missing.

Signed-off-by: Max Dubrinsky <mdubrinsky@nvidia.com>
A correctly-configured executor whose optional backend was dropped (e.g.
openshell) was skipped at startup and later produced the same 'is not
registered' error as a genuinely misspelled executor name, making the two
indistinguishable.

Record skipped executors in the registry as name -> UnavailableExecutor
(backend + reason). resolve() now raises a distinct, actionable message for a
configured-but-skipped name ('configured but its backend X is unavailable:
<reason>') while keeping the plain 'is not registered' message for unknown
names. The reason carries the backend's install hint.

Add a test covering the distinct message and tighten the unknown-name test to
assert the 'is not registered' wording.

Signed-off-by: Max Dubrinsky <mdubrinsky@nvidia.com>
@maxdubrinsky
maxdubrinsky force-pushed the mdubrinsky/aircore-978-published-nmp-api-image-ships-without-the-openshell-sdk branch from b948da8 to 477604f Compare August 5, 2026 20:17
@maxdubrinsky
maxdubrinsky marked this pull request as ready for review August 5, 2026 20:18
@maxdubrinsky
maxdubrinsky requested review from a team as code owners August 5, 2026 20:18
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The executor registry now records executors skipped because of missing backend dependencies. Resolution errors identify the configured backend and failure reason. The functional-services dependency group includes the OpenShell extra, and unit tests cover both error paths.

Changes

Executor availability handling

Layer / File(s) Summary
Track unavailable backends
plugins/nemo-deployments/src/nemo_deployments_plugin/backends/registry.py, pyproject.toml
The registry records unavailable backends and their failure reasons. The functional-services group includes the OpenShell extra.
Report resolution failures
plugins/nemo-deployments/tests/unit/test_registry.py, plugins/nemo-deployments/src/nemo_deployments_plugin/backends/registry.py
Resolution distinguishes unregistered executors from unavailable backends. Tests verify both messages and their diagnostic details.

Possibly related PRs

Suggested reviewers: benmccown, mckornfield

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes both main changes: shipping the OpenShell SDK and clarifying the dropped-executor error.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mdubrinsky/aircore-978-published-nmp-api-image-ships-without-the-openshell-sdk

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

@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 `@plugins/nemo-deployments/tests/unit/test_registry.py`:
- Around line 122-145: Update test_unavailable_executor_reports_distinct_error
to assert that the error message includes the configured executor name
"sandbox-local" together with the backend name "sandbox", preserving the
existing assertions for the distinct unavailable-backend reason.
🪄 Autofix

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: 1670f98c-1526-4586-95f5-fb0598774bb3

📥 Commits

Reviewing files that changed from the base of the PR and between 795bba2 and 477604f.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • plugins/nemo-deployments/src/nemo_deployments_plugin/backends/registry.py
  • plugins/nemo-deployments/tests/unit/test_registry.py
  • pyproject.toml

Comment thread plugins/nemo-deployments/tests/unit/test_registry.py
@maxdubrinsky
maxdubrinsky added this pull request to the merge queue Aug 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 7, 2026
@maxdubrinsky
maxdubrinsky added this pull request to the merge queue Aug 7, 2026
Merged via the queue into main with commit 8621440 Aug 7, 2026
56 checks passed
@maxdubrinsky
maxdubrinsky deleted the mdubrinsky/aircore-978-published-nmp-api-image-ships-without-the-openshell-sdk branch August 7, 2026 15:30
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