mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	chore: remove emitPotentiallyStaleEvents flag (#4537)
This commit is contained in:
		
							parent
							
								
									6cefb6021e
								
							
						
					
					
						commit
						68273da213
					
				| @ -78,7 +78,6 @@ exports[`should create default config 1`] = ` | ||||
|       "disableNotifications": false, | ||||
|       "embedProxy": true, | ||||
|       "embedProxyFrontend": true, | ||||
|       "emitPotentiallyStaleEvents": false, | ||||
|       "featuresExportImport": true, | ||||
|       "filterInvalidClientMetrics": false, | ||||
|       "frontendNavigationUpdate": false, | ||||
| @ -115,7 +114,6 @@ exports[`should create default config 1`] = ` | ||||
|       "disableNotifications": false, | ||||
|       "embedProxy": true, | ||||
|       "embedProxyFrontend": true, | ||||
|       "emitPotentiallyStaleEvents": false, | ||||
|       "featuresExportImport": true, | ||||
|       "filterInvalidClientMetrics": false, | ||||
|       "frontendNavigationUpdate": false, | ||||
|  | ||||
| @ -44,7 +44,6 @@ test('Should only store events for potentially stale on', async () => { | ||||
|             flagResolver: { isEnabled: () => true }, | ||||
|             experimental: { | ||||
|                 ...(config.experimental ?? {}), | ||||
|                 emitPotentiallyStaleEvents: true, | ||||
|             }, | ||||
|         } as unknown as IUnleashConfig, | ||||
|         {} as ISegmentService, | ||||
|  | ||||
| @ -2063,25 +2063,23 @@ class FeatureToggleService { | ||||
|     async updatePotentiallyStaleFeatures(): Promise<void> { | ||||
|         const potentiallyStaleFeatures = | ||||
|             await this.featureToggleStore.updatePotentiallyStaleFeatures(); | ||||
|         if (this.flagResolver.isEnabled('emitPotentiallyStaleEvents')) { | ||||
|             if (potentiallyStaleFeatures.length > 0) { | ||||
|                 return this.eventStore.batchStore( | ||||
|                     await Promise.all( | ||||
|                         potentiallyStaleFeatures | ||||
|                             .filter((feature) => feature.potentiallyStale) | ||||
|                             .map( | ||||
|                                 async ({ name, project }) => | ||||
|                                     new PotentiallyStaleOnEvent({ | ||||
|                                         featureName: name, | ||||
|                                         project, | ||||
|                                         tags: await this.tagStore.getAllTagsForFeature( | ||||
|                                             name, | ||||
|                                         ), | ||||
|                                     }), | ||||
|                             ), | ||||
|                     ), | ||||
|                 ); | ||||
|             } | ||||
|         if (potentiallyStaleFeatures.length > 0) { | ||||
|             return this.eventStore.batchStore( | ||||
|                 await Promise.all( | ||||
|                     potentiallyStaleFeatures | ||||
|                         .filter((feature) => feature.potentiallyStale) | ||||
|                         .map( | ||||
|                             async ({ name, project }) => | ||||
|                                 new PotentiallyStaleOnEvent({ | ||||
|                                     featureName: name, | ||||
|                                     project, | ||||
|                                     tags: await this.tagStore.getAllTagsForFeature( | ||||
|                                         name, | ||||
|                                     ), | ||||
|                                 }), | ||||
|                         ), | ||||
|                 ), | ||||
|             ); | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
| @ -22,7 +22,6 @@ export type IFlagKey = | ||||
|     | 'advancedPlayground' | ||||
|     | 'strategyVariant' | ||||
|     | 'slackAppAddon' | ||||
|     | 'emitPotentiallyStaleEvents' | ||||
|     | 'configurableFeatureTypeLifetimes' | ||||
|     | 'filterInvalidClientMetrics' | ||||
|     | 'frontendNavigationUpdate' | ||||
| @ -106,10 +105,6 @@ const flags: IFlags = { | ||||
|         process.env.UNLEASH_SLACK_APP_ADDON, | ||||
|         false, | ||||
|     ), | ||||
|     emitPotentiallyStaleEvents: parseEnvVarBoolean( | ||||
|         process.env.UNLEASH_EXPERIMENTAL_EMIT_POTENTIALLY_STALE_EVENTS, | ||||
|         false, | ||||
|     ), | ||||
|     configurableFeatureTypeLifetimes: parseEnvVarBoolean( | ||||
|         process.env.UNLEASH_EXPERIMENTAL_CONFIGURABLE_FEATURE_TYPE_LIFETIMES, | ||||
|         false, | ||||
|  | ||||
| @ -38,7 +38,6 @@ process.nextTick(async () => { | ||||
|                         anonymiseEventLog: false, | ||||
|                         responseTimeWithAppNameKillSwitch: false, | ||||
|                         strategyVariant: true, | ||||
|                         emitPotentiallyStaleEvents: true, | ||||
|                         slackAppAddon: true, | ||||
|                         configurableFeatureTypeLifetimes: true, | ||||
|                         frontendNavigationUpdate: true, | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user