Skip to content

fix(middleware): preserve HTTP request failure causes - #4145

Open
shiju-nv wants to merge 1 commit into
mainfrom
fix/middleware-request-failure-causes-20261002
Open

shiju-nv wants to merge 1 commit into
mainfrom
fix/middleware-request-failure-causes-20261002

Conversation

@shiju-nv

@shiju-nv shiju-nv commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

A remote service returning DEADLINE_EXCEEDED and an OpenShell stage timeout used to produce the same request outcome. HTTP middleware now keeps the cause alongside the diagnostic message. The relay also records how far a live request got when an upstream write failed.

Related Issue

Part of #4144.

Changes

  • Preserve the failure cause through request handling, even when all recorded stages succeeded. Explicit denials remain separate from failures.
  • Mark delivery as started on the first upstream write attempt and complete after the final flush succeeds. A partial write followed by an error stays marked as started.

Testing

  • Checks appropriate to the affected code and behavior pass
  • Unit tests added/updated (if applicable)
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

@github-actions

Copy link
Copy Markdown

This pull request has had no activity for 14 days and is now marked stale.

@github-actions github-actions Bot added the state:stale Inactive item at risk of automatic closure. label Oct 20, 2026
@shiju-nv shiju-nv added the test:e2e Requires end-to-end coverage label Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

Label test:e2e applied for 9a62429. Open the existing run and click Re-run all jobs to execute with the label set. The run will execute the standard E2E suite after building the required gateway, sandbox, and supervisor images once. The matching required CI gate status on this PR will flip green automatically once the run finishes.

@shiju-nv
shiju-nv force-pushed the fix/middleware-request-failure-causes-20261002 branch from 9a62429 to bd0b5ba Compare November 2, 2026 14:46
@copy-pr-bot

copy-pr-bot Bot commented Nov 2, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@shiju-nv
shiju-nv removed this pull request from stack #4146 November 2, 2026 14:52
@shiju-nv
shiju-nv changed the base branch from feat/2431-streaming-request-middleware/pimlock to feat/2431-http-middleware-protocol-2/pimlock November 2, 2026 14:52
@shiju-nv
shiju-nv added this pull request to stack #5124 November 2, 2026 14:52
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

@shiju-nv

shiju-nv commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator Author

/ok to test bd0b5ba

@github-actions github-actions Bot removed the state:stale Inactive item at risk of automatic closure. label Nov 3, 2026
Base automatically changed from feat/2431-http-middleware-protocol-2/pimlock to main November 12, 2026 21:38
@pimlock
pimlock force-pushed the fix/middleware-request-failure-causes-20261002 branch from bd0b5ba to 34e7be6 Compare November 12, 2026 21:38
@purp purp added area:runtime Sandbox execution, isolation, supervision, policy enforcement, networking, and provider lifecycle. topic:documentation Architecture docs, READMEs, project website updates, and automated documentation generation. topic:extensions Extension APIs and integration points, consistent design, and external use cases. topic:observability Logs, metrics, traces, telemetry, dashboards, event correlation, and operational data export. topic:reliability High availability, recovery, retries, graceful degradation, and correctness across restarts. labels Nov 15, 2026
@github-actions

Copy link
Copy Markdown

This pull request has had no activity for 14 days and is now marked stale.

@github-actions github-actions Bot added the state:stale Inactive item at risk of automatic closure. label Nov 29, 2026
@shiju-nv
shiju-nv force-pushed the fix/middleware-request-failure-causes-20261002 branch 2 times, most recently from 143526f to 5654e97 Compare November 30, 2026 20:15
Carry typed causes through HTTP request middleware diagnostics. Distinguish
local deadlines, gRPC statuses, built-in errors and stale-policy cancellation
while preserving diagnostic messages and response selection.

Track live upstream writes from the first attempt through the final flush.
Retain delivery progress when a stage fails while output is still queued.

Refs #4144

Signed-off-by: Shiju <shiju@nvidia.com>
@shiju-nv
shiju-nv force-pushed the fix/middleware-request-failure-causes-20261002 branch from 5654e97 to d4b667e Compare November 30, 2026 20:33

This branch has not been deployed

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

Labels

area:runtime Sandbox execution, isolation, supervision, policy enforcement, networking, and provider lifecycle. state:stale Inactive item at risk of automatic closure. test:e2e Requires end-to-end coverage topic:documentation Architecture docs, READMEs, project website updates, and automated documentation generation. topic:extensions Extension APIs and integration points, consistent design, and external use cases. topic:observability Logs, metrics, traces, telemetry, dashboards, event correlation, and operational data export. topic:reliability High availability, recovery, retries, graceful degradation, and correctness across restarts.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants