diff --git a/README.md b/README.md index 8b691b2..58f5d03 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,10 @@ npx @dcl/opscli queue-ab-conversion \ [--ab-server https://ab-admin.decentraland.org] \ [--content-server https://peer.decentraland.org/content] ``` -> **Note:** WebGL has been decommissioned and is no longer a valid platform target. Valid platforms are `windows` and `mac`. -> If no platform is specified, it runs for all platforms (`windows`, `mac`). More than one can be specified at a time. +> **Note:** WebGL has been decommissioned and is no longer a valid platform target. Valid platforms are `windows`, `mac` and `abgen`. +> If no platform is specified, it runs for the default platforms (`windows`, `mac`). More than one can be specified at a time. +> +> `abgen` is not an OS: it routes the job to the abgen generator (the Rust asset-bundle pipeline), which converts every platform it supports in a single job. It is opt-in only — never included by default — and requires the target environment's ab-admin to have the abgen queue configured (currently `org` and `zone`; `today` has no abgen and returns a 400). `--prioritize` is accepted but abgen has a single queue with no priority lane, and `--animation`/`--doISS` are Unity-only and ignored by abgen. > For dev, use `--ab-server https://ab-admin.decentraland.zone`. diff --git a/src/commands/queue-ab-conversion-about.ts b/src/commands/queue-ab-conversion-about.ts index c58862f..fc4689a 100644 --- a/src/commands/queue-ab-conversion-about.ts +++ b/src/commands/queue-ab-conversion-about.ts @@ -1,7 +1,7 @@ import { AuthLinkType } from '@dcl/schemas' import arg from 'arg' import { assert } from '../helpers/assert' -import { productionAbAdmin, Platform, queueConversions } from '../helpers/asset-bundles' +import { productionAbAdmin, DEFAULT_PLATFORMS, Platform, queueConversions } from '../helpers/asset-bundles' import { fetch } from 'undici' import { CliError } from '../bin' import { parseEntityUrn } from '../helpers/parseEntityUrn' @@ -19,7 +19,7 @@ export default async () => { const aboutUrl = args['--about-url']! const token = args['--token']! const abServer = args['--ab-server'] || productionAbAdmin - const platforms = (args['--platform'] as Platform[]) || Object.values(Platform) + const platforms = (args['--platform'] as Platform[]) || DEFAULT_PLATFORMS const force = args['--force'] || false const shouldPrioritize = !!args['--prioritize'] diff --git a/src/commands/queue-ab-conversion-snapshot.ts b/src/commands/queue-ab-conversion-snapshot.ts index 3b0d84d..3eb7197 100644 --- a/src/commands/queue-ab-conversion-snapshot.ts +++ b/src/commands/queue-ab-conversion-snapshot.ts @@ -3,7 +3,7 @@ import arg from 'arg' import { fetch } from 'undici' import { CliError } from '../bin' import { assert } from '../helpers/assert' -import { productionAbAdmin, Platform, queueConversions } from '../helpers/asset-bundles' +import { productionAbAdmin, DEFAULT_PLATFORMS, Platform, queueConversions } from '../helpers/asset-bundles' import { StringDecoder } from 'string_decoder' import { exit } from 'process' @@ -26,7 +26,7 @@ export default async () => { const snapshot = args['--snapshot'] || 'wearable' const token = args['--token']! const abServer = args['--ab-server'] || productionAbAdmin - const platforms = (args['--platform'] as Platform[]) || Object.values(Platform) + const platforms = (args['--platform'] as Platform[]) || DEFAULT_PLATFORMS const shouldPrioritize = !!args['--prioritize'] assert(!!snapshot, '--snapshot is missing') diff --git a/src/commands/queue-ab-conversion.ts b/src/commands/queue-ab-conversion.ts index 6c2a061..09837f6 100644 --- a/src/commands/queue-ab-conversion.ts +++ b/src/commands/queue-ab-conversion.ts @@ -1,7 +1,7 @@ import { AuthLinkType, IPFSv1, IPFSv2 } from '@dcl/schemas' import arg from 'arg' import { assert } from '../helpers/assert' -import { productionAbAdmin, Platform, queueConversions } from '../helpers/asset-bundles' +import { productionAbAdmin, DEFAULT_PLATFORMS, Platform, queueConversions } from '../helpers/asset-bundles' import { getActiveEntities } from '../helpers/downloads' export default async () => { @@ -22,7 +22,7 @@ export default async () => { const cids = args['--cid'] || [] const token = args['--token']! const abServer = args['--ab-server'] || productionAbAdmin - const platforms = (args['--platform'] as Platform[]) || Object.values(Platform) + const platforms = (args['--platform'] as Platform[]) || DEFAULT_PLATFORMS const contentUrl = (args['--content-server'] || 'https://peer.decentraland.org/content').replace(/\/$/, '') const shouldPrioritize = !!args['--prioritize'] const animation = args['--animation'] || 'legacy' diff --git a/src/helpers/asset-bundles.ts b/src/helpers/asset-bundles.ts index 26d7a62..086f2fe 100644 --- a/src/helpers/asset-bundles.ts +++ b/src/helpers/asset-bundles.ts @@ -6,9 +6,16 @@ export const productionAbAdmin = 'https://ab-admin.decentraland.org' export enum Platform { WINDOWS = 'windows', - MAC = 'mac' + MAC = 'mac', + // Not an OS: routes the job to the abgen generator's queue instead of a Unity + // converter queue (one abgen job converts every platform it supports). + ABGEN = 'abgen' } +// Used when --platform is omitted. abgen is deliberately excluded so default and +// mass reconversions don't feed it until explicitly requested with --platform abgen. +export const DEFAULT_PLATFORMS = [Platform.WINDOWS, Platform.MAC] + export async function queueConversions( customABConverterServer: string, entity: DeploymentToSqs,