Skip to content

fix(health): keep gNMI STREAM request streams open - #4755

Open
jayzhudev wants to merge 1 commit into
NVIDIA:mainfrom
jayzhudev:health/gnmi-subscription-fix
Open

fix(health): keep gNMI STREAM request streams open#4755
jayzhudev wants to merge 1 commit into
NVIDIA:mainfrom
jayzhudev:health/gnmi-subscription-fix

Conversation

@jayzhudev

Copy link
Copy Markdown
Contributor

Keep the client stream open after sending the initial gNMI SubscriptionList for SAMPLE and ON_CHANGE STREAM subscriptions. This allows the gNMI target to return sync_response and subsequent telemetry without treating request-stream EOF as RPC termination.

The gNMI specification does not explicitly require the client stream to remain open. However, many gNMI target implementations interpret request-stream EOF as termination of the subscription. Keeping the client stream open is a safe compatibility fix.

Related issues

Fixes #4754

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

Signed-off-by: Jay Zhu <jayzhu@nvidia.com>
@jayzhudev jayzhudev self-assigned this Aug 9, 2026
@jayzhudev
jayzhudev requested a review from a team as a code owner August 9, 2026 02:31
@coderabbitai

coderabbitai Bot commented Aug 9, 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: df6f612d-3350-4615-8778-8fbd5dc88927

📥 Commits

Reviewing files that changed from the base of the PR and between b0439c2 and 1223d32.

📒 Files selected for processing (1)
  • crates/health/src/collectors/nvue/gnmi/client.rs

Summary by CodeRabbit

  • Bug Fixes
    • Improved gNMI subscription reliability by keeping SAMPLE and ON_CHANGE subscription streams open after the initial request.
    • Helps ensure ongoing health data updates continue to be received correctly.

Walkthrough

The gNMI client now keeps SAMPLE and ON_CHANGE subscription request streams open after sending the initial request. This prevents the client request side from reaching EOF during long-lived subscriptions.

Changes

gNMI subscription lifecycle

Layer / File(s) Summary
Persistent subscription request streams
crates/health/src/collectors/nvue/gnmi/client.rs
The client uses StreamExt to send each initial SAMPLE and ON_CHANGE request once, then keep both request streams pending.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the gNMI STREAM request-stream fix and matches the primary change.
Description check ✅ Passed The description accurately explains the gNMI stream-closure bug, the compatibility fix, and the related issue.
Linked Issues check ✅ Passed The changes keep SAMPLE and ON_CHANGE request streams open, directly addressing issue #4754 and its stated requirements.
Out of Scope Changes check ✅ Passed The changes are limited to keeping the two gNMI STREAM request streams open and are within issue #4754 scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: health prematurely closes long-lived gNMI STREAM subscriptions

1 participant