Add AliveMonitorConfig header - #432
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
5a73ffc to
09a29cf
Compare
|
|
||
| #include "score/mw/launch_manager/configuration/config.hpp" | ||
|
|
||
| namespace score |
There was a problem hiding this comment.
I think we shall use score::mw::lifecycle::internal::alive here?
| { | ||
| std::string name; | ||
| std::optional<score::mw::launch_manager::configuration::ComponentAliveSupervision> alive_supervision; | ||
| uid_t uid{}; |
There was a problem hiding this comment.
I think it would be nice to add briefs even it they are obvious. but would need a brief to why uid is needed
| void SetUp() override | ||
| { | ||
| RecordProperty("TestType", "interface-test"); | ||
| RecordProperty("DerivationTechnique", "explorative-testing"); |
There was a problem hiding this comment.
| RecordProperty("DerivationTechnique", "explorative-testing"); | |
| RecordProperty("DerivationTechnique", "boundary-values"); |
There was a problem hiding this comment.
I think moving this to config component would make more sense. Could be confusing trying to find a config type in alive_moniotr
| @@ -32,7 +31,9 @@ AliveMonitorImpl::AliveMonitorImpl( | |||
| SptrIRecoveryClient recovery_client, | |||
| UptrIProcessStateReceiver process_state_receiver, | |||
There was a problem hiding this comment.
Think it should be && so that it is clear we are invalidating the users var
| if (isSupervisedType(comp.component_properties.application_profile.application_type)) | ||
| { | ||
| SupervisedComponentConfig info{}; | ||
| info.name = comp.name; |
There was a problem hiding this comment.
I think the name of the component will always be alive for the lifetime of the alive supervision so we can use std::string_view here and remove a string copy.
There was a problem hiding this comment.
See Description
"Adds temporary functionality required to copy configuration data until we can, as part of our refactoring efforts, move the configuration data to the entities intended for that purpose."
The copy is intentional. We need to copy because the object referenced will be moved in a later PR to the ProcessInfoNode.
| } | ||
|
|
||
| bool PhmDaemon::construct(const Config& config, const SupervisionBufferConfig& f_bufferConfig_r) noexcept(false) | ||
| bool PhmDaemon::construct(const AliveMonitorConfig& config, const SupervisionBufferConfig& f_bufferConfig_r) noexcept( |
There was a problem hiding this comment.
Do you think we could further break down the config?
It seems PhmDaemon only requires the evaluation cycle, so I think we could take as && param and move it here, then somehow move the vector of config into FlatCfgFactory.
Adds temporary functionality required to copy configuration data until we can, as part of our refactoring efforts, move the configuration data to the entities intended for that purpose.