Refactor upgrade commands (#10592)

Simplifying a lot the upgrade system.

New way to upgrade:
`yarn command:prod upgrade`

New way to write upgrade commands (all wrapping is done for you)
```
  override async runOnWorkspace({
    index,
    total,
    workspaceId,
    options,
  }: RunOnWorkspaceArgs): Promise<void> {}
```

Also cleaning CommandModule imports to make it lighter
This commit is contained in:
Charles Bochet
2025-02-28 19:51:32 +01:00
committed by GitHub
parent 194b5889fe
commit baa3043954
44 changed files with 714 additions and 2212 deletions

View File

@ -68,10 +68,6 @@ export class WorkspaceDatasourceFactory {
const result = await this.cacheManager.execute(
cacheKey,
async () => {
this.logger.log(
`Creating workspace data source for workspace ${workspaceId} and metadata version ${cachedWorkspaceMetadataVersion}`,
);
const dataSourceMetadata =
await this.dataSourceService.getLastDataSourceMetadataFromWorkspaceId(
workspaceId,