http: cleaning upstream interfaces for upstream filters. (#22918)

This changes the Upstream Filter code to creating the codec filter via factory which

requires adding all UpstreamRequest/CodecFilter interactions to an UpstreamCallback interface accessible through the filter manager
requires unhiding the configuration because the presubmit cross-checks for the registered factory require all the config be unhidden
allows configuring the codec filter in configuration, in case of eventual alternate terminal filter
allows fixing up the filter dependency validator to validate the entire upstream filter chain.
Upstream filters flipped on for CI, SHOULD BE FLIPPED OFF BEFORE SUBMITTING

Risk Level: low assuming it's flipped back off
Testing: updated unit tests, covered by filter integration tests
Docs Changes: n/a
Release Notes: n/a (off by default)
Part of #10455

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>

Mirrored from https://github.com/envoyproxy/envoy @ 978004308203aa9e86886512adf6b26376958405
pull/626/head
data-plane-api(Azure Pipelines) 3 years ago
parent a089dab41a
commit 148bedcd80
  1. 1
      BUILD
  2. 9
      envoy/extensions/filters/http/upstream_codec/v3/BUILD
  3. 18
      envoy/extensions/filters/http/upstream_codec/v3/upstream_codec.proto
  4. 13
      envoy/extensions/upstreams/http/v3/http_protocol_options.proto
  5. 1
      versioning/BUILD

@ -189,6 +189,7 @@ proto_library(
"//envoy/extensions/filters/http/set_metadata/v3:pkg",
"//envoy/extensions/filters/http/stateful_session/v3:pkg",
"//envoy/extensions/filters/http/tap/v3:pkg",
"//envoy/extensions/filters/http/upstream_codec/v3:pkg",
"//envoy/extensions/filters/http/wasm/v3:pkg",
"//envoy/extensions/filters/listener/http_inspector/v3:pkg",
"//envoy/extensions/filters/listener/original_dst/v3:pkg",

@ -0,0 +1,9 @@
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
licenses(["notice"]) # Apache 2
api_proto_package(
deps = ["@com_github_cncf_udpa//udpa/annotations:pkg"],
)

@ -0,0 +1,18 @@
syntax = "proto3";
package envoy.extensions.filters.http.upstream_codec.v3;
import "udpa/annotations/status.proto";
option java_package = "io.envoyproxy.envoy.extensions.filters.http.upstream_codec.v3";
option java_outer_classname = "UpstreamCodecProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/upstream_codec/v3;upstream_codecv3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: UpstreamCodec]
// Codec :ref:`configuration overview <config_http_filters_upstream_codec>`.
// [#extension: envoy.filters.http.upstream_codec]
message UpstreamCodec {
}

@ -150,7 +150,18 @@ message HttpProtocolOptions {
AutoHttpConfig auto_config = 5;
}
// [#not-implemented-hide:]
// .. warning::
// Upstream HTTP filters are not supported by default.
// This warning will be removed as support moves beyond alpha.
//
// Optional HTTP filters for the upstream filter chain.
//
// These filters will be applied for all HTTP streams which flow through this
// cluster. Unlike downstream filters, they will *not* be applied to terminated CONNECT requests.
//
// If using upstream filters, please be aware that local errors sent by
// upstream filters will not trigger retries, and local errors sent by
// upstream filters will count as a final response if hedging is configured.
// [#extension-category: envoy.filters.http.upstream]
repeated filters.network.http_connection_manager.v3.HttpFilter http_filters = 6;
}

@ -127,6 +127,7 @@ proto_library(
"//envoy/extensions/filters/http/set_metadata/v3:pkg",
"//envoy/extensions/filters/http/stateful_session/v3:pkg",
"//envoy/extensions/filters/http/tap/v3:pkg",
"//envoy/extensions/filters/http/upstream_codec/v3:pkg",
"//envoy/extensions/filters/http/wasm/v3:pkg",
"//envoy/extensions/filters/listener/http_inspector/v3:pkg",
"//envoy/extensions/filters/listener/original_dst/v3:pkg",

Loading…
Cancel
Save