Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime cleanup (Shim manager and task service) #7280

Merged
merged 2 commits into from Aug 13, 2022
Merged

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.

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
@dmcgowan dmcgowan added this to New in Code Review via automation Aug 12, 2022
@dmcgowan dmcgowan moved this from New to Ready For Review in Code Review Aug 12, 2022
@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
Code Review automation moved this from Ready For Review to Done 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
Development

Successfully merging this pull request may close these issues.

None yet

3 participants