envoyproxy/envoy

filters: improve docs & protections around callbacks

Open

#13,737 建立於 2020年10月23日

在 GitHub 查看
 (11 留言) (0 反應) (0 負責人)C++ (5,373 fork)batch import
area/httphelp wantedtech debt

倉庫指標

Star
 (27,997 star)
PR 合併指標
 (平均合併 8天) (30 天內合併 378 個 PR)

描述

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

貢獻者指南