Skip to content

LoadComposableNodes should have an option to fail/shutdown if a node fails to load #513

Description

@xaru8145

Currently, when a LoadComposableNodes launch action is executed, it calls the load_node service of a container. If the service returns success=False (e.g., due to a missing plugin, invalid parameters, or a constructor failure), the action logs an error but the launch continues:

else:
self.__logger.error(
"Failed to load node '{}' of type '{}' in container '{}': {}".format(
node_name, request.plugin_name, self.__final_target_container_name,
response.error_message
)
)

In many production cases, if a component fails to load, the entire system is in an invalid state. I would like to propose adding an optional parameter (e.g., on_failure_shutdown=True) to LoadComposableNodes that raises an exception or emits a Shutdown event if any node fails to load.

This would allow users to "fail fast" and avoid having a partially loaded system running unnoticed.

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

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions