1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

task: upgrade edge banner now toggleable by flag (#6363)

So, since our assumption about client instances ended up being wrong (or, less than stable).
This PR moves the EdgeUpgradeBanner to be displayed if the featureflag
displayEdgeBanner is enabled. That way, if customers comes back and says
they have upgraded but still get the banner, we can remove them from the
segment.
This commit is contained in:
Christopher Kolstad 2024-02-28 14:06:46 +01:00 committed by GitHub
parent 3aff5d80a0
commit c9e7bec690
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 4 deletions

View File

@ -86,6 +86,7 @@ exports[`should create default config 1`] = `
"disableNotifications": false,
"disablePublishUnannouncedEvents": false,
"disableUpdateMaxRevisionId": false,
"displayEdgeBanner": false,
"edgeBulkMetrics": false,
"embedProxy": true,
"embedProxyFrontend": true,

View File

@ -7,8 +7,8 @@ import Controller from '../controller';
import VersionService from '../../services/version-service';
import SettingService from '../../services/setting-service';
import {
simpleAuthSettingsKey,
SimpleAuthSettings,
simpleAuthSettingsKey,
} from '../../types/settings/simple-auth-settings';
import { ADMIN, NONE } from '../../types/permissions';
import { createResponseSchema } from '../../openapi/util/create-response-schema';
@ -153,7 +153,9 @@ class ConfigController extends Controller {
const flags = {
...this.config.ui.flags,
...expFlags,
displayUpgradeEdgeBanner: usesOldEdge,
displayUpgradeEdgeBanner:
usesOldEdge ||
this.config.flagResolver.isEnabled('displayEdgeBanner'),
};
const response: UiConfigSchema = {

View File

@ -1,4 +1,4 @@
import { Variant, PayloadType } from 'unleash-client';
import { PayloadType, Variant } from 'unleash-client';
import { parseEnvVarBoolean } from '../util';
import { getDefaultVariant } from 'unleash-client/lib/variant';
@ -51,7 +51,8 @@ export type IFlagKey =
| 'disableUpdateMaxRevisionId'
| 'disablePublishUnannouncedEvents'
| 'sdkReporting'
| 'scimApi';
| 'scimApi'
| 'displayEdgeBanner';
export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>;
@ -252,6 +253,10 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_SCIM_API,
false,
),
displayEdgeBanner: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_DISPLAY_EDGE_BANNER,
false,
),
};
export const defaultExperimentalOptions: IExperimentalOptions = {