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

JSON Schema: HTTP Filter schemas #405

Merged
merged 9 commits into from
Feb 1, 2017
Merged

JSON Schema: HTTP Filter schemas #405

merged 9 commits into from
Feb 1, 2017

Conversation

ccaraman
Copy link
Contributor

@ccaraman ccaraman commented Feb 1, 2017

-Breaks http configs into h/cc
-Increases tests coverage for http configs by adding server/config/http/config_test.cc
-Adds schema validation for applicable HTTP filters.
-Updates Fault Filter documentation to specify at least abort or delay must be specified in the config. The implementation has been updated to reflect expected behaviour.
-Added empty() method on JSON Objects.

@ccaraman
Copy link
Contributor Author

ccaraman commented Feb 1, 2017

@lyft/network-team @rshriram

@ccaraman ccaraman force-pushed the http-filter-schemas branch from 4049585 to 35dc4a4 Compare February 1, 2017 20:25
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.

so awesome, just a small comment.

const Json::ObjectPtr& abort = json_config.getObject("abort");
json_config.validateSchema(Json::Schema::FAULT_HTTP_FILTER_SCHEMA);

const Json::ObjectPtr& abort = json_config.getObject("abort", true);
Copy link
Member

Choose a reason for hiding this comment

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

no reference here and next line (you are storing reference to temporary).

const std::string& stats_prefix,
Server::Instance& server) {
if (type != HttpFilterType::Decoder || name != "buffer") {
return nullptr;
Copy link
Member

Choose a reason for hiding this comment

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

silly question: is the name check necessary here? Is there a possibility that the code that instantiates filters calls this factory method without matching the name?

Copy link
Member

Choose a reason for hiding this comment

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

If so, shouldn't every filter be checking the name?

Copy link
Member

Choose a reason for hiding this comment

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

actually, I take it back.. Everything is checking for the name.

const std::string& stat_prefix,
Server::Instance& server) {
if (type != HttpFilterType::Both || name != "http_dynamo_filter") {
return nullptr;
Copy link
Member

Choose a reason for hiding this comment

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

If this pattern is needed, then I think fault and rate limit are missing the name checks.

Copy link
Contributor Author

@ccaraman ccaraman Feb 1, 2017

Choose a reason for hiding this comment

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

They are checked in config/http/(fault.cc/ratelimit.cc)

@ccaraman ccaraman merged commit 62b3edd into master Feb 1, 2017
@ccaraman ccaraman deleted the http-filter-schemas branch February 1, 2017 22:01
PiotrSikora pushed a commit to PiotrSikora/envoy that referenced this pull request Feb 24, 2020
PiotrSikora pushed a commit to istio/envoy that referenced this pull request Feb 24, 2020
bianpengyuan pushed a commit to istio/envoy that referenced this pull request Feb 24, 2020
* Move proxy_on_delete() call out of proxy_done() call from the VM (make (envoyproxy#405)

non-reentrant).

Signed-off-by: John Plevyak <[email protected]>

* Simplify Wasm shutdown. (envoyproxy#410)

Signed-off-by: John Plevyak <[email protected]>

Co-authored-by: John Plevyak <[email protected]>
wolfguoliang pushed a commit to wolfguoliang/envoy that referenced this pull request Jan 23, 2021
…ward_proxy_filter.rst (envoyproxy#405)

* feat(dynamic_forward_proxy_filter): first draft

* fix(dynamic_forward_proxy_filter): revision

* fix(dynamic_forward_proxy_filter): compile problem

* fix(dynamic_forward_proxy_filter): compile problem

* fix(dynamic_forward_proxy_filter): improve coherence

Co-authored-by: 李景炤 <[email protected]>
jpsim pushed a commit that referenced this pull request Nov 28, 2022
Description: previously onError was not delivering the callback all the way to the platform. This PR wires functionality all the way and also converts envoy_error to EnvoyError.
Risk Level: med - implementing core functionality
Testing: built locally

Signed-off-by: Jose Nino <[email protected]>
Signed-off-by: JP Simard <[email protected]>
jpsim pushed a commit that referenced this pull request Nov 29, 2022
Description: previously onError was not delivering the callback all the way to the platform. This PR wires functionality all the way and also converts envoy_error to EnvoyError.
Risk Level: med - implementing core functionality
Testing: built locally

Signed-off-by: Jose Nino <[email protected]>
Signed-off-by: JP Simard <[email protected]>
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.

3 participants