Skip to content

Update Envoy to f95f5391b0b8683081ec786ea946026594955fc6#562

Merged
dubious90 merged 6 commits intoenvoyproxy:masterfrom
oschaaf:envoy-dep-update-44
Oct 21, 2020
Merged

Update Envoy to f95f5391b0b8683081ec786ea946026594955fc6#562
dubious90 merged 6 commits intoenvoyproxy:masterfrom
oschaaf:envoy-dep-update-44

Conversation

@oschaaf
Copy link
Copy Markdown
Member

@oschaaf oschaaf commented Oct 16, 2020

Notable changes:

  • Handle the new Envoy::Http::StreamResetReason:: ConnectError & amend related test
  • Handle that Envoy::Http::HeaderMap::get() now returns a Envoy::Http::HeaderMap::GetResult.
  • Squelch Envoy's format check error that scans for urls in bazel/repositories.bzl

Signed-off-by: Otto van der Schaaf oschaaf@we-amp.com

Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
@oschaaf oschaaf added the waiting-for-review A PR waiting for a review. label Oct 16, 2020
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
@dubious90 dubious90 requested a review from jiajunye October 19, 2020 17:46
@dubious90
Copy link
Copy Markdown
Contributor

@jiajunye can you please review this and assign back to me once done? Also let me know if you have any questions.

jiajunye
jiajunye previously approved these changes Oct 19, 2020
Copy link
Copy Markdown
Contributor

@jiajunye jiajunye left a comment

Choose a reason for hiding this comment

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

Just a nit.

@jiajunye jiajunye added waiting-for-changes A PR waiting for comments to be resolved and changes to be applied. and removed waiting-for-review A PR waiting for a review. labels Oct 19, 2020
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
@oschaaf oschaaf added waiting-for-review A PR waiting for a review. and removed waiting-for-changes A PR waiting for comments to be resolved and changes to be applied. labels Oct 19, 2020
@jiajunye
Copy link
Copy Markdown
Contributor

LGTM

Copy link
Copy Markdown
Contributor

@dubious90 dubious90 left a comment

Choose a reason for hiding this comment

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

Mostly looks good. Just two nits.

name = "envoy",
sha256 = ENVOY_SHA,
strip_prefix = "envoy-%s" % ENVOY_COMMIT,
# // clang-format off: Envoy's format check: Only repository_locations.bzl may contains URL references
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.

This seems to be the first instance where us just using envoy's .bazelrc isn't great for us. No action required here on this PR, but we should keep an eye on it.

const Envoy::Http::HeaderMap::GetResult& timing_header =
response_headers_->get(timing_header_name);
if (!timing_header.empty()) {
absl::string_view timing_value = timing_header[0]->value().getStringView();
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.

This could possibly use a comment or maybe even an assertion of sorts. It looks like the envoy function was changed to now allow multiple HeaderEntries to be returned rather than one?

I gather that our use case would always expect only one - would it be reasonable to add a failure here if we received more than one?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I added a sparse warning log line in dc0b618 and also testing for that case to make sure we don't track timings when there's ambiguity because of multiple header/value pairs.

const auto* request_config_header = headers.get(TestServer::HeaderNames::get().TestServerConfig);
if (request_config_header) {
const auto& request_config_header = headers.get(TestServer::HeaderNames::get().TestServerConfig);
if (request_config_header.size() == 1) {
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.

should we have an else condition here now? again, taking into consideration receiving more than 1

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, you're right. Done in dc0b618 + explicit tests for the case.

Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>

TEST_P(HttpFilterBaseIntegrationTest, SingleValidPlusEmptyConfigurationHeadersFails) {
// Make sure we fail when both a valid configuration plus an empty configuration header is send.
// Note that we could be more flexible and look for the first request header that has a value,
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.

This note seems like it belongs more in the function itself rather than in this test.

Also, I might encourage a rephrase of why our approach is reasonable. Without understanding of a real use case for them, we are assuming that any existence of duplicate headers here is in error.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Amended this; also updated the Envoy dep to f95f5391b0b8683081ec786ea946026594955fc6 in here, as that didn't need require any changes on our side modulo updating the revision/sha in .bazelrc.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

(changes associated to your review comment applied in 6136e81, the Envoy sha change is in 30d7f20)

Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
Signed-off-by: Otto van der Schaaf <oschaaf@we-amp.com>
@oschaaf oschaaf changed the title Update Envoy to 9dce187eca9aa10e98c0ae81368c078384528801 Update Envoy to f95f5391b0b8683081ec786ea946026594955fc6 Oct 21, 2020
@oschaaf
Copy link
Copy Markdown
Member Author

oschaaf commented Oct 21, 2020

/retest

@repokitteh-read-only
Copy link
Copy Markdown

🔨 rebuilding ci/circleci: clang_tidy (failed build)
🔨 rebuilding ci/circleci: test (failed build)
🔨 rebuilding ci/circleci: integration_test_coverage (failed build)
🔨 rebuilding ci/circleci: test_gcc (failed build)

🐱

Caused by: a #562 (comment) was created by @oschaaf.

see: more, trace.

@dubious90 dubious90 merged commit 20a9de2 into envoyproxy:master Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-for-review A PR waiting for a review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants