Skip to content

Make Native or Reporting process transparent to component implementation. #602

Description

@MaciejKaszynski

What

Probably needs #601 to be complete first.

Currently there are some ways that component implementation (process info node) has to check the application type. To basically implicitly support the ProcessState ready condition:

score::cpp::expected_blank<IComponent::ComponentError> ProcessInfoNode::handleProcessStillStarting(
const score::cpp::stop_token& stop_token)
{
const bool is_native =
config_.component_properties.application_profile.application_type == configuration::ApplicationType::Native;
const bool startup_condition_met = std::visit(
[this, is_native, &stop_token](auto&& arg) -> bool {
using T = std::decay_t<decltype(arg)>;
if constexpr (std::is_same_v<T, configuration::ProcessState>)
{
if (is_native)
{
// A native process does not report kRunning, so its exit code is the only readiness indication.
return exit_code_ == 0;
}

Instead the config should (if not already defined) could add a ready condition for ProcessState::Running
and the component implementation evaluate this separately.

  • Remove application_types in process_info_node
  • Make configuration loading

Acceptance Criteria (DoD)

  • Make Native or Reporting process transparent to component implementation.

How

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions