Skip to content

test: deflaking */LoadStatsIntegrationTest.LocalityWeighted/*#7225

Merged
alyssawilk merged 7 commits intoenvoyproxy:masterfrom
alyssawilk:flake
Jun 19, 2019
Merged

test: deflaking */LoadStatsIntegrationTest.LocalityWeighted/*#7225
alyssawilk merged 7 commits intoenvoyproxy:masterfrom
alyssawilk:flake

Conversation

@alyssawilk
Copy link
Contributor

@alyssawilk alyssawilk commented Jun 10, 2019

For posterity #6875 got us the information it was a "waiting for stats" bug, which is then debuggable by lowering load stats interval to 1ms.

This exposed two issues with merge. When request 1 arrived in a separate interval from request 2, the stats protos could arrive in the opposite order (fixed by ignoring order) and that if there was a stats-update with a request in progress it never resolved because we were always adding fields (oops!)

I'm tempted to leave the interval low now that this is thoroughly debugged, but there's expectations on the time being within a range which wouldn't work if we lower it so meh?

Risk Level: n/a (test only)
Testing: yes. very much so.
Docs Changes: n/a
Release Notes: n/a
Fixes #6874

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
@alyssawilk alyssawilk closed this Jun 10, 2019
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
htuch
htuch previously requested changes Jun 11, 2019
Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM, nice catches. A few minor comments and we can merge.
/wait

static std::vector<std::string> split(const std::string& source, const std::string& split,
bool keep_empty_string = false);

/**
Copy link
Member

Choose a reason for hiding this comment

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

was recently added, this should do the job I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can use that, but to avoid the removal getting really expensive I'd have to iterate from the back. I think that makes the code harder enough to read I'd prefer to leave as-is unless you have strong feelings about it?

Copy link
Member

Choose a reason for hiding this comment

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

The template could probably easily be extended to have other container types if you are concerned about the list vs. vector ^^.

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
@alyssawilk alyssawilk assigned snowp and unassigned htuch Jun 17, 2019
template <typename ProtoType, typename ReturnType>
static ReturnType
convertToConstMessagePtrContainer(const Protobuf::RepeatedPtrField<ProtoType>& repeated_field) {
ReturnType ret_vector;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe rename the variable now that it's not always a vector?

@@ -461,22 +478,16 @@ TEST_P(LoadStatsIntegrationTest, LocalityWeighted) {
initialize();

// Debug logs for #6874
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove comment?

*
* @param lhs RepeatedPtrField on LHS.
* @param rhs RepeatedPtrField on RHS.
* @param ignore_repeated_field_ordering if ordering should be ignored. Note if true this turns
Copy link
Contributor

Choose a reason for hiding this comment

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

Name here doesn't match the paramter name

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
@alyssawilk alyssawilk merged commit b166f11 into envoyproxy:master Jun 19, 2019
@alyssawilk alyssawilk deleted the flake branch July 31, 2019 20:33
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.

IpVersions/LoadStatsIntegrationTest.LocalityWeighted/IPv4 timing out coverage

3 participants