agent,manager,node: define our own plugin ifaces#3171
Merged
dperny merged 1 commit intomoby:masterfrom Feb 26, 2024
Merged
Conversation
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>
8b6bbc1 to
efe0427
Compare
Codecov Report
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 |
|
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? |
This was referenced Oct 17, 2024
|
Are there any updates regarding this issue? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- 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.Clientsatisfies ourplugin.Clientinterface.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
(node.Config).PluginGetteris now an interface defined in the swarmkit module which"github.com/docker/docker/plugin".Storedoes not satisfy. Adapter types may be required.