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:
parent
7ca79c1b84
commit
1166d00e6d
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -55,7 +55,6 @@ process.nextTick(async () => {
|
||||
uniqueSdkTracking: true,
|
||||
filterExistingFlagNames: true,
|
||||
teamsIntegrationChangeRequests: true,
|
||||
simplifyDisableFeature: true,
|
||||
adminNavUI: true,
|
||||
tagTypeColor: true,
|
||||
newStrategyDropdown: true,
|
||||
|
Loading…
Reference in New Issue
Block a user