1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-26 13:48:33 +02:00

chore: flag cleanup simplifyDisableFeature (#9892)

This commit is contained in:
David Leek 2025-05-06 08:41:03 +02:00 committed by GitHub
parent 7ca79c1b84
commit 1166d00e6d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 32 deletions

View File

@ -792,35 +792,15 @@ class FeatureToggleService {
auditUser: IAuditUser,
user?: IUser,
): Promise<void> {
if (this.flagResolver.isEnabled('simplifyDisableFeature')) {
const strategies =
await this.featureStrategiesStore.getStrategiesForFeatureEnv(
projectId,
featureName,
environment,
);
const hasOnlyDisabledStrategies = strategies.every(
(strategy) => strategy.disabled,
const strategies =
await this.featureStrategiesStore.getStrategiesForFeatureEnv(
projectId,
featureName,
environment,
);
if (hasOnlyDisabledStrategies) {
await this.unprotectedUpdateEnabled(
projectId,
featureName,
environment,
false,
auditUser,
user,
);
}
return;
}
const feature = await this.getFeature({ featureName });
const env = feature.environments.find((e) => e.name === environment);
const hasOnlyDisabledStrategies = env?.strategies.every(
const hasOnlyDisabledStrategies = strategies.every(
(strategy) => strategy.disabled,
);
if (hasOnlyDisabledStrategies) {
await this.unprotectedUpdateEnabled(
projectId,

View File

@ -61,7 +61,6 @@ export type IFlagKey =
| 'consumptionModel'
| 'teamsIntegrationChangeRequests'
| 'edgeObservability'
| 'simplifyDisableFeature'
| 'adminNavUI'
| 'tagTypeColor'
| 'addEditStrategy'
@ -295,10 +294,6 @@ const flags: IFlags = {
process.env.EXPERIMENTAL_EDGE_OBSERVABILITY,
false,
),
simplifyDisableFeature: parseEnvVarBoolean(
process.env.EXPERIMENTAL_SIMPLIFY_DISABLE_FEATURE,
false,
),
adminNavUI: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_ADMIN_NAV_UI,
false,

View File

@ -55,7 +55,6 @@ process.nextTick(async () => {
uniqueSdkTracking: true,
filterExistingFlagNames: true,
teamsIntegrationChangeRequests: true,
simplifyDisableFeature: true,
adminNavUI: true,
tagTypeColor: true,
newStrategyDropdown: true,