config: making protocol config explicit#14362
Conversation
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
|
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
|
@htuch I don't think this annotatoin does what I thought it would do If I remove explicit http config from configs/encapsulate_in_http1_connect.yaml b/configs/encapsulate_in_http1_connect.yaml If I remove one extra line randomly (making config invalid) //test/config_test:example_configs_test fails. So I think the test covers this config, and shouldn't the examples config test do proto validation? |
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
|
Ah, I think I see th problem. sec. |
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
mattklein123
left a comment
There was a problem hiding this comment.
Nice, thanks for the follow up. Just a few small comments.
/wait
| Server::Configuration::ProtocolOptionsFactoryContext&) override { | ||
| const envoy::extensions::upstreams::http::v3::HttpProtocolOptions& typed_config = | ||
| *dynamic_cast<const envoy::extensions::upstreams::http::v3::HttpProtocolOptions*>(&config); | ||
| MessageUtil::validate(typed_config, ProtobufMessage::getStrictValidationVisitor()); |
There was a problem hiding this comment.
nit: use downcastAndValidate here.
| // present, HTTP2 will be used, otherwise HTTP1.1 will be used. | ||
| message ExplicitHttpConfig { | ||
| oneof protocol_config { | ||
| option (validate.required) = true; |
There was a problem hiding this comment.
While you are in here can you potentially make it more clear the http2 needs to be used for gRPC? I think that would help guide people in the right way even if we don't want to do something extreme like http2_and_grpc_protocol_options or something like that, which we probably don't want to do because h3 can be used with gRPC. So maybe just some comments/docs?
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
* master: (49 commits) sds: allow multiple init managers share sds target (envoyproxy#14357) [http] Remove legacy codecs (envoyproxy#14381) http2: Add integration tests for METADATA and RST_STREAM frame flood mitigation for upstream servers (envoyproxy#14365) test: start dissolving :printers_include rule. (envoyproxy#14429) integration tests: re-enable set_node_on_first_message_only (envoyproxy#14270) formatter: add a formatter that returns a google::protobuf::Struct rather than a string (envoyproxy#14258) ratelimit: support returning custom response bodies for non-OK responses from the external ratelimit service (envoyproxy#14189) deps: update protobuf to 3.14 (envoyproxy#14253) stream_info: add setResponseCode and update local_reply to take a normal StreamInfo (envoyproxy#14402) http: alpn upstream (envoyproxy#13922) Moved starttls integration test to test/extensions/transport_sockets/starttls. (envoyproxy#14425) generic conn pool: directly use thread local cluster (envoyproxy#14423) wasm: add mathetake to CODEOWNERS (envoyproxy#14427) wasm: clear route cache when modifying HTTP request headers. (envoyproxy#14318) tls: disable TLS inspector injection (envoyproxy#14404) aggregate cluster: cleanups (envoyproxy#14411) Mark starttls_integration_test flaky on Windows (envoyproxy#14419) tcp: improved unit testing (envoyproxy#14415) config: making protocol config explicit (envoyproxy#14362) wasm: dead code (envoyproxy#14407) ... Signed-off-by: Michael Puncel <mpuncel@squareup.com>
Commit Message: Remove incorrect/outdated doc for explicit_http_config Additional Description: Per #38064, this docstring became incorrect with #14362 so should be removed. Risk Level: None, doc-only. Testing: n/a Docs Changes: Yes it is. Release Notes: n/a Platform Specific Features: n/a Signed-off-by: Raven Black <ravenblack@dropbox.com>
) Commit Message: Remove incorrect/outdated doc for explicit_http_config Additional Description: Per envoyproxy#38064, this docstring became incorrect with envoyproxy#14362 so should be removed. Risk Level: None, doc-only. Testing: n/a Docs Changes: Yes it is. Release Notes: n/a Platform Specific Features: n/a Signed-off-by: Raven Black <ravenblack@dropbox.com> Signed-off-by: Sheldon <shaoxt@gmail.com>
) Commit Message: Remove incorrect/outdated doc for explicit_http_config Additional Description: Per envoyproxy#38064, this docstring became incorrect with envoyproxy#14362 so should be removed. Risk Level: None, doc-only. Testing: n/a Docs Changes: Yes it is. Release Notes: n/a Platform Specific Features: n/a Signed-off-by: Raven Black <ravenblack@dropbox.com>
Commit Message: Making the recently added ProtocolOptionsConfig require explicit configuration
Risk Level: Medium (config breaking, for config which is 7 days old)
Testing: n/a
Docs Changes: inline
Release Notes: n/a