Skip to content

nvue-client: Use slightly stronger types for NvueConfig#2257

Open
DrewBloechl wants to merge 4 commits into
NVIDIA:mainfrom
DrewBloechl:drew/nvue-config-types
Open

nvue-client: Use slightly stronger types for NvueConfig#2257
DrewBloechl wants to merge 4 commits into
NVIDIA:mainfrom
DrewBloechl:drew/nvue-config-types

Conversation

@DrewBloechl
Copy link
Copy Markdown
Contributor

@DrewBloechl DrewBloechl commented Jun 5, 2026

Description

Before this, we treated everything inside an NvueConfig as serde_json::Value without caring about its structure. This branch changes a few things about this:

  • Add the root-level keys (vrf, router, bridge, etc.) to NvueConfig. Below this the types are still Values but it should reject a lot more obviously-invalid configurations.
  • Use different types for NvueConfig and NvueConfigWithHeader. NvueConfig is what the API wants us to send it when applying a new configuration, but it generally responds with NvueConfigWithHeader from its config-related endpoints. The startup YAML file is also a NvueConfigWithHeader.
  • Add tests to parse the current agent configs (to be moved to the agent crate later).

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

Related Issues (Optional)

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

@DrewBloechl DrewBloechl requested a review from a team as a code owner June 5, 2026 18:36
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 5, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: e3004cd4-3019-4119-8e86-f3c86cfbef19

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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