Plugins: Remove plugin dependency version (#103728)

remove plugin dependency version
This commit is contained in:
Will Browne
2025-04-10 15:02:05 +01:00
committed by GitHub
parent a255ae6b0b
commit a1b792b1f5
10 changed files with 21 additions and 28 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ func (m *PluginInstaller) Add(ctx context.Context, pluginID, version string, opt
for _, dep := range archive.Dependencies {
m.log.Info(fmt.Sprintf("Fetching %s dependency %s...", pluginID, dep.ID))
err = m.Add(ctx, dep.ID, dep.Version, opts)
err = m.Add(ctx, dep.ID, "", opts)
if err != nil {
var dupeErr plugins.DuplicateError
if errors.As(err, &dupeErr) {
@@ -179,8 +179,8 @@ func TestFinder_Find(t *testing.T) {
Dependencies: plugins.Dependencies{
GrafanaVersion: "3.x.x",
Plugins: []plugins.Dependency{
{ID: "graphite", Type: "datasource", Name: "Graphite", Version: "1.0.0"},
{ID: "graph", Type: "panel", Name: "Graph", Version: "1.0.0"},
{ID: "graphite", Type: "datasource", Name: "Graphite"},
{ID: "graph", Type: "panel", Name: "Graph"},
},
Extensions: plugins.ExtensionsDependencies{
ExposedComponents: []string{},
+2 -2
View File
@@ -166,8 +166,8 @@ func TestLoader_Load(t *testing.T) {
Dependencies: plugins.Dependencies{
GrafanaVersion: "3.x.x",
Plugins: []plugins.Dependency{
{Type: "datasource", ID: "graphite", Name: "Graphite", Version: "1.0.0"},
{Type: "panel", ID: "graph", Name: "Graph", Version: "1.0.0"},
{Type: "datasource", ID: "graphite", Name: "Graphite"},
{Type: "panel", ID: "graph", Name: "Graph"},
},
Extensions: plugins.ExtensionsDependencies{
ExposedComponents: []string{},