Null equivalence - remove feature flag (#16222)

This commit is contained in:
Etienne
2025-12-01 19:06:24 +01:00
committed by GitHub
parent da7536124e
commit 68c429a54a
23 changed files with 61 additions and 249 deletions
@@ -13,7 +13,6 @@ import { Repository } from 'typeorm';
import { ActiveOrSuspendedWorkspacesMigrationCommandRunner } from 'src/database/commands/command-runners/active-or-suspended-workspaces-migration.command-runner';
import { RunOnWorkspaceArgs } from 'src/database/commands/command-runners/workspaces-migration.command-runner';
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
import { FeatureFlagEntity } from 'src/engine/core-modules/feature-flag/feature-flag.entity';
import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity';
import { DataSourceService } from 'src/engine/metadata-modules/data-source/data-source.service';
@@ -83,22 +82,6 @@ export class CleanNullEquivalentValuesCommand extends ActiveOrSuspendedWorkspace
this.logger.log('Dry run mode: No changes will be applied');
}
const featureFlag = await this.featureFlagRepository.findOne({
where: {
key: FeatureFlagKey.IS_NULL_EQUIVALENCE_ENABLED,
value: true,
workspaceId,
},
});
if (isDefined(featureFlag)) {
this.logger.log(
`Feature flag ${FeatureFlagKey.IS_NULL_EQUIVALENCE_ENABLED} already enabled for workspace ${workspaceId}`,
);
return;
}
const objectMetadataItems = await this.objectMetadataRepository.find({
where: { workspaceId },
relations: [
@@ -278,20 +261,6 @@ export class CleanNullEquivalentValuesCommand extends ActiveOrSuspendedWorkspace
}
}
}
if (!isDryRun) {
await this.featureFlagRepository.upsert(
{
key: FeatureFlagKey.IS_NULL_EQUIVALENCE_ENABLED,
value: true,
workspaceId,
},
['key', 'workspaceId'],
);
this.logger.log(
`Switched on feature flag ${FeatureFlagKey.IS_NULL_EQUIVALENCE_ENABLED} for workspace ${workspaceId}`,
);
}
}
private objectEquals(obj1: unknown, obj2: unknown): boolean {