Skip to content

Commit

Permalink
Make Insiders target population refer to VS code insiders
Browse files Browse the repository at this point in the history
  • Loading branch information
luabud committed Nov 9, 2024
1 parent d1d125a commit 90629f0
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/client/common/experiments/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { inject, injectable } from 'inversify';
import { l10n } from 'vscode';
import { getExperimentationService, IExperimentationService } from 'vscode-tas-client';
import { getExperimentationService, IExperimentationService, TargetPopulation } from 'vscode-tas-client';
import { traceLog } from '../../logging';
import { sendTelemetryEvent } from '../../telemetry';
import { EventName } from '../../telemetry/constants';
Expand All @@ -17,16 +17,6 @@ import { ExperimentationTelemetry } from './telemetry';
const EXP_MEMENTO_KEY = 'VSCode.ABExp.FeatureData';
const EXP_CONFIG_ID = 'vscode';

/**
* We're defining a custom TargetPopulation specific for the Python extension.
* This is done so the exp framework is able to differentiate between
* VS Code insiders/public users and Python extension insiders (pre-release)/public users.
*/
export enum TargetPopulation {
Insiders = 'python-insider',
Public = 'python-public',
}

@injectable()
export class ExperimentService implements IExperimentService {
/**
Expand Down Expand Up @@ -73,8 +63,8 @@ export class ExperimentService implements IExperimentService {
}

let targetPopulation: TargetPopulation;

if (this.appEnvironment.extensionChannel === 'insiders') {
// if running in VS Code Insiders, use the Insiders target population
if (this.appEnvironment.channel === 'insiders') {
targetPopulation = TargetPopulation.Insiders;
} else {
targetPopulation = TargetPopulation.Public;
Expand Down

0 comments on commit 90629f0

Please sign in to comment.