You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If the caller closes the connection before the router is done sending the response (e.g. broken pipe), the response callback of the supergraph lifecycle event is never triggered. This is an issue because in this callback, we use Rhai to do a number of things:
set response headers (this obviously is irrelevant because the pipe is broken so the response isn't going to be sent so we don't need to set these headers)
rewrite the errors array in response body, if present (also irrelevant b/c the response is not going to be sent to caller)
set response context variables for use in telemetry instrumentation by response_context selectors (these need to be set in order for span tag attributes to be applied as expected; may be related to )
log the status of the response (e.g. call to n milliseconds to process for this operation name and resulted in these errors) (this is really important as this log statement actually drives Splunk dashboards and this log statement is never made b/c this lifecycle event isn't triggered)
log the response body (not super critical but would be nice to still log the response body that would have been sent if the pipe weren't broken)
To Reproduce
Steps to reproduce the behavior:
Configure router to execute Rhai scripts during supergraph response callback:
Insert code into subgraph resolver so that it waits 10seconds before responding to requests from router
Send request to router using curl
Cancel request (ctrl-c) while subgraph is waiting to respond which induces a broken pipe error
Observe that the process_supergraph_response was never called
Expected behavior
The response callback of the supergraph service is still executed when a broken pipe is encountered, just like other non-200 errors the router encounters (e.g. a 400 BAD REQUEST still executes the callback)
Router:
OS: Amazon Linux 2023
Version: 1.37.0
Additional context
None
The text was updated successfully, but these errors were encountered:
Describe the bug
If the caller closes the connection before the router is done sending the response (e.g. broken pipe), the response callback of the supergraph lifecycle event is never triggered. This is an issue because in this callback, we use Rhai to do a number of things:
response_context
selectors (these need to be set in order for span tag attributes to be applied as expected; may be related to)
To Reproduce
Steps to reproduce the behavior:
process_supergraph_response
was never calledExpected behavior
The response callback of the supergraph service is still executed when a broken pipe is encountered, just like other non-200 errors the router encounters (e.g. a 400 BAD REQUEST still executes the callback)
Router:
Additional context
None
The text was updated successfully, but these errors were encountered: