Skip to content

fix: isolate exporter timeout phases#153

Closed
jingxiang-z wants to merge 1 commit intomainfrom
codex-fix-exporter-timeout-cascade
Closed

fix: isolate exporter timeout phases#153
jingxiang-z wants to merge 1 commit intomainfrom
codex-fix-exporter-timeout-cascade

Conversation

@jingxiang-z
Copy link
Copy Markdown
Collaborator

Summary

Fix exporter timeout handling so a stalled collection phase does not force HTTP upload to inherit an expired context.

What Changed

  • split exporter collection and upload into separate timeout-scoped contexts
  • stop collector work promptly when cancellation or deadline expiry is observed
  • preserve partial event data collected before cancellation
  • add regression tests for partial collection and fresh upload context behavior

Root Cause

The exporter previously used one shared timeout for metadata refresh, collection, and upload. When GPU-facing collection work stalled, the shared context expired and the later event-read and HTTP-upload phases inherited a dead context, causing cascading context deadline exceeded failures.

Impact

The agent now degrades more cleanly under driver/NVML stalls: partial collection can still be uploaded, and cancellation no longer produces misleading per-phase timeout cascades.

Validation

  • go test ./internal/exporter/...

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

coderabbitai bot commented Apr 1, 2026

Important

Review skipped

Draft detected.

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: Pro

Run ID: 23c5a54e-f926-4d56-9c6b-82df12ca3aeb

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
  • Commit unit tests in branch codex-fix-exporter-timeout-cascade

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

@jingxiang-z
Copy link
Copy Markdown
Collaborator Author

Superseded by #154, which uses the repo-conventional branch name fix/exporter-timeout-phases.

@jingxiang-z jingxiang-z closed this Apr 1, 2026
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