Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: making protocol config explicit #14362

Merged
merged 7 commits into from
Dec 15, 2020

Conversation

alyssawilk
Copy link
Contributor

@alyssawilk alyssawilk commented Dec 10, 2020

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

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/envoy/.
API shepherd assignee is @mattklein123
CC @envoyproxy/api-watchers: FYI only for changes made to api/envoy/.

🐱

Caused by: #14362 was opened by alyssawilk.

see: more, trace.

@alyssawilk
Copy link
Contributor Author

alyssawilk commented Dec 10, 2020

@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
//test/config_test:example_configs_test passes

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>
@alyssawilk
Copy link
Contributor Author

Ah, I think I see th problem. sec.

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

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for the follow up. Just a few small comments.

/wait

@@ -49,6 +50,7 @@ class ProtocolOptionsConfigFactory : public Server::Configuration::ProtocolOptio
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());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: use downcastAndValidate here.

message ExplicitHttpConfig {
oneof protocol_config {
option (validate.required) = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@alyssawilk alyssawilk merged commit ff3ef12 into envoyproxy:master Dec 15, 2020
mpuncel added a commit to mpuncel/envoy that referenced this pull request Dec 16, 2020
* 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>
@alyssawilk alyssawilk deleted the config_redux branch June 10, 2021 13:43
ravenblackx added a commit that referenced this pull request Jan 17, 2025
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>
shaoxt pushed a commit to shaoxt/envoy that referenced this pull request Jan 17, 2025
)

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>
bazmurphy pushed a commit to bazmurphy/envoy that referenced this pull request Jan 29, 2025
)

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants