Skip to content

fix: degrade dcgm query timeouts#222

Merged
jingxiang-z merged 1 commit into
mainfrom
fix/dcgm-timeouts-degraded
Jun 24, 2026
Merged

fix: degrade dcgm query timeouts#222
jingxiang-z merged 1 commit into
mainfrom
fix/dcgm-timeouts-degraded

Conversation

@jingxiang-z

@jingxiang-z jingxiang-z commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Description

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Summary by CodeRabbit

  • Bug Fixes

    • Adjusted how certain DCGM error states are classified as unhealthy, so timeout-related conditions are no longer treated the same as other unhealthy errors.
  • Tests

    • Added coverage for unhealthy-error detection to verify the expected behavior across multiple DCGM status codes.

Signed-off-by: Jingxiang Zhang <jingzhang@nvidia.com>
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

IsUnhealthyAPIError in the DCGM query validator is narrowed: DCGM_ST_TIMEOUT and DCGM_ST_NVML_DRIVER_TIMEOUT are removed from the case that returns true. A new table-driven test is added to verify the classification of DCGM status codes against the updated logic.

Changes

IsUnhealthyAPIError timeout reclassification

Layer / File(s) Summary
Unhealthy case narrowed and tested
third_party/fleet-intelligence-sdk/pkg/nvidia-query/dcgm/query_validator.go, third_party/fleet-intelligence-sdk/pkg/nvidia-query/dcgm/query_validator_test.go
The grouped case in IsUnhealthyAPIError now ends at DCGM_ST_GPU_NOT_SUPPORTED, so DCGM_ST_TIMEOUT and DCGM_ST_NVML_DRIVER_TIMEOUT no longer return true. TestIsUnhealthyAPIError enumerates DCGM codes, wraps each in an error via fmt.Errorf, and asserts the expected unhealthy boolean for each entry.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 A timeout's not unhealthy, said the rabbit with a grin,
Dropping two stray cases, letting sanity back in.
The switch case trimmed neatly, the test table drawn with care,
Each DCGM code checked twice — no unhealthy ghost left there.
Hop along, the diff is tidy, barely three lines changed!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the core change: DCGM timeout handling was softened so timeouts are no longer treated as unhealthy.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ 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 fix/dcgm-timeouts-degraded

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

@jingxiang-z jingxiang-z self-assigned this Jun 24, 2026
@jingxiang-z jingxiang-z merged commit 0cc063d into main Jun 24, 2026
9 checks passed
@jingxiang-z jingxiang-z deleted the fix/dcgm-timeouts-degraded branch June 24, 2026 20:07
jingxiang-z added a commit that referenced this pull request Jun 27, 2026
Signed-off-by: Jingxiang Zhang <jingzhang@nvidia.com>
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.

2 participants