|
|
|
|
@ -11,8 +11,8 @@ import ( |
|
|
|
|
"github.com/grafana/grafana-plugin-sdk-go/backend" |
|
|
|
|
|
|
|
|
|
"github.com/grafana/grafana/pkg/infra/log" |
|
|
|
|
"github.com/grafana/grafana/pkg/plugins" |
|
|
|
|
"github.com/grafana/grafana/pkg/services/auth/identity" |
|
|
|
|
"github.com/grafana/grafana/pkg/services/pluginsintegration/plugincontext" |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
var ( |
|
|
|
|
@ -185,7 +185,7 @@ func (s *Manager) watchStream(ctx context.Context, cancelFn func(), sr streamReq |
|
|
|
|
dsUID := sr.PluginContext.DataSourceInstanceSettings.UID |
|
|
|
|
pCtx, err := s.pluginContextGetter.GetPluginContext(ctx, sr.user, sr.PluginContext.PluginID, dsUID, false) |
|
|
|
|
if err != nil { |
|
|
|
|
if errors.Is(err, plugincontext.ErrPluginNotFound) { |
|
|
|
|
if errors.Is(err, plugins.ErrPluginNotRegistered) { |
|
|
|
|
logger.Debug("Datasource not found, stop stream", "channel", sr.Channel, "path", sr.Path) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
@ -286,7 +286,7 @@ func (s *Manager) runStream(ctx context.Context, cancelFn func(), sr streamReque |
|
|
|
|
} |
|
|
|
|
newPluginCtx, err := s.pluginContextGetter.GetPluginContext(ctx, sr.user, pluginCtx.PluginID, datasourceUID, false) |
|
|
|
|
if err != nil { |
|
|
|
|
if errors.Is(err, plugincontext.ErrPluginNotFound) { |
|
|
|
|
if errors.Is(err, plugins.ErrPluginNotRegistered) { |
|
|
|
|
logger.Info("No plugin context found, stopping stream", "path", sr.Path) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
@ -410,7 +410,7 @@ func (s *Manager) SubmitStream(ctx context.Context, user identity.Requester, cha |
|
|
|
|
} |
|
|
|
|
newPluginCtx, err := s.pluginContextGetter.GetPluginContext(ctx, user, pCtx.PluginID, datasourceUID, false) |
|
|
|
|
if err != nil { |
|
|
|
|
if errors.Is(err, plugincontext.ErrPluginNotFound) { |
|
|
|
|
if errors.Is(err, plugins.ErrPluginNotRegistered) { |
|
|
|
|
return nil, errDatasourceNotFound |
|
|
|
|
} |
|
|
|
|
return nil, err |
|
|
|
|
|