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

agent,manager,node: define our own plugin ifaces #3171

Merged
merged 1 commit into from Feb 26, 2024

Conversation

corhere
Copy link
Contributor

@corhere corhere commented Feb 23, 2024

- What I did
Allow Moby plugins to be used without Swarmkit having to import github.com/docker/docker packages by defining our own interfaces which cover the subset of functionality we use. Adapters will have to be written on the Moby side as their API contains methods which return concrete struct types, but they only need to be trivial wrappers as their *plugins.Client satisfies our plugin.Client interface.

The manager/allocator/cnmallocator package was not modified and continues to import the plugin types defined in github.com/docker/docker. It also imports many other packages under github.com/docker/docker. The package will be moved out of Swarmkit into github.com/docker/docker as the final step of dropping our dependency on docker/docker.

- How I did it

- How to test it

- Description for the changelog

  • The type of (node.Config).PluginGetter is now an interface defined in the swarmkit module which "github.com/docker/docker/plugin".Store does not satisfy. Adapter types may be required.

Allow Moby plugins to be used without Swarmkit having to import
github.com/docker/docker packages by defining our own interfaces which
cover the subset of functionality we use. Adapters will have to be
written on the Moby side as their API contains methods which return
concrete struct types, but they only need to be trivial wrappers as
their *plugins.Client satisfies our plugin.Client interface.

Signed-off-by: Cory Snider <csnider@mirantis.com>
@codecov-commenter
Copy link

codecov-commenter commented Feb 23, 2024

Codecov Report

Merging #3171 (efe0427) into master (4b261ae) will increase coverage by 0.01%.
The diff coverage is 61.11%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3171      +/-   ##
==========================================
+ Coverage   55.74%   55.75%   +0.01%     
==========================================
  Files         158      158              
  Lines       33196    33196              
==========================================
+ Hits        18506    18510       +4     
+ Misses      13228    13225       -3     
+ Partials     1462     1461       -1     

@dperny dperny merged commit df1e661 into moby:master Feb 26, 2024
8 checks passed
@corhere corhere deleted the plugin-interface branch February 26, 2024 19:00
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.

None yet

3 participants