envoyproxy/envoy

filters: improve docs & protections around callbacks

Open

#13.737 geöffnet am 23. Okt. 2020

Auf GitHub ansehen
 (11 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C++ (5.373 Forks)batch import
area/httphelp wantedtech debt

Repository-Metriken

Stars
 (27.997 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 8T) (378 gemergte PRs in 30 T)

Beschreibung

We recently ran into an internal problem where an in-house filter was returning a local reply and immediately after returning FilterHeaderStatus::Continue, which ends up confusing the Router filter machinery.

A few things can be done to improve the experience for filter developers:

  1. improve docs around the contract with filters (e.g.: #13678, I'll send another one for docs/root/faq/extensions/contract.rst as well)

  2. enforce more checks to ensure callbacks cannot be called after a local reply has been sent

  3. more assertions around the filter chain state machine

cc: @alyssawilk @mattklein123

Contributor Guide