From 59a736f56b69f9b8f145f753845621a340216867 Mon Sep 17 00:00:00 2001 From: andreas-unleash Date: Wed, 7 Feb 2024 16:35:14 +0200 Subject: [PATCH] chore: add inMemoryScheduledChangeRequests flag (#6151) What it says on the box Closes # [1-2030](https://linear.app/unleash/issue/1-2030/create-inmemoryscheduledchangerequests-flag) --------- Signed-off-by: andreas-unleash --- src/lib/__snapshots__/create-config.test.ts.snap | 1 + src/lib/types/experimental.ts | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/lib/__snapshots__/create-config.test.ts.snap b/src/lib/__snapshots__/create-config.test.ts.snap index 89649da493..328c45fee9 100644 --- a/src/lib/__snapshots__/create-config.test.ts.snap +++ b/src/lib/__snapshots__/create-config.test.ts.snap @@ -114,6 +114,7 @@ exports[`should create default config 1`] = ` }, "filterInvalidClientMetrics": false, "googleAuthEnabled": false, + "inMemoryScheduledChangeRequests": false, "incomingWebhooks": false, "increaseUnleashWidth": false, "maintenanceMode": false, diff --git a/src/lib/types/experimental.ts b/src/lib/types/experimental.ts index 5a41817d20..60247db978 100644 --- a/src/lib/types/experimental.ts +++ b/src/lib/types/experimental.ts @@ -47,6 +47,7 @@ export type IFlagKey = | 'feedbackComments' | 'createdByUserIdDataMigration' | 'showInactiveUsers' + | 'inMemoryScheduledChangeRequests' | 'useMemoizedActiveTokens'; export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>; @@ -232,6 +233,10 @@ const flags: IFlags = { process.env.UNLEASH_EXPERIMENTAL_MEMOIZED_ACTIVE_TOKENS, false, ), + inMemoryScheduledChangeRequests: parseEnvVarBoolean( + process.env.UNLEASH_EXPERIMENTAL_IN_MEMORY_SCHEDULED_CHANGE_REQUESTS, + false, + ), }; export const defaultExperimentalOptions: IExperimentalOptions = {