Skip to content

stream_info: cleaning up setters and getters#19139

Merged
yanavlasov merged 6 commits intoenvoyproxy:mainfrom
alyssawilk:upstream3
Dec 7, 2021
Merged

stream_info: cleaning up setters and getters#19139
yanavlasov merged 6 commits intoenvoyproxy:mainfrom
alyssawilk:upstream3

Conversation

@alyssawilk
Copy link
Copy Markdown
Contributor

Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Copy link
Copy Markdown
Contributor

@RyanTheOptimist RyanTheOptimist left a comment

Choose a reason for hiding this comment

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

There's a lot going on here, but it looks good. I think it needs a main merge though?

* information for the one that "wins".
*/
virtual void setUpstreamTiming(const UpstreamTiming& upstream_timing) PURE;

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 PR seems quite similar to #19118? Does this PR replace that one?

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.

yeah, theoretically. there's 2 issues with that one - the clang tidy which I have fixed locally (not pushed) and the windows build failure, which I could not figure out. I was hoping removing the getters would remove the build failure but left it assigned my way until I was sure.

if it's too big to combine getter and setter clean up, I can likely submit removing getters first, but didn't want to break it up until 1) I knew it fixed the problem and 2) checking to see if you wanted it split or were OK with the one large PR

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 approach seems totally fine. No need to split. It's a lot of movement but it's largely mechanical/straightforward. It's not like there's lots of complex interactions which are changing, I think.

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

/retest

@repokitteh-read-only
Copy link
Copy Markdown

Retrying Azure Pipelines:
Retried failed jobs in: envoy-presubmit

🐱

Caused by: a #19139 (comment) was created by @alyssawilk.

see: more, trace.

RyanTheOptimist
RyanTheOptimist previously approved these changes Dec 2, 2021
Copy link
Copy Markdown
Contributor

@RyanTheOptimist RyanTheOptimist left a comment

Choose a reason for hiding this comment

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

LGTM, Though I think there's a missing EXPECT_CALL in //test/extensions/filters/http/alternate_protocols_cache:filter_test

* information for the one that "wins".
*/
virtual void setUpstreamTiming(const UpstreamTiming& upstream_timing) PURE;

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 approach seems totally fine. No need to split. It's a lot of movement but it's largely mechanical/straightforward. It's not like there's lots of complex interactions which are changing, I think.

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
yanavlasov
yanavlasov previously approved these changes Dec 2, 2021
[](const StreamInfo::StreamInfo& stream_info)
-> std::shared_ptr<const Envoy::Network::Address::Instance> {
if (stream_info.upstreamInfo().has_value()) {
return stream_info.upstreamInfo().value().get().upstreamLocalAddress();
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.

Nit: small simplification, since OptRef already has a method for this chain of calls.

Suggested change
return stream_info.upstreamInfo().value().get().upstreamLocalAddress();
return stream_info.upstreamInfo().ref().upstreamLocalAddress();

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
@yanavlasov yanavlasov enabled auto-merge (squash) December 6, 2021 20:38
@yanavlasov yanavlasov merged commit d36b469 into envoyproxy:main Dec 7, 2021
mum4k pushed a commit to envoyproxy/nighthawk that referenced this pull request Dec 15, 2021
- Update .bazelrc
- envoyproxy/envoy#19185 - abstracts address_ from DnsResponse into a sub-struct AddrInfoResponse
- envoyproxy/envoy#19139 - removes setUpstreamTiming and instead we set an UpstreamInfo shared pointer on the StreamInfo and modify that one directly
- Sync tools/gen_compilation_database.py and add instructions to MAINTAINERS.md making sure we always keep that in sync

Signed-off-by: Nathan Perry <nbperry@google.com>
@alyssawilk alyssawilk deleted the upstream3 branch August 4, 2022 01:13
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