Skip to content

feat: Add opt-in DSX Exchange DevSpace profile#3795

Merged
kfelternv merged 3 commits into
NVIDIA:mainfrom
kfelternv:codex/devspace-dsx-exchange
Jul 23, 2026
Merged

feat: Add opt-in DSX Exchange DevSpace profile#3795
kfelternv merged 3 commits into
NVIDIA:mainfrom
kfelternv:codex/devspace-dsx-exchange

Conversation

@kfelternv

@kfelternv kfelternv commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Adds an opt-in DSX Exchange DevSpace profile that deploys a local NATS MQTT service alongside NICo and passes the event-bus configuration to nico-api. The default DevSpace and Helm paths remain disabled unless the profile is selected. It also corrects the post-deploy integration checks to use the current Machine-a-Tron resource names and the local nico-api endpoint so a clean deployment can complete verification.

Related issues

None.

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

Verified at 1f59be25338f57cb78a737ef0f01a9e83bf0cf5d in an isolated local Kind cluster. The default render omitted DSX Exchange, the opt-in profile deployed NATS with MQTT, both Core hosts reached Ready and synced into a current REST inventory, and a subscriber received a managed-host ready state. Full reproduction steps are in the manual-testing comment.

@copy-pr-bot

copy-pr-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Jul 21, 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: a4d8707b-6ca1-4ccd-ac61-76788c3bd4a6

📥 Commits

Reviewing files that changed from the base of the PR and between b2f9ff1 and 1f59be2.

📒 Files selected for processing (8)
  • crates/api-core/src/cfg/file.rs
  • dev/deployment/devspace/README.md
  • dev/deployment/devspace/setup-rest-integration.sh
  • dev/deployment/devspace/values.base.yaml
  • devspace.yaml
  • helm/charts/nico-api/templates/deployment.yaml
  • helm/charts/nico-api/tests/dsx_exchange_event_bus_test.yaml
  • helm/charts/nico-api/values.yaml
💤 Files with no reviewable changes (1)
  • dev/deployment/devspace/values.base.yaml

Summary by CodeRabbit

  • New Features

    • Added an optional DevSpace dsx-exchange profile that provisions a local MQTT event bus.
    • Enabled managed host state publishing with periodic updates every 10 seconds when the profile is selected.
    • Added Helm configuration for connecting the API to the DSX Exchange event bus.
  • Bug Fixes

    • Improved REST integration setup by waiting for required deployments and using the correct API endpoint.
    • Added explicit API resource settings for local deployments.
  • Documentation

    • Documented the new DSX Exchange deployment profile and its behavior.

Walkthrough

Adds optional DSX Exchange event bus configuration to the NICO API Helm chart, a DevSpace deployment profile for a local NATS MQTT service, configuration parsing tests, documentation, and REST integration environment updates.

Changes

DSX Exchange integration

Layer / File(s) Summary
Chart event bus configuration
helm/charts/nico-api/values.yaml, helm/charts/nico-api/templates/deployment.yaml, helm/charts/nico-api/tests/*, crates/api-core/src/cfg/file.rs
Adds the optional Helm value, conditionally injects CARBIDE_API_DSX_EXCHANGE_EVENT_BUS, and tests both rendered environment behavior and parsed configuration fields.
DevSpace DSX Exchange profile
devspace.yaml, dev/deployment/devspace/README.md
Adds a profile that deploys an unauthenticated NATS MQTT event bus with JetStream and configures managed host state publishing with a 10-second interval.
DevSpace integration environment updates
dev/deployment/devspace/setup-rest-integration.sh, dev/deployment/devspace/values.base.yaml
Waits for the machine deployment, updates the mock BMC hostname, supplies an explicit API URL to the admin CLI, and adds nico-api resource settings.

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

Sequence Diagram(s)

sequenceDiagram
  participant DevSpace
  participant Helm
  participant NICOAPI
  participant DSXExchange
  DevSpace->>Helm: Apply dsx-exchange profile
  Helm->>DSXExchange: Deploy NATS MQTT service
  Helm->>NICOAPI: Inject event bus configuration
  NICOAPI->>DSXExchange: Publish managed host state every 10 seconds
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly captures the main change: adding an opt-in DSX Exchange DevSpace profile.
Description check ✅ Passed The description matches the changeset by describing the new profile, event-bus wiring, and integration check updates.
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 unit tests (beta)
  • Create PR with unit tests

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

@kfelternv
kfelternv requested review from a team, kensimon and polarweasel July 21, 2026 19:09

Copy link
Copy Markdown
Contributor Author

Manual Testing

Manual testing was performed on the branch codex/devspace-dsx-exchange with checkout 1f59be25338f57cb78a737ef0f01a9e83bf0cf5d

Setup

git checkout codex/devspace-dsx-exchange
test "$(git rev-parse HEAD)" = "1f59be25338f57cb78a737ef0f01a9e83bf0cf5d"

work_dir="$(mktemp -d)"
export KUBECONFIG="${work_dir}/kubeconfig"
kind create cluster \
  --name pr3795 \
  --image kindest/node:v1.31.6@sha256:28b7cbb993dfe093c76641a0c95807637213c9109b761f1d422c2400e22b8e87 \
  --kubeconfig "${KUBECONFIG}"

dev/deployment/devspace/bootstrap-prereqs.sh
devspace use context kind-pr3795 -n nico-system

Runbook

devspace print --skip-info --no-colors -n nico-system
devspace print --skip-info --no-colors -n nico-system --profile dsx-exchange
devspace deploy --profile dsx-exchange -n nico-system --no-colors

kubectl get pods -A
kubectl run mqtt-subscriber \
  -n nico-system \
  --image=eclipse-mosquitto:2.0.21 \
  --restart=Never \
  --rm -i \
  --pod-running-timeout=120s \
  -- mosquitto_sub \
  -h dsx-exchange \
  -p 1883 \
  -t NICO/v1/machine/+/state \
  -C 1 \
  -W 30 \
  -v

Verification

The default DevSpace render contained neither the DSX Exchange deployment nor dsxExchangeEventBusConfig; the profile render contained both the NATS MQTT listener on port 1883 and the nico-api publisher configuration.

The exact-head deployment completed successfully. Its post-deploy check reported the registered site online with both Core hosts Ready and synchronized from a current REST inventory, and all deployed workloads were Ready with zero restarts.

The one-shot subscriber received a message on NICO/v1/machine/<machine-id>/state with "managed_host_state":{"state":"ready"}, then the subscriber pod was removed.

@kfelternv
kfelternv marked this pull request as ready for review July 21, 2026 22:49
@kfelternv
kfelternv requested a review from a team as a code owner July 21, 2026 22:49

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1f59be2533

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread devspace.yaml
@kfelternv
kfelternv enabled auto-merge (squash) July 23, 2026 06:25
Comment thread devspace.yaml
value:
dsxExchangeEventBusConfig: '{enabled=true,mqtt_endpoint="dsx-exchange",mqtt_broker_port=1883,auth={auth_mode="none"},periodic_state_republish={interval="10s"}}'
- name: core-only
patches:

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.

Nit: the path targets the entire nico-api object rather than just the new key. This works today since nico-api isn't in the inline values block, but if a future profile also patches deployments.carbide-local.helm.values.nico-api the second op: add would clobber this one. Safer to be surgical: path: deployments.carbide-local.helm.values.nico-api.dsxExchangeEventBusConfig with the TOML string as the value directly. Non-blocking.

@@ -9,8 +9,6 @@ nico-api:
requests:

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.

Nit: removing legacyAlias.enabled: false silently re-enables the carbide-api ExternalName Service in dev (chart default is true). PR description doesn't mention this. If intentional after #3596 clarified that the alias only covers DNS not TLS, worth a one-line note. If accidental, revert. Non-blocking.

@shayan1995 shayan1995 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.

Two nits left inline (both non-blocking) — otherwise LGTM. The opt-in profile is clean, the default path is unaffected, and the machine-a-tron/nico-admin-cli fixes are correct.

@kfelternv
kfelternv merged commit 5498190 into NVIDIA:main Jul 23, 2026
110 of 112 checks passed
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.

3 participants