Skip to content

test: deflaking unexpected disconnects permanently#12939

Merged
snowp merged 2 commits intoenvoyproxy:masterfrom
alyssawilk:flake
Sep 3, 2020
Merged

test: deflaking unexpected disconnects permanently#12939
snowp merged 2 commits intoenvoyproxy:masterfrom
alyssawilk:flake

Conversation

@alyssawilk
Copy link
Copy Markdown
Contributor

Allowing unexpected disconnects by default.

Risk Level: Low
Testing: tests pass
Docs Changes: n/a
Release Notes: n/a
Fixes #12861

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
dispatcher_(api_->allocateDispatcher("fake_upstream")),
handler_(new Server::ConnectionHandlerImpl(*dispatcher_)),
allow_unexpected_disconnects_(false), read_disable_on_new_connection_(true),
allow_unexpected_disconnects_(true), read_disable_on_new_connection_(true),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

really my only question is if we should remove allow_unexpected_disconnects_ and set_allow_unexpected_disconnects() entirely, which will likely break downstream test builds, but it's only worth keeping around if someone really wants some test to allow_unexpected_disconnects_(false) explicitly. Maybe a follow-up so we can roll only that part back if someone wants that?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think doing it in a follow up makes sense. Do we not have any tests that want to test for unexpected disconnects right now?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

not that I know of? I mean we could arguably set it false for every test which didn't previously have it set true, but I think most tests which wanted to know they got a complete request waited for a complete requests, ditto response.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think that's necessary, probably fine to just get rid of for now unless someone complains

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm fine with a follow up but I would be fine just getting rid of it all now.

snowp
snowp previously approved these changes Sep 2, 2020
Copy link
Copy Markdown
Contributor

@snowp snowp left a comment

Choose a reason for hiding this comment

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

LGTM!

dispatcher_(api_->allocateDispatcher("fake_upstream")),
handler_(new Server::ConnectionHandlerImpl(*dispatcher_)),
allow_unexpected_disconnects_(false), read_disable_on_new_connection_(true),
allow_unexpected_disconnects_(true), read_disable_on_new_connection_(true),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think doing it in a follow up makes sense. Do we not have any tests that want to test for unexpected disconnects right now?

@snowp snowp self-assigned this Sep 2, 2020
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
@alyssawilk
Copy link
Copy Markdown
Contributor Author

went with Matt's request and did it in one fell swoop. LGTY?

Copy link
Copy Markdown
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.

Awesome, just one comment for your thoughts on.

/wait-any

Comment on lines +336 to 338
if (unexpected_disconnect && !allow_disconnects) {
ENVOY_LOG_MISC(warn, "executeOnDispatcher failed due to disconnect\n");
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is anyone ever going to see this? Delete also?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

My thought, and why I left it at warn, was if some executeOnDispatcher call asserts the call happens when in fact it's an unexpected disconnect, it'd be a pain to debug without at least some breadcrumb.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

OK SGTM. We can always iterate further later!

Copy link
Copy Markdown
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.

Yay!

Copy link
Copy Markdown
Contributor

@snowp snowp 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!

@snowp snowp merged commit 267cb56 into envoyproxy:master Sep 3, 2020
jrajahalme added a commit to cilium/proxy that referenced this pull request Dec 18, 2020
Backport crucial part of envoyproxy/envoy#12939
to get rid of flaky assertion failure.

Signed-off-by: Jarno Rajahalme <jarno@covalent.io>
jrajahalme added a commit to cilium/proxy that referenced this pull request Dec 22, 2020
Backport crucial part of envoyproxy/envoy#12939
to get rid of flaky assertion failure.

Signed-off-by: Jarno Rajahalme <jarno@covalent.io>
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.

Test100AndDisconnectLegacy flake (ARM release)

3 participants