Skip to content

Commit c86f666

Browse files
authored
ref(✂️): remove unused experiment code (#90359)
1 parent 6d2ffe5 commit c86f666

18 files changed

+1
-967
lines changed

static/app/data/experimentConfig.tsx

-33
This file was deleted.

static/app/types/experiments.tsx

-81
This file was deleted.

static/app/types/hooks.tsx

-18
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ import type {ProductSelectionProps} from 'sentry/components/onboarding/productSe
77
import type SidebarItem from 'sentry/components/sidebar/sidebarItem';
88
import type DateRange from 'sentry/components/timeRangeSelector/dateRange';
99
import type SelectorItems from 'sentry/components/timeRangeSelector/selectorItems';
10-
import type {UseExperiment} from 'sentry/utils/useExperiment';
1110
import type {TitleableModuleNames} from 'sentry/views/insights/common/components/modulePageProviders';
1211
import type {OrganizationStatsProps} from 'sentry/views/organizationStats';
1312
import type {RouteAnalyticsContext} from 'sentry/views/routeAnalyticsContextProvider';
1413
import type {NavigationItem, NavigationSection} from 'sentry/views/settings/types';
1514

16-
import type {ExperimentKey} from './experiments';
1715
import type {Integration, IntegrationProvider} from './integrations';
1816
import type {
1917
Route,
@@ -217,7 +215,6 @@ type CustomizationHooks = {
217215
*/
218216
type AnalyticsHooks = {
219217
'analytics:init-user': AnalyticsInitUser;
220-
'analytics:log-experiment': AnalyticsLogExperiment;
221218
'analytics:raw-track-event': AnalyticsRawTrackEvent;
222219
'metrics:event': MetricsEvent;
223220
};
@@ -319,7 +316,6 @@ type ReactHooks = {
319316
props: RouteContextInterface
320317
) => React.ContextType<typeof RouteAnalyticsContext>;
321318
'react-hook:use-button-tracking': (props: ButtonProps) => () => void;
322-
'react-hook:use-experiment': UseExperiment;
323319
'react-hook:use-get-max-retention-days': () => number | undefined;
324320
};
325321

@@ -437,20 +433,6 @@ type AnalyticsRawTrackEvent = (
437433
}
438434
) => void;
439435

440-
/**
441-
* Trigger experiment observed logging.
442-
*/
443-
type AnalyticsLogExperiment = (opts: {
444-
/**
445-
* The experiment key
446-
*/
447-
key: ExperimentKey;
448-
/**
449-
* The organization. Must be provided for organization experiments.
450-
*/
451-
organization?: Organization;
452-
}) => void;
453-
454436
/**
455437
* Trigger recording a metric in the hook store.
456438
*/

static/app/types/organization.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import type {
77
import type {WidgetType} from 'sentry/views/dashboards/types';
88

99
import type {Actor, Avatar, ObjectStatus, Scope} from './core';
10-
import type {OrgExperiments} from './experiments';
1110
import type {ExternalTeam} from './integrations';
1211
import type {OnboardingTaskStatus} from './onboarding';
1312
import type {Project} from './project';
@@ -64,7 +63,6 @@ export interface Organization extends OrganizationSummary {
6463
defaultRole: string;
6564
enhancedPrivacy: boolean;
6665
eventsMemberAdmin: boolean;
67-
experiments: Partial<OrgExperiments>;
6866
genAIConsent: boolean;
6967
isDefault: boolean;
7068
isDynamicallySampled: boolean;

static/app/types/user.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type {UserEnrolledAuthenticator} from './auth';
22
import type {Avatar, Scope} from './core';
3-
import type {UserExperiments} from './experiments';
43

54
/**
65
* Avatars are a more primitive version of User.
@@ -36,7 +35,6 @@ export interface User extends Omit<AvatarUser, 'options'> {
3635
id: string;
3736
is_verified: boolean;
3837
}>;
39-
experiments: Partial<UserExperiments>;
4038
flags: {newsletter_consent_prompt: boolean};
4139
has2fa: boolean;
4240
hasPasswordAuth: boolean;

static/app/utils/useExperiment.tsx

-44
This file was deleted.

static/app/utils/withExperiment.spec.tsx

-26
This file was deleted.

static/app/utils/withExperiment.tsx

-107
This file was deleted.

static/gsApp/hooks/integrationFeatures.spec.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {PlanTier} from 'getsentry/types';
1616
describe('hookIntegrationFeatures', function () {
1717
const {FeatureList, IntegrationFeatures} = hookIntegrationFeatures();
1818

19-
const organization = OrganizationFixture({experiments: {}});
19+
const organization = OrganizationFixture({});
2020

2121
ConfigStore.set('user', UserFixture({isSuperuser: true}));
2222
beforeEach(() => {

0 commit comments

Comments
 (0)