-
Notifications
You must be signed in to change notification settings - Fork 1
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
TH2-4267 split common #232
base: master
Are you sure you want to change the base?
Conversation
@@ -38,6 +38,7 @@ ext { | |||
|
|||
repositories { | |||
mavenCentral() | |||
mavenLocal() |
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.
Should be the last repo in the list
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.
I don't agree. I think it will be first or won't be because if you build project via clean build pTML
gradle publishes artifact as release.
If we want to write mavenLocal() in the build.gradle script it should be first otherwise we shouldn't be specified
src/main/kotlin/com/exactpro/th2/common/module/provider/FileConfigurationProviderFactory.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/exactpro/th2/common/schema/configuration/ConfigurationManager.kt
Outdated
Show resolved
Hide resolved
src/main/java/com/exactpro/th2/common/module/FileConfigurationProviderFactoryShim.java
Outdated
Show resolved
Hide resolved
src/main/java/com/exactpro/th2/common/schema/factory/CommonFactory.java
Outdated
Show resolved
Hide resolved
src/main/java/com/exactpro/th2/common/schema/factory/CommonFactory.java
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/exactpro/th2/common/module/provider/FileConfigurationProviderFactory.kt
Show resolved
Hide resolved
src/main/kotlin/com/exactpro/th2/common/module/provider/FileConfigurationProviderFactory.kt
Show resolved
Hide resolved
ServiceLoader.load(ModuleFactory::class.java).forEach { moduleFactory -> | ||
modulesFactoryMapping[moduleFactory.moduleType] = moduleFactory | ||
} |
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.
Why modules are in the configuration manager? Shouldn't they be in the factory?
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.
This class has already cached configurations, so I think it's better to put all caching in one place
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.
Maybe move this cache into an abstract part of ConfigurationProvider CommonFactory to avoid new entities
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.
After discussion with @Xanclry we have decided to rename ConfigurationManager to ModuleManager
|
||
+ Dynamic structure of common | ||
+ Extracted common/cassandra to separate module | ||
+ Implemented api for dynamic loading of modules and configurations |
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.
+ Implemented api for dynamic loading of modules and configurations | |
+ Implemented the API for dynamic loading of modules and configurations |
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.
Also we should describe module API and how it works in a real project
src/main/java/com/exactpro/th2/common/schema/factory/AbstractCommonFactory.java
Show resolved
Hide resolved
src/main/java/com/exactpro/th2/common/schema/factory/AbstractCommonFactory.java
Show resolved
Hide resolved
@Parameter(names = ["-c", "--configs"]) | ||
lateinit var config: String | ||
|
||
@Parameter(names = ["--rabbitConfiguration"]) | ||
lateinit var rabbitConfiguration: String | ||
|
||
@Parameter(names = ["--messageRouterConfiguration"]) | ||
lateinit var messageRouterConfiguration: String | ||
|
||
@Parameter(names = ["--grpcRouterConfiguration"]) | ||
lateinit var grpcRouterConfiguration: String | ||
|
||
@Parameter(names = ["--grpcConfiguration"]) | ||
lateinit var grpcConfiguration: String | ||
|
||
@Parameter(names = ["--grpcRouterConfig"]) | ||
lateinit var grpcRouterConfig: String | ||
|
||
@Parameter(names = ["--customConfiguration"]) | ||
lateinit var customConfiguration: String | ||
|
||
@Parameter(names = ["--dictionariesDir"]) | ||
lateinit var dictionariesDir: String | ||
|
||
@Parameter(names = ["--prometheusConfiguration"]) | ||
lateinit var prometheusConfiguration: String | ||
|
||
@Parameter(names = ["--boxConfiguration"]) | ||
lateinit var boxConfiguration: String |
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.
Remove these properties, please use hard coded names for them
src/main/kotlin/com/exactpro/th2/common/module/provider/FileConfigurationProvider.kt
Show resolved
Hide resolved
ServiceLoader.load(ModuleFactory::class.java).forEach { moduleFactory -> | ||
modulesFactoryMapping[moduleFactory.moduleType] = moduleFactory | ||
} |
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.
Maybe move this cache into an abstract part of ConfigurationProvider CommonFactory to avoid new entities
No description provided.