-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support singleton input #1933
base: main
Are you sure you want to change the base?
Conversation
Abingcbc
commented
Nov 28, 2024
•
edited
Loading
edited
- 加载流水线时,对只能存在一个实例的input进行限制
- 对加载的配置顺序进行排序,保证先创建的配置,先加载流水线
c99d876
to
5c0d9c8
Compare
@@ -80,6 +80,22 @@ bool IsConfigEnabled(const string& name, const Json::Value& detail) { | |||
return true; | |||
} | |||
|
|||
void GetAllInputTypes(const Json::Value& detail, std::vector<string>& inputTypes) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没调用点?
{ | ||
"inputs": [ | ||
{ | ||
"Type": "input_network_observer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
多input的行为是什么,也需要有用例覆盖
@@ -238,10 +241,10 @@ bool PipelineConfig::Parse() { | |||
} | |||
} | |||
// TODO: remove these special restrictions | |||
if (hasFileInput && (*mDetail)["inputs"].size() > 1) { | |||
if ((hasFileInput || !mSingletonInput.empty()) && (*mDetail)["inputs"].size() > 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感觉还是把判断放上面吧。因为文件这个限制肯定是要去掉的。
可以跟笃敏再确认下
private: | ||
}; | ||
|
||
void PipelineConfigWatcherUnittest::TestPushPipelineConfig() const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要给下测试用例设计,一些边界的组合需要考虑全面
"skip current object")("config", config.mName)("inputType", config.mSingletonInput)); | ||
return; | ||
} | ||
if (mPipelineManager->FindConfigByName(it->second->config.mName)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如交流生效的处理有问题