diff --git a/frontend/src/interfaces/uiConfig.ts b/frontend/src/interfaces/uiConfig.ts index d6dd7ea4ff..6a565db72a 100644 --- a/frontend/src/interfaces/uiConfig.ts +++ b/frontend/src/interfaces/uiConfig.ts @@ -86,6 +86,7 @@ export type UiFlags = { navigationSidebar?: boolean; commandBarUI?: boolean; flagCreator?: boolean; + resourceLimits?: boolean; }; export interface IVersionInfo { diff --git a/src/lib/__snapshots__/create-config.test.ts.snap b/src/lib/__snapshots__/create-config.test.ts.snap index f2bf6f3842..f0879a37a5 100644 --- a/src/lib/__snapshots__/create-config.test.ts.snap +++ b/src/lib/__snapshots__/create-config.test.ts.snap @@ -142,6 +142,7 @@ exports[`should create default config 1`] = ` "personalAccessTokensKillSwitch": false, "projectOverviewRefactorFeedback": false, "queryMissingTokens": false, + "resourceLimits": false, "responseTimeMetricsFix": false, "responseTimeWithAppNameKillSwitch": false, "scimApi": false, diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index c8652ed05e..2cd77e1604 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -61,7 +61,8 @@ export type IFlagKey = | 'navigationSidebar' | 'commandBarUI' | 'flagCreator' - | 'anonymizeProjectOwners'; + | 'anonymizeProjectOwners' + | 'resourceLimits'; export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>; @@ -294,6 +295,10 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_ANONYMIZE_PROJECT_OWNERS, false, ), + resourceLimits: parseEnvVarBoolean( + process.env.UNLEASH_EXPERIMENTAL_RESOURCE_LIMITS, + false, + ), }; export const defaultExperimentalOptions: IExperimentalOptions = { diff --git a/src/server-dev.ts b/src/server-dev.ts index 7c91d90e49..9d8638748b 100644 --- a/src/server-dev.ts +++ b/src/server-dev.ts @@ -54,6 +54,7 @@ process.nextTick(async () => { enableLegacyVariants: false, commandBarUI: true, flagCreator: true, + resourceLimits: true, }, }, authentication: {