Skip to content

sm: launcher: implement InitInstances - #634

Merged
al1img merged 1 commit into
aosedge:developfrom
al1img:init_instances
Jul 30, 2026
Merged

sm: launcher: implement InitInstances#634
al1img merged 1 commit into
aosedge:developfrom
al1img:init_instances

Conversation

@al1img

@al1img al1img commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

At startup a runtime only knows what it is currently running, while the launcher knows the full set of instances that should exist. Each runtime must reconcile its own state against that list: stop anything not in it and properly initialize already-running instances, without starting anything new yet.

Group the stored instances by runtime and call each registered runtime's InitInstances with only the instances that belong to it. Add the corresponding InitInstances mock to RuntimeMock and cover the grouping behavior with a unit test. Grow the launcher allocator to fit the extra per-runtime instances array.

@mykola-kobets-epam mykola-kobets-epam left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-by: Mykola Kobets <mykola_kobets@epam.com>

@mlohvynenko mlohvynenko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>

@MykolaSuperman MykolaSuperman left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-by: Mykola Solianko <mykola_solianko@epam.com>

At startup a runtime only knows what it is currently running, while
the launcher knows the full set of instances that should exist. Each
runtime must reconcile its own state against that list: stop anything
not in it and properly initialize already-running instances, without
starting anything new yet.

Group the stored instances by runtime and call each registered
runtime's InitInstances with only the instances that belong to it.
Add the corresponding InitInstances mock to RuntimeMock and cover
the grouping behavior with a unit test. Grow the launcher allocator
to fit the extra per-runtime instances array.

Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
Reviewed-by: Mykola Kobets <mykola_kobets@epam.com>
Reviewed-by: Mykola Solianko <mykola_solianko@epam.com>
@sonarqubecloud

Copy link
Copy Markdown

@al1img
al1img merged commit 23a1a05 into aosedge:develop Jul 30, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants