server: Introduce ServerFactoryContext#8485
Conversation
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
|
Not fixing all the tests yet. Will resume tomorrow |
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
|
/assign @htuch |
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
|
clang_tidy passed! |
|
Also CC @mattklein123 as in the #8303 |
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
|
Chatted with @htuch The plan is to
|
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
|
/retest |
|
🔨 rebuilding |
|
/retest |
|
🤷♀️ nothing to rebuild. |
|
It's probably flaky test since I couldn't reproduce |
mattklein123
left a comment
There was a problem hiding this comment.
Thanks, nice change. Some small nits and will defer to @htuch for further review.
| Stats::Scope& scope() override { return *server_scope_; } | ||
| Singleton::Manager& singletonManager() override { return server_.singletonManager(); } | ||
| ThreadLocal::Instance& threadLocal() override { return server_.threadLocal(); } | ||
| // TODO(lambdai): remove messageValidationVisitor from ServerFactoryContext |
There was a problem hiding this comment.
Can this just be done as part of this change?
There was a problem hiding this comment.
Please allow me to address it in a follow up PR
There was a problem hiding this comment.
OK, but this really should be removed in some PR in this space, as it's a problematic pattern, we now have multiple validation visitor accessors apparent in the per-route filter factory method.
|
@mattklein123 Thanks! |
|
Oops. I am resolving the conflict |
Signed-off-by: Yuchen Dai <silentdai@gmail.com>
|
@mattklein123 |
|
@mattklein123 I think the failed envoy-macos is pure test infra failure. Is it good to merge? If not, should i merge master and retrigger the tests? Thanks! |
|
@mattklein123 Thank you for the update! |
htuch
left a comment
There was a problem hiding this comment.
Thanks, nice correctness improvement!
| Stats::Scope& scope() override { return *server_scope_; } | ||
| Singleton::Manager& singletonManager() override { return server_.singletonManager(); } | ||
| ThreadLocal::Instance& threadLocal() override { return server_.threadLocal(); } | ||
| // TODO(lambdai): remove messageValidationVisitor from ServerFactoryContext |
There was a problem hiding this comment.
OK, but this really should be removed in some PR in this space, as it's a problematic pattern, we now have multiple validation visitor accessors apparent in the per-route filter factory method.
Description:
Introduce ServerFactoryContext which is an implementation of CommonFactoryContext. Comparing to ListenerFactoryContext, ServerFactoryContext has a wider lifetime.
This is the prerequisite to share rds configuration among listeners.
Also experimenting move messageValidateVisitor out of CommonFactoryContext. The benefit is that now Server::Instance perfectly implements CommonFactoryContext.
messageValidateVisitorintoFactoryContext: this piece of work will be done in follow up PRNotes to reviewers:
clang-tidy error is not introduced in this PR. Create #8509 to trackWill fix once this PR is mergedThis PR is extracted from #8454
Risk Level:
Testing:
Docs Changes:
Release Notes:
Fixes #8303