From a2fcb023f011348496ca490b66380cbe4e7130e5 Mon Sep 17 00:00:00 2001 From: frostebite Date: Fri, 14 Aug 2026 20:34:55 +0100 Subject: [PATCH] fix: NoTarget resolved to a Docker tag unityci/editor never publishes RunnerImageTag mapped both NoTarget and the internal 'Test' targetPlatform to the same empty suffix, producing tags like "ubuntu-2019.2.17f1-3" - unityci/editor always has a module suffix (base/webgl/android/etc.), so this is never a real image. `docker pull` failed with "manifest unknown" on every version. Surfaced by unity-activate#111's thin-wrapper CI: `game-ci activate` defaults targetPlatform to NoTarget (#79) and hit this on every job. 'base' is the same image StandaloneLinux64 (pre-il2cpp) already resolves to - the right choice for "just an editor, no specific build target". Split into its own noTarget suffix rather than reusing generic, since 'Test' also used generic and doesn't pull real images - no reason to touch its behavior. --- .../unity/runner/runner-image-tag.test.ts | 10 +++++-- src/model/unity/runner/runner-image-tag.ts | 29 +++++++++++++++++-- 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/src/model/unity/runner/runner-image-tag.test.ts b/src/model/unity/runner/runner-image-tag.test.ts index 829b13a2..bc460ede 100644 --- a/src/model/unity/runner/runner-image-tag.test.ts +++ b/src/model/unity/runner/runner-image-tag.test.ts @@ -91,7 +91,11 @@ describe('RunnerImageTag', () => { } }); - it('returns no specific build platform for generic targetPlatforms', () => { + // Real bug (game-ci/unity-activate#111): this used to resolve to an + // empty suffix, producing "ubuntu-2019.2.11f1-3" - a tag unityci/editor + // never publishes ("manifest unknown" on docker pull). NoTarget/generic + // now resolves to the same 'base' image StandaloneLinux64 uses. + it("resolves generic targetPlatforms to the 'base' image, not an empty suffix", () => { const image = new RunnerImageTag({ targetPlatform: 'NoTarget', hostPlatform: process.platform, @@ -99,10 +103,10 @@ describe('RunnerImageTag', () => { switch (process.platform) { case 'win32': - expect(image.toString()).toStrictEqual(`${defaults.image}:windows-2019.2.11f1-3`); + expect(image.toString()).toStrictEqual(`${defaults.image}:windows-2019.2.11f1-base-3`); break; case 'linux': - expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2019.2.11f1-3`); + expect(image.toString()).toStrictEqual(`${defaults.image}:ubuntu-2019.2.11f1-base-3`); break; } }); diff --git a/src/model/unity/runner/runner-image-tag.ts b/src/model/unity/runner/runner-image-tag.ts index 9b830ce3..75ad741e 100644 --- a/src/model/unity/runner/runner-image-tag.ts +++ b/src/model/unity/runner/runner-image-tag.ts @@ -54,7 +54,17 @@ class RunnerImageTag { static get targetPlatformSuffixes() { return { + // Used only by the internal 'Test' targetPlatform (unit-test + // scaffolding, never a real Docker pull) - kept as-is. generic: '', + // unityci/editor never publishes a bare "ubuntu--" tag - + // every real image has a module suffix. 'base' is the same image + // StandaloneLinux64 (pre-il2cpp) resolves to, and is what NoTarget + // actually needs: an editor image, not tied to any build target. + // Found via unity-activate#111's thin-wrapper CI: `game-ci activate` + // (which defaults targetPlatform to NoTarget, see #79) tried to pull + // "unityci/editor:ubuntu-2019.2.17f1-3" - manifest unknown. + noTarget: 'base', webgl: 'webgl', mac: 'mac-mono', windows: 'windows-mono', @@ -82,8 +92,21 @@ class RunnerImageTag { static getTargetPlatformToTargetPlatformSuffixMap(hostPlatform: string, targetPlatform: string, version: string) { log.info(hostPlatform, targetPlatform, version); - const { generic, webgl, mac, windows, windowsIl2cpp, wsaPlayer, linux, linuxIl2cpp, android, ios, tvos, facebook } = - RunnerImageTag.targetPlatformSuffixes; + const { + generic, + noTarget, + webgl, + mac, + windows, + windowsIl2cpp, + wsaPlayer, + linux, + linuxIl2cpp, + android, + ios, + tvos, + facebook, + } = RunnerImageTag.targetPlatformSuffixes; const [major, minor] = version.split('.').map(Number); @@ -148,7 +171,7 @@ class RunnerImageTag { case UnityTargetPlatform.Facebook: return facebook; case UnityTargetPlatform.NoTarget: - return generic; + return noTarget; // Test specific case UnityTargetPlatform.Test: