mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Plugins: Remove bundled plugins feature (#96490)
* remove bundled plugins * Add echo to command Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com> * remove folder entirely * remove folder from CODEOWNERS --------- Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
This commit is contained in:
parent
ff032a61d5
commit
70fb7b9545
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
@ -422,8 +422,6 @@
|
||||
/packages/grafana-ui/src/graveyard/TimeSeries/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/utils/storybook/ @grafana/plugins-platform-frontend
|
||||
|
||||
/plugins-bundled/ @grafana/plugins-platform-frontend
|
||||
|
||||
# root files, mostly frontend
|
||||
/.browserslistrc @grafana/frontend-ops
|
||||
/package.json @grafana/frontend-ops
|
||||
|
3
.github/pr-commands.json
vendored
3
.github/pr-commands.json
vendored
@ -14,7 +14,6 @@
|
||||
"public/**/*",
|
||||
"packages/**/*",
|
||||
"e2e/**/*",
|
||||
"plugins-bundled/**/*",
|
||||
"scripts/build/release-packages.sh",
|
||||
"scripts/circle-release-next-packages.sh",
|
||||
"scripts/ci-frontend-metrics.sh",
|
||||
@ -437,4 +436,4 @@
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/panel/table"
|
||||
}
|
||||
]
|
||||
]
|
||||
|
2
.github/renovate.json5
vendored
2
.github/renovate.json5
vendored
@ -19,7 +19,7 @@
|
||||
"nx"
|
||||
],
|
||||
includePaths: ["package.json", "packages/**", "public/app/plugins/**"],
|
||||
ignorePaths: ["emails/**", "plugins-bundled/**", "**/mocks/**"],
|
||||
ignorePaths: ["emails/**", "**/mocks/**"],
|
||||
labels: ["area/frontend", "dependencies", "no-changelog"],
|
||||
postUpdateOptions: ["yarnDedupeHighest"],
|
||||
packageRules: [
|
||||
|
@ -16,7 +16,6 @@ WORKDIR /tmp/grafana
|
||||
COPY package.json project.json nx.json yarn.lock .yarnrc.yml ./
|
||||
COPY .yarn .yarn
|
||||
COPY packages packages
|
||||
COPY plugins-bundled plugins-bundled
|
||||
COPY public public
|
||||
COPY LICENSE ./
|
||||
COPY conf/defaults.ini ./conf/defaults.ini
|
||||
|
1
Makefile
1
Makefile
@ -211,7 +211,6 @@ build-cli: ## Build Grafana CLI application.
|
||||
build-js: ## Build frontend assets.
|
||||
@echo "build frontend"
|
||||
yarn run build
|
||||
yarn run plugins:build-bundled
|
||||
|
||||
PLUGIN_ID ?=
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
||||
"themes-generate": "esbuild --target=es6 ./scripts/cli/generateSassVariableFiles.ts --bundle --platform=node --tsconfig=./scripts/cli/tsconfig.json | node",
|
||||
"themes:usage": "eslint . --ignore-pattern '*.test.ts*' --ignore-pattern '*.spec.ts*' --cache --plugin '@grafana' --rule '{ @grafana/theme-token-usage: \"error\" }'",
|
||||
"typecheck": "tsc --noEmit && yarn run packages:typecheck",
|
||||
"plugins:build-bundled": "find plugins-bundled -name package.json -not -path '*/node_modules/*' -execdir yarn build \\;",
|
||||
"plugins:build-bundled": "echo 'bundled plugins are no longer supported'",
|
||||
"watch": "yarn start -d watch,start core:start --watchTheme",
|
||||
"ci:test-frontend": "yarn run test:ci",
|
||||
"i18n:stats": "node ./scripts/cli/reportI18nStats.mjs",
|
||||
@ -437,7 +437,6 @@
|
||||
"packages": [
|
||||
"packages/*",
|
||||
"packages/!(grafana-icons)/**",
|
||||
"plugins-bundled/internal/*",
|
||||
"public/app/plugins/*/*",
|
||||
"e2e/test-plugins/*"
|
||||
]
|
||||
|
@ -95,7 +95,7 @@ func (m *PluginInstaller) install(ctx context.Context, pluginID, version string,
|
||||
return nil, err
|
||||
}
|
||||
if plugin, exists := m.plugin(ctx, pluginID, version); exists {
|
||||
if plugin.IsCorePlugin() || plugin.IsBundledPlugin() {
|
||||
if plugin.IsCorePlugin() {
|
||||
return nil, plugins.ErrInstallCorePlugin
|
||||
}
|
||||
|
||||
@ -194,7 +194,7 @@ func (m *PluginInstaller) Remove(ctx context.Context, pluginID, version string)
|
||||
return plugins.ErrPluginNotInstalled
|
||||
}
|
||||
|
||||
if plugin.IsCorePlugin() || plugin.IsBundledPlugin() {
|
||||
if plugin.IsCorePlugin() {
|
||||
return plugins.ErrUninstallCorePlugin
|
||||
}
|
||||
|
||||
|
@ -212,37 +212,28 @@ func TestPluginManager_Add_Remove(t *testing.T) {
|
||||
})
|
||||
})
|
||||
|
||||
t.Run("Can't update core or bundled plugin", func(t *testing.T) {
|
||||
tcs := []struct {
|
||||
class plugins.Class
|
||||
}{
|
||||
{class: plugins.ClassCore},
|
||||
{class: plugins.ClassBundled},
|
||||
t.Run("Can't update core plugin", func(t *testing.T) {
|
||||
p := createPlugin(t, testPluginID, plugins.ClassCore, true, true, func(plugin *plugins.Plugin) {
|
||||
plugin.Info.Version = "1.0.0"
|
||||
})
|
||||
|
||||
reg := &fakes.FakePluginRegistry{
|
||||
Store: map[string]*plugins.Plugin{
|
||||
testPluginID: p,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range tcs {
|
||||
p := createPlugin(t, testPluginID, tc.class, true, true, func(plugin *plugins.Plugin) {
|
||||
plugin.Info.Version = "1.0.0"
|
||||
})
|
||||
pm := New(reg, &fakes.FakeLoader{}, &fakes.FakePluginRepo{}, &fakes.FakePluginStorage{}, storage.SimpleDirNameGeneratorFunc, &fakes.FakeAuthService{})
|
||||
err := pm.Add(context.Background(), p.ID, "3.2.0", testCompatOpts())
|
||||
require.ErrorIs(t, err, plugins.ErrInstallCorePlugin)
|
||||
|
||||
reg := &fakes.FakePluginRegistry{
|
||||
Store: map[string]*plugins.Plugin{
|
||||
testPluginID: p,
|
||||
},
|
||||
}
|
||||
err = pm.Add(context.Background(), testPluginID, "", testCompatOpts())
|
||||
require.Equal(t, plugins.ErrInstallCorePlugin, err)
|
||||
|
||||
pm := New(reg, &fakes.FakeLoader{}, &fakes.FakePluginRepo{}, &fakes.FakePluginStorage{}, storage.SimpleDirNameGeneratorFunc, &fakes.FakeAuthService{})
|
||||
err := pm.Add(context.Background(), p.ID, "3.2.0", testCompatOpts())
|
||||
require.ErrorIs(t, err, plugins.ErrInstallCorePlugin)
|
||||
|
||||
err = pm.Add(context.Background(), testPluginID, "", testCompatOpts())
|
||||
require.Equal(t, plugins.ErrInstallCorePlugin, err)
|
||||
|
||||
t.Run(fmt.Sprintf("Can't uninstall %s plugin", tc.class), func(t *testing.T) {
|
||||
err = pm.Remove(context.Background(), p.ID, p.Info.Version)
|
||||
require.Equal(t, plugins.ErrUninstallCorePlugin, err)
|
||||
})
|
||||
}
|
||||
t.Run("Can't uninstall core plugin", func(t *testing.T) {
|
||||
err = pm.Remove(context.Background(), p.ID, p.Info.Version)
|
||||
require.Equal(t, plugins.ErrUninstallCorePlugin, err)
|
||||
})
|
||||
})
|
||||
|
||||
t.Run("Can install multiple dependency levels", func(t *testing.T) {
|
||||
|
@ -124,56 +124,6 @@ func TestLoader_Load(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Load a Bundled plugin",
|
||||
class: plugins.ClassBundled,
|
||||
cfg: &config.PluginManagementCfg{},
|
||||
pluginPaths: []string{"../testdata/valid-v2-signature"},
|
||||
want: []*plugins.Plugin{
|
||||
{
|
||||
JSONData: plugins.JSONData{
|
||||
ID: "test-datasource",
|
||||
Type: plugins.TypeDataSource,
|
||||
Name: "Test",
|
||||
Info: plugins.Info{
|
||||
Author: plugins.InfoLink{
|
||||
Name: "Will Browne",
|
||||
URL: "https://willbrowne.com",
|
||||
},
|
||||
Version: "1.0.0",
|
||||
Logos: plugins.Logos{
|
||||
Small: "public/img/icn-datasource.svg",
|
||||
Large: "public/img/icn-datasource.svg",
|
||||
},
|
||||
Description: "Test",
|
||||
},
|
||||
Dependencies: plugins.Dependencies{
|
||||
GrafanaVersion: "*",
|
||||
Plugins: []plugins.Dependency{},
|
||||
Extensions: plugins.ExtensionsDependencies{
|
||||
ExposedComponents: []string{},
|
||||
},
|
||||
},
|
||||
Extensions: plugins.Extensions{
|
||||
AddedLinks: []plugins.AddedLink{},
|
||||
AddedComponents: []plugins.AddedComponent{},
|
||||
ExposedComponents: []plugins.ExposedComponent{},
|
||||
ExtensionPoints: []plugins.ExtensionPoint{},
|
||||
},
|
||||
Executable: "test",
|
||||
Backend: true,
|
||||
State: "alpha",
|
||||
},
|
||||
Module: "public/plugins/test-datasource/module.js",
|
||||
BaseURL: "public/plugins/test-datasource",
|
||||
FS: mustNewStaticFSForTests(t, filepath.Join(parentDir, "testdata/valid-v2-signature/plugin/")),
|
||||
Signature: "valid",
|
||||
SignatureType: plugins.SignatureTypeGrafana,
|
||||
SignatureOrg: "Grafana Labs",
|
||||
Class: plugins.ClassBundled,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Load plugin with symbolic links",
|
||||
class: plugins.ClassExternal,
|
||||
|
@ -49,7 +49,7 @@ func (s *Validation) ValidateSignature(plugin *plugins.Plugin) error {
|
||||
}
|
||||
}
|
||||
|
||||
if plugin.IsCorePlugin() || plugin.IsBundledPlugin() {
|
||||
if plugin.IsCorePlugin() {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,6 @@ func ProvideService(cfg *setting.Cfg) *Service {
|
||||
func (s *Service) List(_ context.Context) []plugins.PluginSource {
|
||||
r := []plugins.PluginSource{
|
||||
NewLocalSource(plugins.ClassCore, corePluginPaths(s.cfg.StaticRootPath)),
|
||||
NewLocalSource(plugins.ClassBundled, []string{s.cfg.BundledPluginsPath}),
|
||||
}
|
||||
r = append(r, s.externalPluginSources()...)
|
||||
r = append(r, s.pluginSettingSources()...)
|
||||
|
@ -17,9 +17,8 @@ func TestSources_List(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
|
||||
cfg := &setting.Cfg{
|
||||
StaticRootPath: testdata,
|
||||
PluginsPath: filepath.Join(testdata, "pluginRootWithDist"),
|
||||
BundledPluginsPath: filepath.Join(testdata, "unsigned-panel"),
|
||||
StaticRootPath: testdata,
|
||||
PluginsPath: filepath.Join(testdata, "pluginRootWithDist"),
|
||||
PluginSettings: setting.PluginSettings{
|
||||
"foo": map[string]string{
|
||||
"path": filepath.Join(testdata, "test-app"),
|
||||
@ -35,7 +34,7 @@ func TestSources_List(t *testing.T) {
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
require.Len(t, srcs, 6)
|
||||
require.Len(t, srcs, 5)
|
||||
|
||||
require.Equal(t, srcs[0].PluginClass(ctx), plugins.ClassCore)
|
||||
require.Equal(t, srcs[0].PluginURIs(ctx), []string{
|
||||
@ -48,15 +47,17 @@ func TestSources_List(t *testing.T) {
|
||||
require.Equal(t, plugins.SignatureType(""), sig.Type)
|
||||
require.Equal(t, "", sig.SigningOrg)
|
||||
|
||||
require.Equal(t, srcs[1].PluginClass(ctx), plugins.ClassBundled)
|
||||
require.Equal(t, srcs[1].PluginURIs(ctx), []string{filepath.Join(testdata, "unsigned-panel")})
|
||||
require.Equal(t, srcs[1].PluginClass(ctx), plugins.ClassExternal)
|
||||
require.Equal(t, srcs[1].PluginURIs(ctx), []string{
|
||||
filepath.Join(testdata, "pluginRootWithDist", "datasource"),
|
||||
})
|
||||
sig, exists = srcs[1].DefaultSignature(ctx)
|
||||
require.False(t, exists)
|
||||
require.Equal(t, plugins.Signature{}, sig)
|
||||
|
||||
require.Equal(t, srcs[2].PluginClass(ctx), plugins.ClassExternal)
|
||||
require.Equal(t, srcs[2].PluginURIs(ctx), []string{
|
||||
filepath.Join(testdata, "pluginRootWithDist", "datasource"),
|
||||
filepath.Join(testdata, "pluginRootWithDist", "dist"),
|
||||
})
|
||||
sig, exists = srcs[2].DefaultSignature(ctx)
|
||||
require.False(t, exists)
|
||||
@ -64,17 +65,9 @@ func TestSources_List(t *testing.T) {
|
||||
|
||||
require.Equal(t, srcs[3].PluginClass(ctx), plugins.ClassExternal)
|
||||
require.Equal(t, srcs[3].PluginURIs(ctx), []string{
|
||||
filepath.Join(testdata, "pluginRootWithDist", "dist"),
|
||||
})
|
||||
sig, exists = srcs[3].DefaultSignature(ctx)
|
||||
require.False(t, exists)
|
||||
require.Equal(t, plugins.Signature{}, sig)
|
||||
|
||||
require.Equal(t, srcs[4].PluginClass(ctx), plugins.ClassExternal)
|
||||
require.Equal(t, srcs[4].PluginURIs(ctx), []string{
|
||||
filepath.Join(testdata, "pluginRootWithDist", "panel"),
|
||||
})
|
||||
sig, exists = srcs[4].DefaultSignature(ctx)
|
||||
sig, exists = srcs[3].DefaultSignature(ctx)
|
||||
require.False(t, exists)
|
||||
require.Equal(t, plugins.Signature{}, sig)
|
||||
})
|
||||
@ -84,9 +77,8 @@ func TestSources_List(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
|
||||
cfg := &setting.Cfg{
|
||||
StaticRootPath: testdata,
|
||||
PluginsPath: filepath.Join(testdata, "symbolic-plugin-dirs"),
|
||||
BundledPluginsPath: filepath.Join(testdata, "unsigned-panel"),
|
||||
StaticRootPath: testdata,
|
||||
PluginsPath: filepath.Join(testdata, "symbolic-plugin-dirs"),
|
||||
}
|
||||
s := ProvideService(cfg)
|
||||
ctx := context.Background()
|
||||
@ -107,10 +99,6 @@ func TestSources_List(t *testing.T) {
|
||||
filepath.Join(testdata, "app", "plugins", "panel"): {},
|
||||
}, "should include core plugins")
|
||||
|
||||
require.Equal(t, uris[plugins.ClassBundled], map[string]struct{}{
|
||||
filepath.Join(testdata, "unsigned-panel"): {},
|
||||
}, "should include bundle plugin")
|
||||
|
||||
require.Equal(t, uris[plugins.ClassExternal], map[string]struct{}{
|
||||
filepath.Join(testdata, "symbolic-plugin-dirs", "plugin"): {},
|
||||
}, "should include external symlinked plugin")
|
||||
|
@ -494,19 +494,14 @@ func (p *Plugin) IsCorePlugin() bool {
|
||||
return p.Class == ClassCore
|
||||
}
|
||||
|
||||
func (p *Plugin) IsBundledPlugin() bool {
|
||||
return p.Class == ClassBundled
|
||||
}
|
||||
|
||||
func (p *Plugin) IsExternalPlugin() bool {
|
||||
return !p.IsCorePlugin() && !p.IsBundledPlugin()
|
||||
return !p.IsCorePlugin()
|
||||
}
|
||||
|
||||
type Class string
|
||||
|
||||
const (
|
||||
ClassCore Class = "core"
|
||||
ClassBundled Class = "bundled"
|
||||
ClassExternal Class = "external"
|
||||
ClassCDN Class = "cdn"
|
||||
)
|
||||
|
@ -124,56 +124,6 @@ func TestLoader_Load(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Load a Bundled plugin",
|
||||
class: plugins.ClassBundled,
|
||||
cfg: &config.PluginManagementCfg{},
|
||||
pluginPaths: []string{filepath.Join(testDataDir(t), "valid-v2-signature")},
|
||||
want: []*plugins.Plugin{
|
||||
{
|
||||
JSONData: plugins.JSONData{
|
||||
ID: "test-datasource",
|
||||
Type: plugins.TypeDataSource,
|
||||
Name: "Test",
|
||||
Info: plugins.Info{
|
||||
Author: plugins.InfoLink{
|
||||
Name: "Will Browne",
|
||||
URL: "https://willbrowne.com",
|
||||
},
|
||||
Version: "1.0.0",
|
||||
Logos: plugins.Logos{
|
||||
Small: "public/img/icn-datasource.svg",
|
||||
Large: "public/img/icn-datasource.svg",
|
||||
},
|
||||
Description: "Test",
|
||||
},
|
||||
Dependencies: plugins.Dependencies{
|
||||
GrafanaVersion: "*",
|
||||
Plugins: []plugins.Dependency{},
|
||||
Extensions: plugins.ExtensionsDependencies{
|
||||
ExposedComponents: []string{},
|
||||
},
|
||||
},
|
||||
Extensions: plugins.Extensions{
|
||||
AddedLinks: []plugins.AddedLink{},
|
||||
AddedComponents: []plugins.AddedComponent{},
|
||||
ExposedComponents: []plugins.ExposedComponent{},
|
||||
ExtensionPoints: []plugins.ExtensionPoint{},
|
||||
},
|
||||
Executable: "test",
|
||||
Backend: true,
|
||||
State: "alpha",
|
||||
},
|
||||
Module: "public/plugins/test-datasource/module.js",
|
||||
BaseURL: "public/plugins/test-datasource",
|
||||
FS: mustNewStaticFSForTests(t, filepath.Join(testDataDir(t), "valid-v2-signature/plugin/")),
|
||||
Signature: "valid",
|
||||
SignatureType: plugins.SignatureTypeGrafana,
|
||||
SignatureOrg: "Grafana Labs",
|
||||
Class: plugins.ClassBundled,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Load plugin with symbolic links",
|
||||
class: plugins.ClassExternal,
|
||||
@ -672,7 +622,7 @@ func TestLoader_Load_CustomSource(t *testing.T) {
|
||||
},
|
||||
},
|
||||
FS: mustNewStaticFSForTests(t, filepath.Join(testDataDir(t), "cdn/plugin")),
|
||||
Class: plugins.ClassBundled,
|
||||
Class: plugins.ClassExternal,
|
||||
Signature: plugins.SignatureStatusValid,
|
||||
BaseURL: "https://cdn.example.com/grafana-worldmap-panel/0.3.3/public/plugins/grafana-worldmap-panel",
|
||||
Module: "https://cdn.example.com/grafana-worldmap-panel/0.3.3/public/plugins/grafana-worldmap-panel/module.js",
|
||||
@ -681,7 +631,7 @@ func TestLoader_Load_CustomSource(t *testing.T) {
|
||||
l := newLoader(t, cfg, fakes.NewFakePluginRegistry(), fakes.NewFakeProcessManager(), fakes.NewFakeBackendProcessProvider(), newFakeErrorTracker())
|
||||
got, err := l.Load(context.Background(), &fakes.FakePluginSource{
|
||||
PluginClassFunc: func(ctx context.Context) plugins.Class {
|
||||
return plugins.ClassBundled
|
||||
return plugins.ClassExternal
|
||||
},
|
||||
PluginURIsFunc: func(ctx context.Context) []string {
|
||||
return pluginPaths
|
||||
@ -1170,11 +1120,6 @@ func TestLoader_AngularClass(t *testing.T) {
|
||||
class: plugins.ClassCore,
|
||||
expAngularDetectionRun: false,
|
||||
},
|
||||
{
|
||||
name: "bundled plugin should skip angular detection",
|
||||
class: plugins.ClassBundled,
|
||||
expAngularDetectionRun: false,
|
||||
},
|
||||
{
|
||||
name: "external plugin should run angular detection",
|
||||
class: plugins.ClassExternal,
|
||||
|
@ -121,9 +121,9 @@ func (r *RegisterActionSets) Register(ctx context.Context, p *plugins.Plugin) (*
|
||||
return p, nil
|
||||
}
|
||||
|
||||
// ReportBuildMetrics reports build information for all plugins, except core and bundled plugins.
|
||||
// ReportBuildMetrics reports build information for all plugins, except core plugins.
|
||||
func ReportBuildMetrics(_ context.Context, p *plugins.Plugin) (*plugins.Plugin, error) {
|
||||
if !p.IsCorePlugin() && !p.IsBundledPlugin() {
|
||||
if !p.IsCorePlugin() {
|
||||
metrics.SetPluginBuildInformation(p.ID, string(p.Type), p.Info.Version, string(p.Signature))
|
||||
}
|
||||
|
||||
|
@ -55,15 +55,11 @@ func TestIntegrationPluginManager(t *testing.T) {
|
||||
staticRootPath, err := filepath.Abs("../../../public/")
|
||||
require.NoError(t, err)
|
||||
|
||||
bundledPluginsPath, err := filepath.Abs("../../../plugins-bundled/internal")
|
||||
require.NoError(t, err)
|
||||
|
||||
features := featuremgmt.WithFeatures()
|
||||
cfg := &setting.Cfg{
|
||||
Raw: ini.Empty(),
|
||||
StaticRootPath: staticRootPath,
|
||||
BundledPluginsPath: bundledPluginsPath,
|
||||
Azure: &azsettings.AzureSettings{},
|
||||
Raw: ini.Empty(),
|
||||
StaticRootPath: staticRootPath,
|
||||
Azure: &azsettings.AzureSettings{},
|
||||
PluginSettings: map[string]map[string]string{
|
||||
"test-app": {
|
||||
"path": "../../plugins/manager/testdata/test-app",
|
||||
|
@ -27,7 +27,7 @@ func TestStore_ProvideService(t *testing.T) {
|
||||
return []plugins.PluginSource{
|
||||
&fakes.FakePluginSource{
|
||||
PluginClassFunc: func(ctx context.Context) plugins.Class {
|
||||
return plugins.ClassBundled
|
||||
return "foobar"
|
||||
},
|
||||
PluginURIsFunc: func(ctx context.Context) []string {
|
||||
return []string{"path1"}
|
||||
|
@ -165,7 +165,7 @@ func TestPluginUpdateChecker_checkForUpdates(t *testing.T) {
|
||||
Info: plugins.Info{Version: "2.5.7"},
|
||||
Type: plugins.TypePanel,
|
||||
},
|
||||
Class: plugins.ClassBundled,
|
||||
Class: plugins.ClassExternal,
|
||||
},
|
||||
{
|
||||
JSONData: plugins.JSONData{
|
||||
|
@ -134,7 +134,6 @@ type Cfg struct {
|
||||
DataPath string
|
||||
LogsPath string
|
||||
PluginsPath string
|
||||
BundledPluginsPath string
|
||||
EnterpriseLicensePath string
|
||||
|
||||
// SMTP email settings
|
||||
@ -1101,7 +1100,6 @@ func (cfg *Cfg) parseINIFile(iniFile *ini.File) error {
|
||||
cfg.InstanceName = valueAsString(iniFile.Section(""), "instance_name", "unknown_instance_name")
|
||||
plugins := valueAsString(iniFile.Section("paths"), "plugins", "")
|
||||
cfg.PluginsPath = makeAbsolute(plugins, cfg.HomePath)
|
||||
cfg.BundledPluginsPath = makeAbsolute("plugins-bundled", cfg.HomePath)
|
||||
provisioning := valueAsString(iniFile.Section("paths"), "provisioning", "")
|
||||
cfg.ProvisioningPath = makeAbsolute(provisioning, cfg.HomePath)
|
||||
|
||||
|
@ -100,7 +100,7 @@ func TestIntegrationPlugins(t *testing.T) {
|
||||
t.Run("List", func(t *testing.T) {
|
||||
testCases := []testCase{
|
||||
{
|
||||
desc: "should return all loaded core and bundled plugins",
|
||||
desc: "should return all loaded core plugins",
|
||||
url: "http://%s/api/plugins",
|
||||
expStatus: http.StatusOK,
|
||||
expRespPath: "expectedListResp.json",
|
||||
|
9
plugins-bundled/.gitignore
vendored
9
plugins-bundled/.gitignore
vendored
@ -1,9 +0,0 @@
|
||||
# packaged by toolkit
|
||||
dist
|
||||
coverage
|
||||
|
||||
# Ignore external git configs
|
||||
external
|
||||
|
||||
# this file is added automatically
|
||||
.prettierrc.js
|
@ -1,5 +0,0 @@
|
||||
# Bundled Plugins
|
||||
|
||||
Bundled plugins are built as true plugins, and managed by the grafana install.
|
||||
|
||||
TODO: the packaging system should move all `dist` items to the root and remove sources.
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"plugins": []
|
||||
}
|
Loading…
Reference in New Issue
Block a user