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

plugins: Filter builtins by RunningVersion #17816

Merged
merged 5 commits into from Nov 11, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog/17816.txt
@@ -0,0 +1,3 @@
```release-note:bug
plugins: Only report deprecation status for builtin plugins.
```
7 changes: 6 additions & 1 deletion vault/mount.go
Expand Up @@ -717,8 +717,13 @@ func (c *Core) builtinTypeFromMountEntry(ctx context.Context, entry *MountEntry)
return consts.PluginTypeUnknown
}

// Builtin plugins should contain the "builtin" string in their RunningVersion
if !strings.Contains(entry.RunningVersion, "builtin") {
return consts.PluginTypeUnknown
}

builtinPluginType := func(name string, pluginType consts.PluginType) (consts.PluginType, bool) {
plugin, err := c.pluginCatalog.Get(ctx, name, pluginType, "")
plugin, err := c.pluginCatalog.Get(ctx, name, pluginType, entry.RunningVersion)
if err == nil && plugin != nil && plugin.Builtin {
return plugin.Type, true
}
Expand Down