Skip to content

Search backend: split up `(streamHandler).StreamHTTP()`

Administrator requested to merge backend-integration/cc/clean-up-streamhttp into main

Created by: camdencheek

This splits ServeHTTP into three parts:

  1. the outer ServeHTTP, which is responsible for starting a trace, creating an event writer around the raw http.ResponseWrapper, and handling any errors returned by serveHTTP
  2. the inner serveHTTP, which is responsible for parsing the query, building the streams, and executing the search
  3. logSearch, which is responsible for logging the timing and status results of an executed search.

Stacked on https://github.com/sourcegraph/sourcegraph/pull/37509

Test plan

Backend integration tests, unit tests, and manual smoke tests.

Merge request reports

Loading