From 0f87ce6a9338333614e564d50bc3fec99dc5b4dc Mon Sep 17 00:00:00 2001 From: Michelle Zhang <56095982+michellewzhang@users.noreply.github.com> Date: Wed, 16 Oct 2024 10:58:08 -0700 Subject: [PATCH] fix(flag): actually increase buffer size to 100 (#79196) and remove the default buffer size --- static/app/actionCreators/organization.tsx | 2 +- static/app/utils/featureObserver.ts | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/static/app/actionCreators/organization.tsx b/static/app/actionCreators/organization.tsx index 2b9c8e033c64b..46882a81c2e82 100644 --- a/static/app/actionCreators/organization.tsx +++ b/static/app/actionCreators/organization.tsx @@ -42,7 +42,7 @@ async function fetchOrg( } FeatureFlagOverrides.singleton().loadOrg(org); - FeatureObserver.singleton().observeFlags({organization: org, bufferSize: 10}); + FeatureObserver.singleton().observeFlags({organization: org, bufferSize: 100}); OrganizationStore.onUpdate(org, {replace: true}); setActiveOrganization(org); diff --git a/static/app/utils/featureObserver.ts b/static/app/utils/featureObserver.ts index 3c06203daef8d..9d757e241c465 100644 --- a/static/app/utils/featureObserver.ts +++ b/static/app/utils/featureObserver.ts @@ -1,7 +1,6 @@ import type {Flags} from 'sentry/types/event'; import type {Organization} from 'sentry/types/organization'; -const DEFAULT_BUFFER_SIZE = 100; let __SINGLETON: FeatureObserver | null = null; export default class FeatureObserver { @@ -27,10 +26,10 @@ export default class FeatureObserver { public observeFlags({ organization, - bufferSize = DEFAULT_BUFFER_SIZE, + bufferSize, }: { + bufferSize: number; organization: Organization; - bufferSize?: number; }) { const FLAGS = this.FEATURE_FLAGS;