Remove sync-metadata and IS_WORKSPACE_CREATION_V2_ENABLED feature flag (#16997)
# Introduction Followup of https://github.com/twentyhq/twenty/pull/17001#pullrequestreview-3638508738 close https://github.com/twentyhq/core-team-issues/issues/1910 We've completely decom the `sync-metadata` in production. We're now then removing its implementation in favor of the v2. ## TODO: - [x] Remove sync-metadata implem and commands - [x] Remove workspace decorators - [x] Type each deprecated field to deprecated on their workspaceEntity - [x] Remove the `workspace-sync-metadata` folder entirely - [x] remove workspace migration - [x] workspace migration removal migration - [x] remove the `v2` references from workspace manager file names - [x] remove the `v2` references from workspace manager modules - [ ] Double check impact on translation file path updates ## Note - Removed the gate logic - Remains some service v2 naming, serverless needs to be migrated on v2 fully - Removed workspaceMigration service app health consumption, making it always returning up ( no more down ) cc @FelixMalfait ( quite obsolete health check now, will require complete refactor once we introduce inter app dependency etc )
This commit is contained in:
+4
-4
@@ -31,12 +31,12 @@ import {
|
||||
ViewException,
|
||||
ViewExceptionCode,
|
||||
} from 'src/engine/metadata-modules/view/exceptions/view.exception';
|
||||
import { WorkspaceMigrationBuilderExceptionV2 } from 'src/engine/workspace-manager/workspace-migration-v2/exceptions/workspace-migration-builder-exception-v2';
|
||||
import { workspaceMigrationBuilderExceptionV2Formatter } from 'src/engine/workspace-manager/workspace-migration-v2/interceptors/workspace-migration-builder-exception-v2-formatter';
|
||||
import { WorkspaceMigrationBuilderException } from 'src/engine/workspace-manager/workspace-migration/exceptions/workspace-migration-builder-exception';
|
||||
import { workspaceMigrationBuilderExceptionFormatter } from 'src/engine/workspace-manager/workspace-migration/interceptors/workspace-migration-builder-exception-formatter';
|
||||
|
||||
export const viewGraphqlApiExceptionHandler = (error: Error, i18n: I18n) => {
|
||||
if (error instanceof WorkspaceMigrationBuilderExceptionV2) {
|
||||
return workspaceMigrationBuilderExceptionV2Formatter(error, i18n);
|
||||
if (error instanceof WorkspaceMigrationBuilderException) {
|
||||
return workspaceMigrationBuilderExceptionFormatter(error, i18n);
|
||||
}
|
||||
|
||||
if (error instanceof ViewException) {
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
Catch,
|
||||
type ExecutionContext,
|
||||
type ExceptionFilter,
|
||||
type ExecutionContext,
|
||||
Injectable,
|
||||
} from '@nestjs/common';
|
||||
import { GqlExecutionContext } from '@nestjs/graphql';
|
||||
@@ -16,7 +16,7 @@ import { ViewGroupException } from 'src/engine/metadata-modules/view-group/excep
|
||||
import { ViewSortException } from 'src/engine/metadata-modules/view-sort/exceptions/view-sort.exception';
|
||||
import { ViewException } from 'src/engine/metadata-modules/view/exceptions/view.exception';
|
||||
import { viewGraphqlApiExceptionHandler } from 'src/engine/metadata-modules/view/utils/view-graphql-api-exception-handler.util';
|
||||
import { WorkspaceMigrationBuilderExceptionV2 } from 'src/engine/workspace-manager/workspace-migration-v2/exceptions/workspace-migration-builder-exception-v2';
|
||||
import { WorkspaceMigrationBuilderException } from 'src/engine/workspace-manager/workspace-migration/exceptions/workspace-migration-builder-exception';
|
||||
|
||||
@Catch(
|
||||
ViewException,
|
||||
@@ -25,7 +25,7 @@ import { WorkspaceMigrationBuilderExceptionV2 } from 'src/engine/workspace-manag
|
||||
ViewFilterGroupException,
|
||||
ViewGroupException,
|
||||
ViewSortException,
|
||||
WorkspaceMigrationBuilderExceptionV2,
|
||||
WorkspaceMigrationBuilderException,
|
||||
)
|
||||
@Injectable()
|
||||
export class ViewGraphqlApiExceptionFilter implements ExceptionFilter {
|
||||
@@ -39,7 +39,7 @@ export class ViewGraphqlApiExceptionFilter implements ExceptionFilter {
|
||||
| ViewFilterGroupException
|
||||
| ViewGroupException
|
||||
| ViewSortException
|
||||
| WorkspaceMigrationBuilderExceptionV2,
|
||||
| WorkspaceMigrationBuilderException,
|
||||
host: ExecutionContext,
|
||||
) {
|
||||
const gqlContext = GqlExecutionContext.create(host);
|
||||
|
||||
Reference in New Issue
Block a user