Skip to content

Add a GetAll function that returns only managed plugins supported by V2#29665

Merged
anusha-ragunathan merged 1 commit intomoby:masterfrom
mavenugo:getall
Dec 22, 2016
Merged

Add a GetAll function that returns only managed plugins supported by V2#29665
anusha-ragunathan merged 1 commit intomoby:masterfrom
mavenugo:getall

Conversation

@mavenugo
Copy link
Copy Markdown
Contributor

The current GetAllByCap API handles both V2 and legacy plugins. Also due to the
nature of V1 plugins, it also loads them. This causes problems when
loading is not required. Hence adding an independent API that will
return only the plugins that are loaded using v2 mangaed plugins.

Based on discussions with @anusha-ragunathan, This patch is required to properly fix the IT failures in #29556.

Signed-off-by: Madhu Venugopal [email protected]

The current GetAll handles both V2 and legacy plugins. Also due to the
nature of V1 plugins, it also loads them. This causes problems when
loading is not required. Hence adding an independent API that will
return only the plugins that are loaded using v2 mangaed plugins.

Signed-off-by: Madhu Venugopal <[email protected]>
Comment thread plugin/store/store.go

// GetAllManagedPluginsByCap returns a list of managed plugins matching the given capability.
func (ps *Store) GetAllManagedPluginsByCap(capability string) []plugingetter.CompatPlugin {
return ps.getAllByCap(capability)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ps.RLock

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

getAllByCap already locks it. I dont think it is required to lock it again here.

@anusha-ragunathan
Copy link
Copy Markdown
Contributor

LGTM

@anusha-ragunathan anusha-ragunathan added this to the 1.13.0 milestone Dec 22, 2016
@anusha-ragunathan anusha-ragunathan merged commit e4512d2 into moby:master Dec 22, 2016
mavenugo added a commit to mavenugo/libnetwork that referenced this pull request Dec 22, 2016
mavenugo added a commit to mavenugo/libnetwork that referenced this pull request Dec 22, 2016
@vieux vieux mentioned this pull request Jan 3, 2017
mavenugo added a commit to mavenugo/libnetwork that referenced this pull request Jan 4, 2017
TechForce-Lyron0785 pushed a commit to TechForce-Lyron0785/libnetwork that referenced this pull request Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants