Rendering: Stop preloading apps for rendering requests (#100221)
* Rendering: stop preloading apps * add feature toggle * add comment * add const * fix linter * rename feature toggle * delete old ff * update toggles_gen.json
This commit is contained in:
@@ -256,4 +256,5 @@ export interface FeatureToggles {
|
||||
alertingJiraIntegration?: boolean;
|
||||
alertingRuleVersionHistoryRestore?: boolean;
|
||||
newShareReportDrawer?: boolean;
|
||||
rendererDisableAppPluginsPreload?: boolean;
|
||||
}
|
||||
|
||||
@@ -1789,6 +1789,15 @@ var (
|
||||
HideFromAdminPage: true,
|
||||
HideFromDocs: true,
|
||||
},
|
||||
{
|
||||
Name: "rendererDisableAppPluginsPreload",
|
||||
Description: "Disable pre-loading app plugins when the request is coming from the renderer",
|
||||
Stage: FeatureStageExperimental,
|
||||
Owner: grafanaSharingSquad,
|
||||
HideFromAdminPage: true,
|
||||
HideFromDocs: true,
|
||||
FrontendOnly: true,
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -237,3 +237,4 @@ pluginsCDNSyncLoader,experimental,@grafana/plugins-platform-backend,false,false,
|
||||
alertingJiraIntegration,experimental,@grafana/alerting-squad,false,false,true
|
||||
alertingRuleVersionHistoryRestore,experimental,@grafana/alerting-squad,false,false,true
|
||||
newShareReportDrawer,experimental,@grafana/sharing-squad,false,false,false
|
||||
rendererDisableAppPluginsPreload,experimental,@grafana/sharing-squad,false,false,true
|
||||
|
||||
|
@@ -958,4 +958,8 @@ const (
|
||||
// FlagNewShareReportDrawer
|
||||
// Enables the report creation drawer in a dashboard
|
||||
FlagNewShareReportDrawer = "newShareReportDrawer"
|
||||
|
||||
// FlagRendererDisableAppPluginsPreload
|
||||
// Disable pre-loading app plugins when the request is coming from the renderer
|
||||
FlagRendererDisableAppPluginsPreload = "rendererDisableAppPluginsPreload"
|
||||
)
|
||||
|
||||
@@ -3593,6 +3593,21 @@
|
||||
"hideFromAdminPage": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"metadata": {
|
||||
"name": "rendererDisableAppPluginsPreload",
|
||||
"resourceVersion": "1740386710764",
|
||||
"creationTimestamp": "2025-02-24T08:45:10Z"
|
||||
},
|
||||
"spec": {
|
||||
"description": "Disable pre-loading app plugins when the request is coming from the renderer",
|
||||
"stage": "experimental",
|
||||
"codeowner": "@grafana/sharing-squad",
|
||||
"frontend": true,
|
||||
"hideFromAdminPage": true,
|
||||
"hideFromDocs": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"metadata": {
|
||||
"name": "reportingRetries",
|
||||
|
||||
+4
-1
@@ -205,7 +205,10 @@ export class GrafanaApp {
|
||||
setDataSourceSrv(dataSourceSrv);
|
||||
initWindowRuntime();
|
||||
|
||||
if (contextSrv.user.orgRole !== '') {
|
||||
// Do not pre-load apps if rendererDisableAppPluginsPreload is true and the request comes from the image renderer
|
||||
const skipAppPluginsPreload =
|
||||
config.featureToggles.rendererDisableAppPluginsPreload && contextSrv.user.authenticatedBy === 'render';
|
||||
if (contextSrv.user.orgRole !== '' && !skipAppPluginsPreload) {
|
||||
const appPluginsToAwait = getAppPluginsToAwait();
|
||||
const appPluginsToPreload = getAppPluginsToPreload();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user