Skip to content

listener: move active_tcp_listener out of conn handler#15553

Merged
ggreenway merged 6 commits intoenvoyproxy:mainfrom
lambdai:tcplistener
Mar 25, 2021
Merged

listener: move active_tcp_listener out of conn handler#15553
ggreenway merged 6 commits intoenvoyproxy:mainfrom
lambdai:tcplistener

Conversation

@lambdai
Copy link
Copy Markdown
Contributor

@lambdai lambdai commented Mar 18, 2021

Commit Message:
Move active_tcp_listener out of conn handler.
Similar to #15349 but for tcp listener.
Signed-off-by: Yuchen Dai silentdai@gmail.com

Additional Description:

Risk Level: Low. Mostly just move.
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
Fixes #15126
[Optional Deprecated:]
[Optional API Considerations:]

Signed-off-by: Yuchen Dai <silentdai@gmail.com>
@lambdai lambdai marked this pull request as ready for review March 18, 2021 15:59
@lambdai
Copy link
Copy Markdown
Contributor Author

lambdai commented Mar 18, 2021

@ggreenway Could you take a look? As you suggested this is a code move with a minor change to support the move

Copy link
Copy Markdown
Member

@ggreenway ggreenway 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 overall

/wait

}
NOT_REACHED_GCOVR_EXCL_LINE;
}
// TODO(lambdai): Remove the dependency of ActiveTcpListener.
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.

@ggreenway This is the why active_tcp_listener.h is required at this PR.
The next PR will erase the dependency.

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.

That's fine, but the way to pull that in is via deps, not hdrs. I don't see a good reason to do it via hdrs, even temporarily.

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.

There was a circle dependency if I don't use hdrs :(

Active_tcp_listener target depends on connection_handler_impl target: require ConnectionImplHandler:ActiveListenerImplBase in connection_handler_impl.h.

I can add the active_tcp_listener_header target to avoid this hdrs issue, like below. Hold on

active_tcp_listener_header: connection_handler_impl.h, active_tcp_listener.h
connection_handler_impl : connection_handler_impl.cc, active_tcp_listener_header
active_tcp_listener : active_tcp_listener.cc, active_tcp_listener_header

In active_tcp_listener.h

class ActiveTcpListener : public Network::TcpListenerCallbacks,
                          public ConnectionHandlerImpl::ActiveListenerImplBase,

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.

Oh, I see, I didn't understand that there was a circular dependency. Can you add a comment in the BUILD file explaining that, along with a TODO to fix?

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.

Add the explanation and TODO in BUILD

Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
ggreenway
ggreenway previously approved these changes Mar 23, 2021
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
lambdai added 2 commits March 23, 2021 16:11
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
@lambdai
Copy link
Copy Markdown
Contributor Author

lambdai commented Mar 24, 2021

/retest

@repokitteh-read-only
Copy link
Copy Markdown

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

🐱

Caused by: a #15553 (comment) was created by @lambdai.

see: more, trace.

@lambdai
Copy link
Copy Markdown
Contributor Author

lambdai commented Mar 25, 2021

gental ping @ggreenway This PR is now passing all check

@ggreenway ggreenway merged commit fff2cf8 into envoyproxy:main Mar 25, 2021
@lambdai
Copy link
Copy Markdown
Contributor Author

lambdai commented Mar 25, 2021

Thank you!

ggreenway pushed a commit that referenced this pull request Apr 7, 2021
Follow up of #15553.
Fixes #15126

Signed-off-by: Yuchen Dai <silentdai@gmail.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.

tech debt: connection handler implementation

2 participants