@specific.dev/spectest 0.131.12 → 0.131.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/components/android.js +2 -1
- package/dist/components/aws.d.ts +1 -1
- package/dist/components/aws.js +2 -1
- package/dist/components/electron.js +2 -1
- package/dist/components/email.js +2 -1
- package/dist/components/emulate/service.js +2 -1
- package/dist/components/expo.js +4 -3
- package/dist/components/k3s.js +5 -4
- package/dist/components/postgres.js +3 -2
- package/dist/components/supabase-pooler.js +2 -1
- package/dist/components/supabase.js +12 -11
- package/dist/components/temporal.js +3 -2
- package/dist/daemon.js +50 -17
- package/dist/harness/built-image.d.ts +12 -0
- package/dist/harness/built-image.js +13 -0
- package/dist/harness/builtin-images.d.ts +29 -0
- package/dist/harness/builtin-images.js +29 -0
- package/dist/harness/component-images.d.ts +7 -0
- package/dist/harness/component-images.js +12 -1
- package/dist/harness/registry-seed.d.ts +1 -1
- package/dist/harness/registry-seed.js +2 -1
- package/dist/harness/sticky-consumer.js +6 -0
- package/dist/harness/sticky-kubernetes.js +12 -0
- package/package.json +1 -1
- package/src/components/android.ts +2 -1
- package/src/components/aws.ts +2 -1
- package/src/components/electron.test.ts +2 -0
- package/src/components/electron.ts +2 -1
- package/src/components/email.ts +2 -1
- package/src/components/emulate/service.ts +2 -1
- package/src/components/expo.test.ts +2 -2
- package/src/components/expo.ts +5 -4
- package/src/components/image-pins.test.ts +44 -0
- package/src/components/k3s.ts +5 -4
- package/src/components/postgres.ts +3 -2
- package/src/components/supabase-pooler.ts +2 -1
- package/src/components/supabase.ts +12 -11
- package/src/components/temporal.ts +3 -2
- package/src/daemon.ts +48 -16
- package/src/harness/built-image-docker.test.ts +62 -0
- package/src/harness/built-image.ts +14 -0
- package/src/harness/builtin-images.ts +29 -0
- package/src/harness/component-images.test.ts +19 -1
- package/src/harness/component-images.ts +15 -1
- package/src/harness/registry-seed.ts +2 -1
- package/src/harness/sticky-consumer.ts +6 -0
- package/src/harness/sticky-kubernetes.test.ts +23 -0
- package/src/harness/sticky-kubernetes.ts +12 -0
|
@@ -119,6 +119,10 @@ export async function openKubernetesCacheMaintenance(run: CacheCommand, root = R
|
|
|
119
119
|
throw error;
|
|
120
120
|
});
|
|
121
121
|
try {
|
|
122
|
+
// A successful inventory distinguishes orphaned legacy stores from Docker
|
|
123
|
+
// outages. Only this isolated maintenance copy may discard a store.
|
|
124
|
+
const available = new Set((await run("docker", ["image", "ls", "-aq", "--no-trunc"]))
|
|
125
|
+
.split(/\s+/).filter(Boolean));
|
|
122
126
|
for (const service of entries) {
|
|
123
127
|
if (!service.isDirectory() || !SERVICE_NAME.test(service.name)) continue;
|
|
124
128
|
for (const layout of await readdir(`${root}/${service.name}`, { withFileTypes: true })) {
|
|
@@ -128,6 +132,14 @@ export async function openKubernetesCacheMaintenance(run: CacheCommand, root = R
|
|
|
128
132
|
if (descriptor.schema !== 1 || !IMAGE_ID.test(descriptor.image) || !Number.isSafeInteger(descriptor.updatedAt)) {
|
|
129
133
|
throw new Error(`invalid Kubernetes cache descriptor: ${directory}`);
|
|
130
134
|
}
|
|
135
|
+
if (!available.has(descriptor.image)) {
|
|
136
|
+
// Older exporters replaced their sole image reference on rebuild.
|
|
137
|
+
// An obsolete version's store can outlive that image. It is disposable
|
|
138
|
+
// cache, and must not prevent publishing the healthy stores.
|
|
139
|
+
console.warn(`Discarding orphaned Kubernetes cache ${directory}: missing runtime image ${descriptor.image}`);
|
|
140
|
+
await run("rm", ["-rf", directory]);
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
131
143
|
const container = `spectest-k8s-cache-${randomUUID()}`;
|
|
132
144
|
await run("docker", ["run", "-d", "--name", container, "--network", "none", "--privileged", "--stop-signal", "SIGTERM", "--tmpfs", "/run", "--tmpfs", "/var/run",
|
|
133
145
|
"--mount", `type=bind,source=${directory}/containerd,target=${STORE_TARGET}`,
|