@essential-apps/shopify-test-runner 1.0.12 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/edge/edgeProxy.d.ts.map +1 -1
- package/dist/edge/edgeProxy.js +18 -12
- package/dist/edge/edgeProxy.js.map +1 -1
- package/dist/lib/guestVnc.d.ts +31 -0
- package/dist/lib/guestVnc.d.ts.map +1 -0
- package/dist/lib/guestVnc.js +111 -0
- package/dist/lib/guestVnc.js.map +1 -0
- package/dist/probes/runProbe.js +0 -0
- package/dist/scripts/addStore.js +0 -0
- package/dist/scripts/buildImage.d.ts +3 -0
- package/dist/scripts/buildImage.d.ts.map +1 -0
- package/dist/scripts/{buildDockerImage.js → buildImage.js} +12 -10
- package/dist/scripts/buildImage.js.map +1 -0
- package/dist/scripts/captureAuth.js +0 -0
- package/dist/scripts/captureContracts.js +0 -0
- package/dist/scripts/captureRestContracts.js +0 -0
- package/dist/scripts/captureSharedContracts.d.ts +3 -0
- package/dist/scripts/captureSharedContracts.d.ts.map +1 -0
- package/dist/scripts/captureSharedContracts.js +209 -0
- package/dist/scripts/captureSharedContracts.js.map +1 -0
- package/dist/scripts/checkOperationCoverage.js +0 -0
- package/dist/scripts/cleanupStores.js +0 -0
- package/dist/scripts/createStores.js +0 -0
- package/dist/scripts/deployAppVersion.js +0 -0
- package/dist/scripts/devOnlineBackend.js +0 -0
- package/dist/scripts/installApp.js +0 -0
- package/dist/scripts/listStores.js +0 -0
- package/dist/scripts/runOffline.js +78 -1
- package/dist/scripts/runOffline.js.map +1 -1
- package/dist/scripts/runOfflineFullTests.js +49 -21
- package/dist/scripts/runOfflineFullTests.js.map +1 -1
- package/dist/scripts/runTests.js +0 -0
- package/dist/scripts/runVm.js +0 -0
- package/dist/scripts/runVmAuth.js +0 -0
- package/dist/scripts/setupTestDb.js +0 -0
- package/dist/scripts/verifyContracts.js +20 -29
- package/dist/scripts/verifyContracts.js.map +1 -1
- package/dist/scripts/verifyRestContracts.js +17 -30
- package/dist/scripts/verifyRestContracts.js.map +1 -1
- package/package.json +11 -9
- package/src/edge/edgeProxy.ts +19 -12
- package/src/lib/guestVnc.ts +147 -0
- package/src/scripts/{buildDockerImage.ts → buildImage.ts} +11 -9
- package/src/scripts/captureSharedContracts.ts +228 -0
- package/src/scripts/runOffline.ts +82 -1
- package/src/scripts/runOfflineFullTests.ts +56 -21
- package/src/scripts/verifyContracts.ts +22 -38
- package/src/scripts/verifyRestContracts.ts +23 -42
- package/dist/edge/nodeShim.d.ts +0 -2
- package/dist/edge/nodeShim.d.ts.map +0 -1
- package/dist/edge/nodeShim.js +0 -217
- package/dist/edge/nodeShim.js.map +0 -1
- package/dist/scripts/_probeSourceUrl.d.ts +0 -3
- package/dist/scripts/_probeSourceUrl.d.ts.map +0 -1
- package/dist/scripts/_probeSourceUrl.js +0 -119
- package/dist/scripts/_probeSourceUrl.js.map +0 -1
- package/dist/scripts/buildDockerImage.d.ts +0 -3
- package/dist/scripts/buildDockerImage.d.ts.map +0 -1
- package/dist/scripts/buildDockerImage.js.map +0 -1
- package/dist/scripts/devE2eBackend.d.ts +0 -3
- package/dist/scripts/devE2eBackend.d.ts.map +0 -1
- package/dist/scripts/devE2eBackend.js +0 -117
- package/dist/scripts/devE2eBackend.js.map +0 -1
- package/dist/scripts/runDocker.d.ts +0 -3
- package/dist/scripts/runDocker.d.ts.map +0 -1
- package/dist/scripts/runDocker.js +0 -88
- package/dist/scripts/runDocker.js.map +0 -1
- package/dist/scripts/runDockerAuth.d.ts +0 -3
- package/dist/scripts/runDockerAuth.d.ts.map +0 -1
- package/dist/scripts/runDockerAuth.js +0 -108
- package/dist/scripts/runDockerAuth.js.map +0 -1
- package/dist/scripts/runDockerOffline.d.ts +0 -3
- package/dist/scripts/runDockerOffline.d.ts.map +0 -1
- package/dist/scripts/runDockerOffline.js +0 -129
- package/dist/scripts/runDockerOffline.js.map +0 -1
- package/dist/scripts/runDockerOfflineExplore.d.ts +0 -3
- package/dist/scripts/runDockerOfflineExplore.d.ts.map +0 -1
- package/dist/scripts/runDockerOfflineExplore.js +0 -116
- package/dist/scripts/runDockerOfflineExplore.js.map +0 -1
- package/dist/scripts/runIsolatedDockerOffline.d.ts +0 -3
- package/dist/scripts/runIsolatedDockerOffline.d.ts.map +0 -1
- package/dist/scripts/runIsolatedDockerOffline.js +0 -351
- package/dist/scripts/runIsolatedDockerOffline.js.map +0 -1
- package/dist/scripts/runOfflineE2e.d.ts +0 -3
- package/dist/scripts/runOfflineE2e.d.ts.map +0 -1
- package/dist/scripts/runOfflineE2e.js +0 -408
- package/dist/scripts/runOfflineE2e.js.map +0 -1
- package/dist/scripts/runSupermachine.d.ts +0 -3
- package/dist/scripts/runSupermachine.d.ts.map +0 -1
- package/dist/scripts/runSupermachine.js +0 -474
- package/dist/scripts/runSupermachine.js.map +0 -1
- package/dist/scripts/runSupermachineAuth.d.ts +0 -3
- package/dist/scripts/runSupermachineAuth.d.ts.map +0 -1
- package/dist/scripts/runSupermachineAuth.js +0 -454
- package/dist/scripts/runSupermachineAuth.js.map +0 -1
- package/dist/vite/offlineConfig.d.ts +0 -34
- package/dist/vite/offlineConfig.d.ts.map +0 -1
- package/dist/vite/offlineConfig.js +0 -61
- package/dist/vite/offlineConfig.js.map +0 -1
- package/src/scripts/runDockerAuth.ts +0 -120
|
@@ -1,474 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Run e2e tests inside a supermachine HVF microVM.
|
|
4
|
-
*
|
|
5
|
-
* Drop-in replacement for `runDocker.ts`. Same workflow, same test
|
|
6
|
-
* outputs, but uses supermachine's arm64 microVM with virtio-fs DAX
|
|
7
|
-
* bind mounts instead of Apple `container`'s libkrun:
|
|
8
|
-
*
|
|
9
|
-
* libkrun supermachine
|
|
10
|
-
* ───────── ────────────
|
|
11
|
-
* amd64 image (Rosetta) arm64 image (native)
|
|
12
|
-
* ~10 s cold boot ~5 s cold bake / ~1 s warm restore
|
|
13
|
-
* ~30 s/test wall-clock ~3× faster end-to-end on offline-full
|
|
14
|
-
* Google Chrome amd64 in Xvfb Playwright bundled chromium in
|
|
15
|
-
* Xvfb (patchright stealth still works)
|
|
16
|
-
*
|
|
17
|
-
* Architecture:
|
|
18
|
-
* - Image: `essential-apps/shopify-test-supermachine:latest` baked
|
|
19
|
-
* via `tests/test-offline/docker/Dockerfile.supermachine` in the consuming
|
|
20
|
-
* app (the equivalent of `Dockerfile` for libkrun). Auto-saved as
|
|
21
|
-
* a local OCI archive on first invocation via `prepareOciArchive`.
|
|
22
|
-
* - Bind mounts (virtio-fs DAX):
|
|
23
|
-
* - consuming app repo → /workspace
|
|
24
|
-
* - linux node_modules cache → /workspace/node_modules
|
|
25
|
-
* Both writable in-VM, host changes reflected immediately.
|
|
26
|
-
* - Postgres autostarted in the warmup callback (folded into the
|
|
27
|
-
* snapshot so warm restores skip the cost).
|
|
28
|
-
* - `runTests.js` invoked inside the VM; its localhost:5432 points
|
|
29
|
-
* at the in-VM postgres started by the warmup.
|
|
30
|
-
*
|
|
31
|
-
* Override env vars (all match the conformance package's conventions
|
|
32
|
-
* so users only learn one set):
|
|
33
|
-
* TEST_ONLINE_SUPERMACHINE_IMAGE ref to bake/restore. Default:
|
|
34
|
-
* `essential-apps/shopify-test-supermachine:latest`
|
|
35
|
-
* TEST_ONLINE_SUPERMACHINE_IMAGE_SOURCE oci-archive | oci-layout | registry. Default: oci-archive.
|
|
36
|
-
* TEST_ONLINE_SUPERMACHINE_IMAGE_LAYOUT_PATH required when source=oci-layout.
|
|
37
|
-
* TEST_ONLINE_SUPERMACHINE_MEMORY_MIB guest RAM. Default: 8192.
|
|
38
|
-
* TEST_ONLINE_SUPERMACHINE_VCPUS guest vCPUs. Default: 4.
|
|
39
|
-
* TEST_LINUX_NODE_MODULES_VOLUME host path for the Linux node_modules
|
|
40
|
-
* sparse-file volume.
|
|
41
|
-
* Default: ~/.cache/${appName}-e2e/node_modules.img
|
|
42
|
-
* TEST_ONLINE_SUPERMACHINE_TIMEOUT_MS overall guard for runTests.js. Default: 10 min.
|
|
43
|
-
*/
|
|
44
|
-
import { existsSync, mkdirSync, readFileSync } from 'node:fs';
|
|
45
|
-
import { homedir } from 'node:os';
|
|
46
|
-
import { resolve } from 'node:path';
|
|
47
|
-
import { prepareOciArchive } from '@essential-apps/shopify-test-core';
|
|
48
|
-
const repoRoot = process.cwd();
|
|
49
|
-
function readAppName() {
|
|
50
|
-
const pkgPath = resolve(repoRoot, 'package.json');
|
|
51
|
-
if (!existsSync(pkgPath)) {
|
|
52
|
-
throw new Error(`No package.json at ${pkgPath}. Run this from the consuming app's repo root.`);
|
|
53
|
-
}
|
|
54
|
-
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
|
|
55
|
-
if (!pkg.name) {
|
|
56
|
-
throw new Error(`package.json at ${pkgPath} has no \`name\` field.`);
|
|
57
|
-
}
|
|
58
|
-
return pkg.name.replace(/^@[^/]+\//, '');
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Resolve the supermachine image source the same way the conformance
|
|
62
|
-
* runner does. Duplicated here intentionally — extracting into a
|
|
63
|
-
* shared helper would create a runner→conformance dep cycle (runner
|
|
64
|
-
* is allowed to depend on conformance, but in practice this is the
|
|
65
|
-
* single use-site and the indirection isn't worth a new dep).
|
|
66
|
-
*/
|
|
67
|
-
async function imageSourceOptions() {
|
|
68
|
-
const mode = process.env['TEST_ONLINE_SUPERMACHINE_IMAGE_SOURCE'] ?? 'oci-archive';
|
|
69
|
-
if (mode === 'registry')
|
|
70
|
-
return {};
|
|
71
|
-
const ref = process.env['TEST_ONLINE_SUPERMACHINE_IMAGE'] ??
|
|
72
|
-
// Must match the default in main() below — otherwise the OCI
|
|
73
|
-
// archive's recorded ref won't match what Image.build expects.
|
|
74
|
-
'essential-apps/shopify-test-supermachine:latest';
|
|
75
|
-
if (mode === 'oci-archive') {
|
|
76
|
-
const prep = await prepareOciArchive(ref);
|
|
77
|
-
if (prep.freshlySaved) {
|
|
78
|
-
console.error(`[runSupermachine] saved ${ref} → ${prep.archivePath} (${(prep.sizeBytes / 1024 / 1024).toFixed(1)} MB)`);
|
|
79
|
-
}
|
|
80
|
-
return { source: 'oci-archive', sourcePath: prep.archivePath };
|
|
81
|
-
}
|
|
82
|
-
if (mode === 'oci-layout') {
|
|
83
|
-
const sourcePath = process.env['TEST_ONLINE_SUPERMACHINE_IMAGE_LAYOUT_PATH'];
|
|
84
|
-
if (!sourcePath) {
|
|
85
|
-
throw new Error(`TEST_ONLINE_SUPERMACHINE_IMAGE_SOURCE=oci-layout requires TEST_ONLINE_SUPERMACHINE_IMAGE_LAYOUT_PATH`);
|
|
86
|
-
}
|
|
87
|
-
return { source: 'oci-layout', sourcePath };
|
|
88
|
-
}
|
|
89
|
-
throw new Error(`TEST_ONLINE_SUPERMACHINE_IMAGE_SOURCE=${mode} not recognised. Valid: oci-archive | oci-layout | registry`);
|
|
90
|
-
}
|
|
91
|
-
async function main() {
|
|
92
|
-
const appName = readAppName();
|
|
93
|
-
// node_modules now lives in a virtio-blk VOLUME (sparse host file)
|
|
94
|
-
// instead of a virtio-fs bind mount. Three wins:
|
|
95
|
-
// 1. ~native disk speed for the many-small-files workload that
|
|
96
|
-
// npm install actually is (10-30s vs 3-6 min on a virtio-fs
|
|
97
|
-
// mount per supermachine example 07).
|
|
98
|
-
// 2. State semantics make sense: node_modules is VM-private
|
|
99
|
-
// (produced by in-VM npm install), not shared with the host.
|
|
100
|
-
// 3. Cache invalidation via `extraFiles` on the tarball manifest
|
|
101
|
-
// (see below) handles "tarballs changed → rebake" properly,
|
|
102
|
-
// so pack-into no longer needs the wipe-host-cache hack.
|
|
103
|
-
// Path defaults stay namespaced by appName so multi-app dev works.
|
|
104
|
-
const linuxModulesVolume = process.env['TEST_LINUX_NODE_MODULES_VOLUME'] ??
|
|
105
|
-
resolve(homedir(), `.cache/${appName}-e2e/node_modules.img`);
|
|
106
|
-
mkdirSync(resolve(linuxModulesVolume, '..'), { recursive: true });
|
|
107
|
-
// Tarball-manifest file written by `scripts/pack-into.sh`. We pass
|
|
108
|
-
// it as an extraFile so its bytes are folded into the snapshot's
|
|
109
|
-
// input hash — any tarball change re-bakes automatically. Optional
|
|
110
|
-
// (consumer might not use pack-into); we just skip the extraFile if
|
|
111
|
-
// it's missing.
|
|
112
|
-
const tarballManifest = resolve(repoRoot, 'vendor/essential-apps-shopify-test/.tarball-manifest');
|
|
113
|
-
const tarballManifestExists = existsSync(tarballManifest);
|
|
114
|
-
// Dynamic import — @supermachine/core is heavy and only needed
|
|
115
|
-
// when actually running tests, not for `--help` etc.
|
|
116
|
-
const { Image } = await import('@supermachine/core');
|
|
117
|
-
const imageOpts = await imageSourceOptions();
|
|
118
|
-
console.error(`[runSupermachine] baking image…`);
|
|
119
|
-
const tBake = performance.now();
|
|
120
|
-
// arm64 native — no Rosetta translation tax. Storepool +
|
|
121
|
-
// captureAuth use patchright's bundled chromium (arm64 build
|
|
122
|
-
// ships with the package), so we no longer need amd64+Rosetta
|
|
123
|
-
// for real Google Chrome.
|
|
124
|
-
const platform = process.env['TEST_ONLINE_SUPERMACHINE_PLATFORM'] ?? 'linux/arm64';
|
|
125
|
-
// `cmd` overrides only the image's CMD; supermachine 0.7.16+
|
|
126
|
-
// auto-prepends the image's ENTRYPOINT (Docker-like semantics).
|
|
127
|
-
// The amd64 image's entrypoint.sh starts Xvfb + Postgres +
|
|
128
|
-
// /etc/hosts seed before exec-ing the cmd args; those services
|
|
129
|
-
// are preserved across snapshot/restore as background processes.
|
|
130
|
-
const image = await Image.build({
|
|
131
|
-
ref: process.env['TEST_ONLINE_SUPERMACHINE_IMAGE'] ??
|
|
132
|
-
// arm64-native conformance image (Dockerfile.supermachine).
|
|
133
|
-
// We switched the browser to patchright-only (storePool +
|
|
134
|
-
// captureAuth both use the bundled chromium with stealth
|
|
135
|
-
// patches), so we no longer need the amd64 image to host
|
|
136
|
-
// google-chrome-stable amd64 — arm64 native is faster
|
|
137
|
-
// (no Rosetta translation) and uses less memory.
|
|
138
|
-
'essential-apps/shopify-test-supermachine:latest',
|
|
139
|
-
// 12 GiB ceiling — patchright chromium + postgres + Vite/Remix
|
|
140
|
-
// (Prisma + esbuild + 2k+ packages loaded) + npm-install warmup
|
|
141
|
-
// all live concurrently. 8 GiB OOM-killed Vite during Playwright
|
|
142
|
-
// startup. Lazy CoW means host phys_footprint is far smaller;
|
|
143
|
-
// bump via TEST_ONLINE_SUPERMACHINE_MEMORY_MIB for memory-hungry suites.
|
|
144
|
-
memoryMib: Number(process.env['TEST_ONLINE_SUPERMACHINE_MEMORY_MIB'] ?? 12288),
|
|
145
|
-
vcpus: Number(process.env['TEST_ONLINE_SUPERMACHINE_VCPUS'] ?? 4),
|
|
146
|
-
cmd: ['sleep', 'infinity'],
|
|
147
|
-
// SKIP_OFFLINE_HOST_HIJACK=1 — image's entrypoint.sh would
|
|
148
|
-
// otherwise redirect *.shopify.com → 127.0.0.1 for offline-mode
|
|
149
|
-
// wiring. Live e2e hits REAL Shopify endpoints; need real DNS.
|
|
150
|
-
env: { SKIP_OFFLINE_HOST_HIJACK: '1' },
|
|
151
|
-
...(platform ? { platform } : {}),
|
|
152
|
-
mounts: [
|
|
153
|
-
// Workspace stays a virtio-fs MOUNT — host edits live in
|
|
154
|
-
// the guest. node_modules moved to a volume below.
|
|
155
|
-
// `guestPath` is required in supermachine 0.7.28+; init-oci
|
|
156
|
-
// auto-mounts at this path in declared order BEFORE warmup
|
|
157
|
-
// fires, so we no longer mount manually in the warmup script.
|
|
158
|
-
{ hostPath: repoRoot, guestTag: 'workspace', guestPath: '/workspace' },
|
|
159
|
-
],
|
|
160
|
-
volumes: [
|
|
161
|
-
// node_modules: virtio-blk volume mounted at /workspace/node_modules.
|
|
162
|
-
// The first volume → /dev/vdb (root is /dev/vda). Warmup formats
|
|
163
|
-
// it on first bake; subsequent restores re-mount it as-is.
|
|
164
|
-
// 4 GiB cap (sparse, only uses what's actually written).
|
|
165
|
-
{
|
|
166
|
-
hostPath: linuxModulesVolume,
|
|
167
|
-
guestPath: '/workspace/node_modules',
|
|
168
|
-
sizeMib: 4096,
|
|
169
|
-
},
|
|
170
|
-
],
|
|
171
|
-
extraFiles: tarballManifestExists
|
|
172
|
-
? [
|
|
173
|
-
// Folded into bake input-hash; any tarball change → manifest
|
|
174
|
-
// bytes change → new snapshot. Guest path is irrelevant
|
|
175
|
-
// beyond not colliding with anything else.
|
|
176
|
-
{ hostPath: tarballManifest, guestPath: '/etc/.shopify-test-tarball-manifest' },
|
|
177
|
-
]
|
|
178
|
-
: [],
|
|
179
|
-
// Warmup runs ONCE per bake; results land in the snapshot, so
|
|
180
|
-
// warm acquires skip all this. Bumping `warmupTag` invalidates
|
|
181
|
-
// the snapshot — bump when changing this block.
|
|
182
|
-
// Tag bumped to v2 for the volume-vs-mount restructure (old v1
|
|
183
|
-
// snapshots are incompatible — different device topology).
|
|
184
|
-
warmupTag: 'live-e2e-v2',
|
|
185
|
-
warmup: async (vm) => {
|
|
186
|
-
const r = await vm.exec({
|
|
187
|
-
argv: ['sh', '-c', `
|
|
188
|
-
set -e
|
|
189
|
-
|
|
190
|
-
# supermachine 0.7.28+ auto-mounts both /workspace
|
|
191
|
-
# (virtio-fs) and /workspace/node_modules (virtio-blk ext4
|
|
192
|
-
# volume) BEFORE warmup fires — no manual mount/format
|
|
193
|
-
# needed here. We keep one defence-in-depth check though:
|
|
194
|
-
# assert /workspace/node_modules is NOT virtiofs. If the
|
|
195
|
-
# volume auto-mount silently failed, /workspace/node_modules
|
|
196
|
-
# would surface the HOST's repo node_modules via the
|
|
197
|
-
# workspace bind, and the rm-rf below would corrupt the
|
|
198
|
-
# @supermachine binary and many other things mid-bake.
|
|
199
|
-
NM_FS=\$(stat -f -c %T /workspace/node_modules 2>/dev/null || stat --file-system --format=%T /workspace/node_modules)
|
|
200
|
-
echo "[volume] /workspace/node_modules filesystem type: \$NM_FS"
|
|
201
|
-
if [ "\$NM_FS" = "virtiofs" ] || [ "\$NM_FS" = "fuse.virtiofs" ]; then
|
|
202
|
-
echo "FATAL: /workspace/node_modules is \$NM_FS — auto-mount broken"
|
|
203
|
-
echo "/proc/mounts:"; grep ' /workspace' /proc/mounts || echo " (no /workspace entries)"
|
|
204
|
-
exit 1
|
|
205
|
-
fi
|
|
206
|
-
|
|
207
|
-
echo "--- repair perms for postgres ---"
|
|
208
|
-
chown -R postgres:postgres /var/lib/postgresql/data
|
|
209
|
-
chmod 700 /var/lib/postgresql/data
|
|
210
|
-
mkdir -p /var/run/postgresql
|
|
211
|
-
chown postgres:postgres /var/run/postgresql
|
|
212
|
-
chmod 775 /var/run/postgresql
|
|
213
|
-
|
|
214
|
-
echo "--- npm install (fresh per rebake) ---"
|
|
215
|
-
# Warmup runs exactly when the snapshot is rebaked — which
|
|
216
|
-
# happens only when the tarball-manifest extraFile changes
|
|
217
|
-
# (= someone ran pack-into.sh) or the warmupTag bumps.
|
|
218
|
-
# Either way we want a fresh install: wipe the volume's
|
|
219
|
-
# node_modules dir first so npm can't reuse stale tarballs.
|
|
220
|
-
cd /workspace
|
|
221
|
-
rm -rf node_modules/* node_modules/.[!.]* 2>/dev/null || true
|
|
222
|
-
# npm gates optionalDependencies by os/cpu automatically,
|
|
223
|
-
# so darwin-arm64-only natives (e.g. @supermachine/core-darwin-arm64)
|
|
224
|
-
# are skipped on Linux without needing --no-optional. Any
|
|
225
|
-
# "notsup os/cpu" failure here means a darwin-only package
|
|
226
|
-
# has snuck into hard "dependencies" — fix it in package.json
|
|
227
|
-
# rather than papering over with --no-optional, since that
|
|
228
|
-
# would also skip genuinely-needed Linux optionals.
|
|
229
|
-
npm install --legacy-peer-deps --engine-strict=false 2>&1 | tail -30
|
|
230
|
-
|
|
231
|
-
echo "--- patch /etc/hosts for localhost ---"
|
|
232
|
-
if ! grep -q "^127.0.0.1.*localhost" /etc/hosts; then
|
|
233
|
-
echo "127.0.0.1 localhost" >> /etc/hosts
|
|
234
|
-
echo "::1 localhost" >> /etc/hosts
|
|
235
|
-
fi
|
|
236
|
-
|
|
237
|
-
echo "--- warmup done ---"
|
|
238
|
-
`],
|
|
239
|
-
timeoutMs: 15 * 60 * 1000,
|
|
240
|
-
});
|
|
241
|
-
// Always print warmup output so silent failures (npm install
|
|
242
|
-
// writing to wrong dir, mounts attaching wrong tag, etc.) are
|
|
243
|
-
// visible.
|
|
244
|
-
console.error(`[runSupermachine.warmup] stdout (${r.stdout.length} bytes):\n${r.stdout.toString()}`);
|
|
245
|
-
if (r.stderr.length > 0) {
|
|
246
|
-
console.error(`[runSupermachine.warmup] stderr (${r.stderr.length} bytes):\n${r.stderr.toString()}`);
|
|
247
|
-
}
|
|
248
|
-
if (r.exitCode !== 0) {
|
|
249
|
-
throw new Error(`warmup failed (exit ${r.exitCode}) — see output above`);
|
|
250
|
-
}
|
|
251
|
-
},
|
|
252
|
-
...imageOpts,
|
|
253
|
-
});
|
|
254
|
-
console.error(`[runSupermachine] bake: ${((performance.now() - tBake) / 1000).toFixed(1)} s`);
|
|
255
|
-
const pool = await image.pool({ min: 1, max: 1, restoreOnRelease: false });
|
|
256
|
-
const vm = await pool.acquire();
|
|
257
|
-
try {
|
|
258
|
-
// Post-restore sanity. supermachine 0.7.28+ captures the
|
|
259
|
-
// auto-mount tree in the snapshot, so /workspace and
|
|
260
|
-
// /workspace/node_modules are already mounted on restore. We
|
|
261
|
-
// just assert + bail if anything's off; same defence-in-depth
|
|
262
|
-
// virtiofs check as the warmup to prevent rm-by-accident if
|
|
263
|
-
// auto-mount layering ever breaks.
|
|
264
|
-
const tMount = performance.now();
|
|
265
|
-
const mountR = await vm.exec({
|
|
266
|
-
argv: ['sh', '-c', `
|
|
267
|
-
mountpoint -q /workspace || { echo "FATAL: /workspace not mounted"; exit 1; }
|
|
268
|
-
mountpoint -q /workspace/node_modules || { echo "FATAL: /workspace/node_modules not mounted"; exit 1; }
|
|
269
|
-
NM_FS=\$(stat -f -c %T /workspace/node_modules 2>/dev/null)
|
|
270
|
-
if [ "\$NM_FS" = "virtiofs" ] || [ "\$NM_FS" = "fuse.virtiofs" ]; then
|
|
271
|
-
echo "FATAL: /workspace/node_modules is \$NM_FS — auto-mount layering broken"
|
|
272
|
-
exit 1
|
|
273
|
-
fi
|
|
274
|
-
ls /workspace/node_modules/@essential-apps/shopify-test-runner/dist/scripts/runTests.js >/dev/null \
|
|
275
|
-
|| { echo "FATAL: runTests.js missing in volume — snapshot/volume out of sync"; ls /workspace/node_modules/@essential-apps 2>&1 | head; exit 1; }
|
|
276
|
-
`],
|
|
277
|
-
timeoutMs: 10_000,
|
|
278
|
-
});
|
|
279
|
-
if (mountR.exitCode !== 0) {
|
|
280
|
-
console.error(`[runSupermachine] mount failed:\n${mountR.stdout.toString()}${mountR.stderr.toString()}`);
|
|
281
|
-
process.exit(1);
|
|
282
|
-
}
|
|
283
|
-
console.error(`[runSupermachine] mounts: ${((performance.now() - tMount) / 1000).toFixed(2)} s`);
|
|
284
|
-
// Postgres startup — fast because warmup already chowned the data dir.
|
|
285
|
-
const tPg = performance.now();
|
|
286
|
-
const pgR = await vm.exec({
|
|
287
|
-
argv: ['sh', '-c', `
|
|
288
|
-
export PGDATA=/var/lib/postgresql/data
|
|
289
|
-
export PG_BIN=/usr/lib/postgresql/14/bin
|
|
290
|
-
# Use pg_isready (actually checks ACCEPT-CONNECTIONS) rather
|
|
291
|
-
# than pg_ctl status (which just checks postmaster.pid exists).
|
|
292
|
-
# The snapshot can capture a stale postmaster.pid file from
|
|
293
|
-
# the bake-time postgres that didn't survive restore, so
|
|
294
|
-
# pg_ctl status returns 0 but pg_isready / actual connections
|
|
295
|
-
# both fail. Always prefer the real readiness probe.
|
|
296
|
-
if su postgres -c "\${PG_BIN}/pg_isready -h 127.0.0.1 -p 5432 -q" >/dev/null 2>&1; then exit 0; fi
|
|
297
|
-
# Postgres isn't actually serving — clean up any stale state
|
|
298
|
-
# from the snapshot and start fresh.
|
|
299
|
-
rm -f \${PGDATA}/postmaster.pid 2>/dev/null || true
|
|
300
|
-
if [ -z "$(ls -A \${PGDATA} 2>/dev/null)" ]; then su postgres -c "\${PG_BIN}/initdb -D \${PGDATA} -A trust" >/dev/null; fi
|
|
301
|
-
su postgres -c "\${PG_BIN}/pg_ctl -D \${PGDATA} -l /tmp/pg.log -o '-h 127.0.0.1 -p 5432' start" >/dev/null
|
|
302
|
-
for _ in $(seq 1 50); do
|
|
303
|
-
if su postgres -c "\${PG_BIN}/pg_isready -h 127.0.0.1 -p 5432" >/dev/null 2>&1; then
|
|
304
|
-
# Create 'root' superuser to match the libkrun image entrypoint
|
|
305
|
-
# — runTests.js connects as 'root'.
|
|
306
|
-
su postgres -c "\${PG_BIN}/createuser -h 127.0.0.1 -p 5432 -s root" 2>&1 | grep -v 'already exists' || true
|
|
307
|
-
exit 0
|
|
308
|
-
fi
|
|
309
|
-
sleep 0.1
|
|
310
|
-
done
|
|
311
|
-
cat /tmp/pg.log
|
|
312
|
-
exit 1
|
|
313
|
-
`],
|
|
314
|
-
timeoutMs: 30_000,
|
|
315
|
-
});
|
|
316
|
-
if (pgR.exitCode !== 0) {
|
|
317
|
-
console.error('[runSupermachine] postgres start failed:', pgR.stderr.toString());
|
|
318
|
-
process.exit(1);
|
|
319
|
-
}
|
|
320
|
-
console.error(`[runSupermachine] postgres: ${((performance.now() - tPg) / 1000).toFixed(2)} s`);
|
|
321
|
-
// Xvfb: snapshot/restore preserves /tmp/.X11-unix/X99 (socket
|
|
322
|
-
// file) AND /tmp/.X99-lock (lock file). After restore, the
|
|
323
|
-
// entrypoint's `Xvfb :99 &` call refuses to start ("server :99
|
|
324
|
-
// already in use") because the stale lock is present — but the
|
|
325
|
-
// STALE SOCKET file is also there, so a `[ -e socket ]` check
|
|
326
|
-
// passes spuriously and Chrome gets "Missing X server or
|
|
327
|
-
// $DISPLAY" when it tries to actually connect. Same failure
|
|
328
|
-
// mode we hit in runSupermachineAuth.ts; same fix: kill any
|
|
329
|
-
// existing Xvfb, remove the stale lock/socket, start fresh.
|
|
330
|
-
// Always start Xvfb — storePool launches HEADED chromium (matches
|
|
331
|
-
// captureAuth's fingerprint for cf_clearance carryover), and
|
|
332
|
-
// headed chromium needs an X server regardless of arch.
|
|
333
|
-
const needsXvfb = true;
|
|
334
|
-
if (needsXvfb) {
|
|
335
|
-
const tXvfb = performance.now();
|
|
336
|
-
const xR = await vm.exec({
|
|
337
|
-
argv: ['bash', '-c', `
|
|
338
|
-
# pkill -x (process-name exact match) — NOT pkill -f, which
|
|
339
|
-
# would also match the script's own argv and kill ourselves.
|
|
340
|
-
pkill -x Xvfb 2>/dev/null || true
|
|
341
|
-
rm -f /tmp/.X11-unix/X99 /tmp/.X99-lock
|
|
342
|
-
# -ac: no Xauthority required (other vm.exec / Playwright
|
|
343
|
-
# processes can connect without the cookie context from
|
|
344
|
-
# the start). Background via nohup + & so the daemon
|
|
345
|
-
# outlives this exec call.
|
|
346
|
-
nohup Xvfb :99 -screen 0 1600x1000x24 -nolisten tcp -ac \
|
|
347
|
-
>/var/log/xvfb.log 2>&1 &
|
|
348
|
-
for _ in $(seq 1 150); do
|
|
349
|
-
[ -e /tmp/.X11-unix/X99 ] && echo ready && exit 0
|
|
350
|
-
sleep 0.1
|
|
351
|
-
done
|
|
352
|
-
echo "Xvfb did not bind /tmp/.X11-unix/X99 within 15s"
|
|
353
|
-
cat /var/log/xvfb.log
|
|
354
|
-
exit 1
|
|
355
|
-
`],
|
|
356
|
-
timeoutMs: 30_000,
|
|
357
|
-
});
|
|
358
|
-
if (xR.exitCode !== 0) {
|
|
359
|
-
console.error(`[runSupermachine] Xvfb wait failed: ${xR.stderr.toString()}`);
|
|
360
|
-
process.exit(1);
|
|
361
|
-
}
|
|
362
|
-
console.error(`[runSupermachine] Xvfb: ${((performance.now() - tXvfb) / 1000).toFixed(2)} s (${xR.stdout.toString().trim()})`);
|
|
363
|
-
}
|
|
364
|
-
// Forward a curated env subset into the test process. Anything
|
|
365
|
-
// beyond this is intentionally not visible to the in-VM Node
|
|
366
|
-
// (hermetic, same policy as runTests.js itself).
|
|
367
|
-
const forwardEnv = {};
|
|
368
|
-
for (const k of [
|
|
369
|
-
'TEST_VISIBLE',
|
|
370
|
-
'TEST_WORKERS',
|
|
371
|
-
'TEST_PRESERVE_DB',
|
|
372
|
-
// TEST_ONLINE_STORE_CLEANUP_URL / TEST_ONLINE_CLEANUP_SECRET intentionally not
|
|
373
|
-
// forwarded — runTests.ts generates the secret per-run and
|
|
374
|
-
// builds the URL from devAppUrl. Forwarding stale values from
|
|
375
|
-
// .env.test would override that.
|
|
376
|
-
'TEST_OFFLINE_STRICT_GRAPHQL',
|
|
377
|
-
// TEST_FORCE_REAL_CHROME: storePool flips chromium.launch to
|
|
378
|
-
// `channel: 'chrome'` (real Google Chrome amd64 installed in
|
|
379
|
-
// the libkrun-style image). Set this together with
|
|
380
|
-
// TEST_ONLINE_SUPERMACHINE_IMAGE=…shopify-test:latest +
|
|
381
|
-
// TEST_ONLINE_SUPERMACHINE_PLATFORM=linux/amd64.
|
|
382
|
-
'TEST_FORCE_REAL_CHROME',
|
|
383
|
-
// PLAYWRIGHT_GREP narrows the test set inside the VM. runTests.ts
|
|
384
|
-
// reads this and forwards as `playwright test --grep`. Without
|
|
385
|
-
// this passthrough, an env var the user sets on the host invocation
|
|
386
|
-
// would silently get dropped and the whole suite would run.
|
|
387
|
-
'PLAYWRIGHT_GREP',
|
|
388
|
-
'CI',
|
|
389
|
-
'DEBUG',
|
|
390
|
-
]) {
|
|
391
|
-
const v = process.env[k];
|
|
392
|
-
if (v !== undefined)
|
|
393
|
-
forwardEnv[k] = v;
|
|
394
|
-
}
|
|
395
|
-
// Mark we're inside the test container — storePool reads this to
|
|
396
|
-
// adjust chromium launch flags.
|
|
397
|
-
forwardEnv['TEST_IN_CONTAINER'] = 'true';
|
|
398
|
-
// Wire DISPLAY for headed Chrome. Matches the Xvfb start above.
|
|
399
|
-
if (needsXvfb)
|
|
400
|
-
forwardEnv['DISPLAY'] = ':99';
|
|
401
|
-
// Spawn the test runner. Streaming stdout/stderr via spawn so
|
|
402
|
-
// the user sees Playwright output as it lands rather than at end.
|
|
403
|
-
console.error('[runSupermachine] launching runTests.js…');
|
|
404
|
-
const tTests = performance.now();
|
|
405
|
-
const testProc = await vm.spawn({
|
|
406
|
-
argv: ['sh', '-c', `
|
|
407
|
-
cd /workspace
|
|
408
|
-
# node_modules/.bin on PATH so test code can shell out to
|
|
409
|
-
# local CLIs (shopify, prisma, playwright). Matches the
|
|
410
|
-
# libkrun image's entrypoint.sh.
|
|
411
|
-
export PATH=/workspace/node_modules/.bin:$PATH
|
|
412
|
-
# Merge stderr → stdout so the stall guard sees Node errors
|
|
413
|
-
# (which Node writes to stderr) and surfaces them to the
|
|
414
|
-
# operator instead of dying silently after the stall timeout.
|
|
415
|
-
exec node --env-file=.env.test node_modules/@essential-apps/shopify-test-runner/dist/scripts/runTests.js 2>&1
|
|
416
|
-
`],
|
|
417
|
-
env: forwardEnv,
|
|
418
|
-
});
|
|
419
|
-
// Stream + collect output. Hard 10-min cap by default, with a
|
|
420
|
-
// 60 s no-output stall guard (mirrors the offline-full bench's
|
|
421
|
-
// proven pattern for live processes).
|
|
422
|
-
const maxMs = Number(process.env['TEST_ONLINE_SUPERMACHINE_TIMEOUT_MS'] ?? 10 * 60 * 1000);
|
|
423
|
-
// Stall guard: kill the test process if no output for N seconds.
|
|
424
|
-
// Default 60s; bump via TEST_ONLINE_SUPERMACHINE_STALL_MS. amd64+Rosetta
|
|
425
|
-
// can take >60s for Vite/Remix initial compile so bump for that
|
|
426
|
-
// path explicitly.
|
|
427
|
-
const stallMs = Number(process.env['TEST_ONLINE_SUPERMACHINE_STALL_MS'] ??
|
|
428
|
-
(platform === 'linux/amd64' ? 300_000 : 60_000));
|
|
429
|
-
const start = Date.now();
|
|
430
|
-
let lastByteAt = Date.now();
|
|
431
|
-
while (true) {
|
|
432
|
-
const out = await testProc.readStdout(64 * 1024);
|
|
433
|
-
const now = Date.now();
|
|
434
|
-
if (out.length === 0) {
|
|
435
|
-
if (now - start > maxMs) {
|
|
436
|
-
console.error(`\n[runSupermachine] HARD TIMEOUT ${maxMs / 1000}s — killing`);
|
|
437
|
-
await testProc.signal(15).catch(() => { });
|
|
438
|
-
break;
|
|
439
|
-
}
|
|
440
|
-
if (now - lastByteAt > stallMs) {
|
|
441
|
-
console.error(`\n[runSupermachine] no output for ${stallMs / 1000}s — killing`);
|
|
442
|
-
await testProc.signal(15).catch(() => { });
|
|
443
|
-
break;
|
|
444
|
-
}
|
|
445
|
-
await new Promise((r) => setTimeout(r, 200));
|
|
446
|
-
continue;
|
|
447
|
-
}
|
|
448
|
-
lastByteAt = now;
|
|
449
|
-
process.stdout.write(out);
|
|
450
|
-
// Playwright summary lines look like " 17 passed (45.6s)" or
|
|
451
|
-
// " 3 failed". Once we see one, drain the tail and break.
|
|
452
|
-
if (/\b\d+ (passed|failed)\b/.test(out.toString())) {
|
|
453
|
-
await new Promise((r) => setTimeout(r, 500));
|
|
454
|
-
const tail = await testProc.readStdout(64 * 1024);
|
|
455
|
-
if (tail.length > 0)
|
|
456
|
-
process.stdout.write(tail);
|
|
457
|
-
break;
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
const wait = await testProc.wait();
|
|
461
|
-
console.error(`[runSupermachine] tests: ${((performance.now() - tTests) / 1000).toFixed(1)} s`);
|
|
462
|
-
console.error(`[runSupermachine] grand: ${((performance.now() - tBake) / 1000).toFixed(1)} s`);
|
|
463
|
-
process.exit(wait.exitCode ?? 0);
|
|
464
|
-
}
|
|
465
|
-
finally {
|
|
466
|
-
await vm.release().catch(() => { });
|
|
467
|
-
await pool.shutdown().catch(() => { });
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
main().catch((err) => {
|
|
471
|
-
console.error(err);
|
|
472
|
-
process.exit(1);
|
|
473
|
-
});
|
|
474
|
-
//# sourceMappingURL=runSupermachine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runSupermachine.js","sourceRoot":"","sources":["../../src/scripts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