mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +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:
		
							parent
							
								
									3aff5d80a0
								
							
						
					
					
						commit
						c9e7bec690
					
				| @ -86,6 +86,7 @@ exports[`should create default config 1`] = ` | ||||
|       "disableNotifications": false, | ||||
|       "disablePublishUnannouncedEvents": false, | ||||
|       "disableUpdateMaxRevisionId": false, | ||||
|       "displayEdgeBanner": false, | ||||
|       "edgeBulkMetrics": false, | ||||
|       "embedProxy": true, | ||||
|       "embedProxyFrontend": true, | ||||
|  | ||||
| @ -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 = { | ||||
|  | ||||
| @ -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 = { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user