Skip to content

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

Merged
dperny merged 1 commit intomoby:masterfrom
corhere:plugin-interface
Feb 26, 2024
Merged

agent,manager,node: define our own plugin ifaces#3171
dperny merged 1 commit intomoby:masterfrom
corhere:plugin-interface

Conversation

@corhere
Copy link
Collaborator

@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     

@jonaslb
Copy link

jonaslb commented Jul 4, 2024

Hi @corhere , I created moby/moby#48133, and just wanted to ask - you seem to write in this PR that some things will / will need to happen on the docker side to match. Did those happen yet / did they happen for 26.1 / 27.0 / will maybe come later?

@Thyran
Copy link

Thyran commented Jan 10, 2025

Are there any updates regarding this issue?

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.

5 participants