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

fault: use FractionalPercent for percent #3978

Merged
merged 16 commits into from
Aug 14, 2018

Conversation

venilnoronha
Copy link
Member

@venilnoronha venilnoronha commented Jul 28, 2018

Description:
The existing FaultDelay config used uint32 for the percent field which limited the user to configure percentages only in terms of whole numbers between 0 and 100. FractionalPercent allows finer control over the percent values by allowing fractions to be specified in the configuration, for example, 0.0001%.

Signed-off-by: Venil Noronha veniln@vmware.com

Risk Level: Med
Testing: Added 2 new tests and updated existing tests
Docs Changes: N/A
Release Notes: Added deprecation note and introduced FractionalPercent percentages.
Fixes #3904

/cc @rshriram

The existing FaultDelay config used uint32 for the percent field which
limited the user to configure percentages only in terms of whole numbers
between 0 and 100. FractionalPercent allows finer control over the
percent values by allowing fractions to be specified in the
configuration, for example 0.0001%.

Signed-off-by: Venil Noronha <veniln@vmware.com>
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.

Not a full review but a quick drive by to get started. Thank you!

// on which the delay will be injected.
uint32 percent = 2 [(validate.rules).uint32.lte = 100];
// The percentage of operations/connection requests on which the delay will be injected.
envoy.type.FractionalPercent percent = 2;
Copy link
Member

Choose a reason for hiding this comment

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

We can't just change this. You will need to deprecate the old percent and add a new one.

Copy link
Member

Choose a reason for hiding this comment

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

call the new one as percentage. And i think there is also some protoc validation with it

// 10,000.
//
// **Example**: 1/10000 = 0.01%.
TEN_THOUSAND = 1;
Copy link
Member

Choose a reason for hiding this comment

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

These can't be changed. You will need to add new ones at the end. Are they really necessary though? Seems unnecessary to me with TEN_THOUSAND and MILLION. I would revert these changes personally.

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed in f105661.

@@ -77,7 +77,10 @@ Delay

{
"type" : "...",
"fixed_delay_percent" : "...",
"fixed_delay_percent" : {
Copy link
Member

Choose a reason for hiding this comment

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

We don't accept v1 changes anymore. Please revert all changes to v1 code, schema, docs, etc.

@venilnoronha
Copy link
Member Author

@mattklein123 thanks for the quick review! I'll address the issues you mentioned.

Signed-off-by: Venil Noronha <veniln@vmware.com>
@mattklein123
Copy link
Member

@rshriram do you mind doing first pass review on this?

be delayed for the duration specified by *fixed_duration_ms*. Valid
values range from 0 to 100.
*(required, envoy.type.FractionalPercent)* The percentage of requests that will be delayed for
the duration specified by *fixed_duration_ms*.

Copy link
Member

Choose a reason for hiding this comment

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

Skip all changes to this file

*(required, integer)* Probability of an eligible MongoDB operation to be affected by the
injected fault when there is no active fault. Valid values are integers in a range of [0, 100].
*(required, envoy.type.FractionalPercent)* Probability of an eligible MongoDB operation to be
affected by the injected fault when there is no active fault.
Copy link
Member

Choose a reason for hiding this comment

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

and this as well

virtual bool featureEnabled(const std::string& key, uint64_t default_value, uint64_t random_value,
uint64_t num_buckets) const PURE;
virtual bool sampleFeatureEnabled(const std::string& key, uint64_t default_value,
uint64_t random_value, uint64_t num_buckets) const PURE;
Copy link
Member

Choose a reason for hiding this comment

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

@mattklein123 how are you guys doing fractional percent with runtimes? IOW, do you need runtime support for fractional percent? If not, all changes to this file can be eliminated

Copy link
Member Author

Choose a reason for hiding this comment

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

I think access_log_impl uses runtime for sampling the feature status as seen here. Should we just stick to a similar approach for faults?

Copy link
Member

Choose a reason for hiding this comment

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

Looking again, why is this being renamed ?

Copy link
Member Author

@venilnoronha venilnoronha Aug 1, 2018

Choose a reason for hiding this comment

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

Because of a signature conflict between the routines highlighted here.

@@ -379,9 +379,20 @@ const std::string Json::Schema::MONGO_PROXY_NETWORK_FILTER_SCHEMA(R"EOF(
"type" : "object",
"properties" : {
"percent" : {
"type" : "integer",
"minimum" : 0,
"maximum" : 100
Copy link
Member

Choose a reason for hiding this comment

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

skip file

Copy link
Member

@rshriram rshriram left a comment

Choose a reason for hiding this comment

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

Thanks for doing this. Left comments inline.

* Revert v1 code, schema & doc changes
* Deprecate percent field in FaultDelay
* Introduce percentage field in FaultDelay of type FractionalPercent

Signed-off-by: Venil Noronha <veniln@vmware.com>
Copy link
Member

@rshriram rshriram left a comment

Choose a reason for hiding this comment

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

You need to do this for both delay and aborts.

Follow the convert old to new approach instead of a if old_set do x or if new_set do y.

if (json_config_delay->hasObject("fixed_delay_percentage")) {
const auto json_percentage = json_config_delay->getObject("fixed_delay_percentage");
JSON_UTIL_SET_FRACTIONALPERCENT(*json_percentage, *delay, percentage);
}
Copy link
Member

Choose a reason for hiding this comment

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

You don’t need this. This is for translation of legacy config only.

if (json_fault->hasObject("percentage")) {
const auto json_percentage = json_fault->getObject("percentage");
JSON_UTIL_SET_FRACTIONALPERCENT(*json_percentage, *delay, percentage);
}
Copy link
Member

Choose a reason for hiding this comment

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

Same here

return sampleFeatureEnabled(key, default_value, generator_.random(), num_buckets);
}

bool SnapshotImpl::sampleFeatureEnabled(const std::string& key, uint64_t default_value,
Copy link
Member

Choose a reason for hiding this comment

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

Skip renaming and overload old function name ?

Copy link
Member

Choose a reason for hiding this comment

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

Ignore

enabled |= config_->runtime().snapshot().featureEnabled(downstream_cluster_delay_percent_key_,
bool enabled = false;
if (fault_settings_->delayPercent() != 0) {
enabled |= config_->runtime().snapshot().featureEnabled(DELAY_PERCENT_KEY,
Copy link
Member

Choose a reason for hiding this comment

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

This is not right. Runtime overrides config. If there is no runtime the config value becomes the default.

downstream_cluster_delay_percent_key_, fault_settings_->delayPercentage().numerator(),
ProtobufPercentHelper::fractionalPercentDenominatorToInt(
fault_settings_->delayPercentage()));
}
Copy link
Member

Choose a reason for hiding this comment

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

Flip the logic. Read new runtime or percentage. If not present read old runtime.

uint64_t abort_percent_{}; // 0-100
uint64_t http_status_{}; // HTTP or gRPC return codes
uint64_t fixed_delay_percent_{}; // 0-100
envoy::type::FractionalPercent fixed_delay_percentage_{}; // 0-100
Copy link
Member

Choose a reason for hiding this comment

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

Here is a simpler way. Convert both percents to fractional (delay and abort).
Then when reading/translating config, if there is no fractional but old percent field is set, read it and convert it to fractions (out of 100).

Then in fault filter you simply have to check for new runtime fields for fractional percentage. If absent check old field. If that’s also absent use the value provided in the config.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd prefer to implement the change to abort in a separate PR.

* Revert v1 changes
* Improve the logic that determines whether delay should be enabled

Signed-off-by: Venil Noronha <veniln@vmware.com>
@@ -41,6 +40,7 @@ FaultSettings::FaultSettings(const envoy::config::filter::http::fault::v2::HTTPF

if (fault.has_delay()) {
fixed_delay_percent_ = fault.delay().percent();
fixed_delay_percentage_ = fault.delay().percentage();
Copy link
Member

Choose a reason for hiding this comment

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

do you have validtion set to ensure that this field is not null ?
Also, fold fixed_delay_percent_ into fixed_delay_percentage.. i.e. convert the old percent (if set) to new form..
The problem though is that you can't differentiate between a 0 percent and unset percent in hte old one as its uint32.. Sigh..

Copy link
Member Author

Choose a reason for hiding this comment

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

I've addressed this in 6652866.

Signed-off-by: Venil Noronha <veniln@vmware.com>
* Convert uint32/uint64 percentages to FractionalPercent
* Add null validation for FractionalPercent
* Document proto changes in version_history

Signed-off-by: Venil Noronha <veniln@vmware.com>
Copy link
Member

@rshriram rshriram left a comment

Choose a reason for hiding this comment

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

This is looking very good. A few minor nits related to duplicated tests. Also, please do the same change for aborts as well (abort percentage instead of integer percent)

//
// .. attention::
//
// This field is deprecated and `percentage` should be used instead.
Copy link
Member

Choose a reason for hiding this comment

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

Use of integer percent value is deprecated. Use fractional percentage field instead

@@ -11,6 +11,8 @@ Version history
`google.api.HttpBody <https://github.com/googleapis/googleapis/blob/master/google/api/httpbody.proto>`_.
* config: v1 disabled by default. v1 support remains available until October via flipping --v2-config-only=false.
* config: v1 disabled by default. v1 support remains available until October via setting :option:`--allow-deprecated-v1-api`.
* fault: deprecated :ref:`percent <envoy_api_field_config.filter.fault.v2.FaultDelay.percent>` in
favor of :ref:`fractional percentages <envoy_api_field_config.filter.fault.v2.FaultDelay.percentage>` for fault injections.
Copy link
Member

Choose a reason for hiding this comment

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

  • fault: Added support for fractional percentages...

std::string upstream_cluster_; // restrict faults to specific upstream cluster
uint64_t abort_percent_{}; // 0-100
uint64_t http_status_{}; // HTTP or gRPC return codes
envoy::type::FractionalPercent fixed_delay_percentage_{}; // 0-100
Copy link
Member

Choose a reason for hiding this comment

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

fix comment to indicate that this is fractional

uint64_t fixed_delay_percent_{}; // 0-100
uint64_t fixed_duration_ms_{}; // in milliseconds
std::string upstream_cluster_; // restrict faults to specific upstream cluster
uint64_t abort_percent_{}; // 0-100
Copy link
Member

Choose a reason for hiding this comment

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

Since you are doing this for delays, why don't you change the aborts as well to fractional ? It makes the implementation streamlined.

Copy link
Member Author

Choose a reason for hiding this comment

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

Since this PR is big in itself, should we do it in another PR?

Copy link
Member

Choose a reason for hiding this comment

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

The abort stuff is small. Confined to http only. If done right, it should be touching same files and not much.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I'm on it right now. Figured out it wasn't as big of a change as I thought it would be.

@@ -37,4 +43,7 @@ message FaultDelay {
google.protobuf.Duration fixed_delay = 3
[(validate.rules).duration.gt = {}, (gogoproto.stdduration) = true];
}

// The percentage of operations/connection requests on which the delay will be injected.
envoy.type.FractionalPercent percentage = 4;
Copy link
Member

Choose a reason for hiding this comment

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

Can you do the same for aborts as well ?

@@ -321,11 +324,58 @@ TEST_F(FaultFilterTest, FixedDelayZeroDuration) {
EXPECT_EQ(0UL, config_->stats().aborts_injected_.value());
}

TEST_F(FaultFilterTest, V2FixedDelayNonZeroDuration) {
Copy link
Member

Choose a reason for hiding this comment

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

rather than copying, modify the test case below directly. JSON will soon be out.

TEST_F(MongoProxyFilterTest, DelayFaults) {
setupDelayFault(true);
initializeFilter();
Copy link
Member

Choose a reason for hiding this comment

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

same comment as above. Simply change this function. You don't need a new function for this.. All you need to test is whether old percent is being respected or not.

You could even change this into DelayFaultWithDeprecatedIntegerPercent and DelayFaultWithFractionalPercent

Signed-off-by: Venil Noronha <veniln@vmware.com>
@venilnoronha
Copy link
Member Author

@rshriram I've addressed the last set of comments in f14d3bc. Let me know if you still want the abort changes in this PR, or if you'd prefer it in another PR.

@rshriram
Copy link
Member

rshriram commented Aug 6, 2018

Same pr please. It’s a mass search and replace. Makes it easy to follow patterns

* Deprecate int percent in FaultAbort proto
* Introduce FractionalPercent percentages for aborts
* Update abort tests

Signed-off-by: Venil Noronha <veniln@vmware.com>
Copy link
Member

@rshriram rshriram left a comment

Choose a reason for hiding this comment

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

Looks good so far.

@venilnoronha
Copy link
Member Author

Implemented the changes to abort in 3d56b3f.

rshriram
rshriram previously approved these changes Aug 7, 2018
Copy link
Member

@rshriram rshriram left a comment

Choose a reason for hiding this comment

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

LGTM

@rshriram
Copy link
Member

rshriram commented Aug 7, 2018

ping @mattklein123 .. this is ready for a final pass.

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.

LGTM, some small comments. Thank you!

@@ -11,6 +11,7 @@ Version history
`google.api.HttpBody <https://github.com/googleapis/googleapis/blob/master/google/api/httpbody.proto>`_.
* config: v1 disabled by default. v1 support remains available until October via flipping --v2-config-only=false.
* config: v1 disabled by default. v1 support remains available until October via setting :option:`--allow-deprecated-v1-api`.
* fault: added support for :ref:`fractional percentages <envoy_api_field_config.filter.fault.v2.FaultDelay.percentage>`.
Copy link
Member

Choose a reason for hiding this comment

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

Please note the deprecations in deprecated.md

* of [0, num_buckets).
* @return true if the feature is enabled.
*/
virtual bool sampleFeatureEnabled(const std::string& key, uint64_t default_value,
Copy link
Member

Choose a reason for hiding this comment

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

nit: I see why you had to change the name here, but IMO "sample" is a bit strange in the sense that the other featureEnabled() functions also do sampling. A few options here:

  1. Get rid of the versions of featureEnabled() that don't require specifying number of buckets. Larger change.
  2. Some other name. featureEnabledEx ? (Bad, but not sure what would be better).

Copy link
Member Author

@venilnoronha venilnoronha Aug 8, 2018

Choose a reason for hiding this comment

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

@mattklein123 thanks for reviewing! I've addressed your other comments in f197fe2, and I'm working on this one now.

Copy link
Member Author

Choose a reason for hiding this comment

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

Implemented option 1 in f98bcc0.

@@ -34,12 +34,22 @@ const std::string FaultFilter::ABORT_HTTP_STATUS_KEY = "fault.http.abort.http_st
FaultSettings::FaultSettings(const envoy::config::filter::http::fault::v2::HTTPFault& fault) {

if (fault.has_abort()) {
abort_percent_ = fault.abort().percent();
if (fault.abort().has_percentage()) {
Copy link
Member

Choose a reason for hiding this comment

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

extract to helper function for duplicated code here and below.

uint64_t fixed_delay_percent_{}; // 0-100
uint64_t fixed_duration_ms_{}; // in milliseconds
std::string upstream_cluster_; // restrict faults to specific upstream cluster
envoy::type::FractionalPercent abort_percentage_{}; // 0.0-100.0
Copy link
Member

Choose a reason for hiding this comment

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

{} not needed. Also, comment is no longer relevant I think. Same below.

duration_ms_(PROTOBUF_GET_MS_REQUIRED(fault_config, fixed_delay)) {}
uint32_t delayPercent() const { return delay_percent_; }
: duration_ms_(PROTOBUF_GET_MS_REQUIRED(fault_config, fixed_delay)) {
if (fault_config.has_percentage()) {
Copy link
Member

Choose a reason for hiding this comment

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

same utility function extracted above

* Update DEPRECATED and version_history docs
* Fix FractionalPercent variable declaration issue
* Extract repeating logic into a macro

Signed-off-by: Venil Noronha <veniln@vmware.com>
@mattklein123 mattklein123 self-assigned this Aug 8, 2018
Signed-off-by: Venil Noronha <veniln@vmware.com>
Signed-off-by: Venil Noronha <veniln@vmware.com>
mattklein123
mattklein123 previously approved these changes Aug 10, 2018
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 for the cleanup, LGTM. @rshriram can you take one last pass given the new changes?

@@ -212,7 +212,7 @@ void ConnectionManagerUtility::mutateTracingRequestHeader(Http::HeaderMap& reque
}

if (!runtime.snapshot().featureEnabled("tracing.global_enabled",
config.tracingConfig()->overall_sampling_, result)) {
config.tracingConfig()->overall_sampling_, result, 100)) {
Copy link
Member

Choose a reason for hiding this comment

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

why this change?

Copy link
Member Author

@venilnoronha venilnoronha Aug 13, 2018

Choose a reason for hiding this comment

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

@rshriram
Copy link
Member

@venilnoronha I think you lost some of your changes. You haven't implemented either option that matt suggested but the call sites seem to have changed

* @return true if the feature is enabled.
*/
virtual bool featureEnabled(const std::string& key, uint64_t default_value,
uint64_t random_value) const PURE;
uint64_t num_buckets) const PURE;
Copy link
Member

Choose a reason for hiding this comment

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

did you intend to delete this function and simply use the one below everywhere?

Copy link
Member Author

@venilnoronha venilnoronha Aug 13, 2018

Choose a reason for hiding this comment

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

I wanted to use the function below whenever it was possible to supply a random value. However, there are a few cases where there isn't a random number available at call time, and that's where I use this.

uint64_t random_value) const {
return featureEnabled(key, default_value, random_value, 100);
}

Copy link
Member

Choose a reason for hiding this comment

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

These two functions are not equivalent.. The stable random value is not same as number of buckets above. Am I missing something here>?

Copy link
Member Author

Choose a reason for hiding this comment

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

random_value and num_buckets aren't being used interchangeably. Either we pass both random_value and num_buckets to featureEnabled, or we only pass num_buckets. There's no way to pass random_value without num_buckets.

@rshriram
Copy link
Member

So I suggest this.. Replace all call sites of featureEnabled() with the longer version that always passes the number of buckets - But do this in a separate PR. This should essentially be a mass search-and-replace. Should have no issues with any reviewer. Then this PR will automatically reduce to the changes related to fault injection.

Alternatively, simply rename the sampleFeatureEnabled to something else like featureEnabledEx and retain changes before you followed matt's option

Signed-off-by: Venil Noronha <veniln@vmware.com>
Signed-off-by: Venil Noronha <veniln@vmware.com>
@venilnoronha
Copy link
Member Author

@rshriram I've reverted the changes and have renamed sampleFeatureEnabled to featureEnabledEx in 9b1046f.

@mattklein123 as @rshriram suggested, I'll take up option 1 in a separate PR.

Thanks,
Venil

@mattklein123
Copy link
Member

@mattklein123 as @rshriram suggested, I'll take up option 1 in a separate PR.

I would rather do one set of changes. If you want to do option 1, can you just do that PR first, we can review/merge, and then we can merge master into this?

@venilnoronha
Copy link
Member Author

venilnoronha commented Aug 13, 2018

On a second thought, I'd prefer keeping featureEnabledEx. We could cherry-pick f98bcc0 later if absolutely necessary.

* @return true if the feature is enabled.
*/
virtual bool featureEnabledEx(const std::string& key, uint64_t default_value,
uint64_t num_buckets) const PURE;
Copy link
Member

Choose a reason for hiding this comment

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

Is there any callsite that is calling the 3 arg form of featureEnabledEx supplying buckets instead of random value? If not, lets get rid of this function.

Copy link
Member

Choose a reason for hiding this comment

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

+1 if possible.

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed via aef3da0 and c31bd82.

@rshriram
Copy link
Member

So here is another easier way to resolve this: Add a random() function to the Loader interface.
In the fault filter code, use config_->runtime()->random(), so that you can call the existing featureEnabled(4 arg) function. This would avoid changing other call sites. All you need to do is add the new function to the interface and update a few mocks.

Signed-off-by: Venil Noronha <veniln@vmware.com>
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.

I'm fine with the Ex change, but will defer to @rshriram and you to decide if you want to do something different.

* @return true if the feature is enabled.
*/
virtual bool featureEnabledEx(const std::string& key, uint64_t default_value,
uint64_t num_buckets) const PURE;
Copy link
Member

Choose a reason for hiding this comment

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

+1 if possible.

This commit removes the 3 param sampleFeatureEnabled routine and renames
the 4 param sampleFeatureEnabled routine back to featureEnabled. It also
exports the RandomGenerator via the Loader in order to provide random
values for featureEnabled calls.

Signed-off-by: Venil Noronha <veniln@vmware.com>
/**
* @return RandomGenerator& the random generator.
*/
virtual RandomGenerator& random() PURE;
Copy link
Member

Choose a reason for hiding this comment

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

Do we really need to add this to this interface? I guess it's OK, but can't you just pass the random generator to where you need it? It should be in the filter config factory? This is what we do elsewhere.

Copy link
Member Author

@venilnoronha venilnoronha Aug 13, 2018

Choose a reason for hiding this comment

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

Thought that I'd have to pass the RandomGenerator instance a long way, but I was wrong. I've fixed this in f167d92.

This commit removes the random() routine from the Loader and instead
passes the RandomGenerator via the constructor to FaultFilterConfig and
the ProxyFilter.

Signed-off-by: Venil Noronha <veniln@vmware.com>
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, very nice!

@mattklein123 mattklein123 merged commit 714ae13 into envoyproxy:master Aug 14, 2018
@venilnoronha
Copy link
Member Author

@mattklein123 @rshriram thanks for reviewing/merging.

snowp added a commit to snowp/envoy that referenced this pull request Aug 14, 2018
* origin/master: (38 commits)
  test: add tests for corner-cases around sending requests before run() starts or after run() ends. (envoyproxy#4114)
  perf: reduce the memory usage of LC Trie construction (envoyproxy#4117)
  test: moving redundant code in websocket_integration_test to utilities (envoyproxy#4127)
  test: make YamlLoadFromStringFail less picky about error msg. (envoyproxy#4141)
  rbac: add rbac network filter. (envoyproxy#4083)
  fuzz: route lookup and header finalization fuzzer. (envoyproxy#4116)
  Set content-type and content-length (envoyproxy#4113)
  fault: use FractionalPercent for percent (envoyproxy#3978)
  test: Fix inverted exact match logic in IntegrationTcpClient::waitForData() (envoyproxy#4134)
  Added cluster_name to load assignment config for static cluster (envoyproxy#4123)
  ssl: refactor ContextConfig to use TlsCertificateConfig (envoyproxy#4115)
  syscall: refactor OsSysCalls for deeper errno latching (envoyproxy#4111)
  thrift_proxy: fix oneway bugs (envoyproxy#4025)
  Do not crash when converting YAML to JSON fails (envoyproxy#4110)
  config: allow unknown fields flag (take 2) (envoyproxy#4096)
  Use a jittered backoff strategy for handling HdsDelegate stream/connection failures (envoyproxy#4108)
  bazel: use GCS remote cache (envoyproxy#4050)
  Add thread local cache of overload action states (envoyproxy#4090)
  Added TCP healthcheck capabilities to the HdsDelegate (envoyproxy#4079)
  secret: add secret provider interface and use it for TlsCertificates (envoyproxy#4086)
  ...

Signed-off-by: Snow Pettersen <snowp@squareup.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.

None yet

3 participants