Skip to content

Runtime cleanup (Shim manager and task service)#7280

Merged
fuweid merged 2 commits intocontainerd:mainfrom
mxpv:runtime
Aug 13, 2022
Merged

Runtime cleanup (Shim manager and task service)#7280
fuweid merged 2 commits intocontainerd:mainfrom
mxpv:runtime

Conversation

@mxpv
Copy link
Member

@mxpv mxpv commented Aug 12, 2022

This PR is a follow up for shim changes #5918 and addresses this todo.
It further decouples ShimManager and TaskService, so now shim manager is not aware about TaskService or any other service shim provides. Instead it manages generic shims instances, that can implement arbitrary number of services and just exposes a TTRPC client to them (via ShimInstance interface).
Previously it was challenging to make this change because of TaskList v1 dependency (v1 needs a list of Tasks while v2 needs a list of Shims). Since we updated supported Go versions (1.18, 1.19), which both support generics, we can implement multiple variations of TaskList - NSMap[runtime.Task] for v1 and NSMap[ShimInstance] for v2.

mxpv added 2 commits August 10, 2022 14:02
Signed-off-by: Maksym Pavlenko <[email protected]>
Signed-off-by: Maksym Pavlenko <[email protected]>
@dmcgowan
Copy link
Member

Thanks for generalizing the shim manager and providing a way to get access to the ttrpc client. It also seems like a suitable use for generics to me.

Copy link
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

@fuweid fuweid merged commit 6699403 into containerd:main Aug 13, 2022
@mxpv mxpv mentioned this pull request Aug 19, 2022
17 tasks
@mxpv mxpv deleted the runtime branch February 11, 2023 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants