The cluster never ran Theia or the IDE gateway, so every workspace stayed "未配置" forever. The feature is gone instead of half-present: - API: workspace, launch and lifecycle endpoints, the gateway identity and its internal routes, the dispatcher's workspace provisioning and the lifecycle worker. Migration 003 deletes stored workspaces and settles their pending outbox items. - Provisioner: workspace provisioning and lifecycle for both backends. - Web: the 云 IDE panel, the launch route, the start-branch picker that listed IDE branches, and the workspace count on usage. - apps/ide, infra/oct, dev:ide and the CI job; IDE parts of local k3s, network policies, RBAC, docs and the architecture diagram. A wish can still start from a pushed branch through the API (sourceBranch). Plan files and stored entitlements may still carry maxWorkspaces; it is accepted and ignored. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
92 lines
2.5 KiB
JavaScript
92 lines
2.5 KiB
JavaScript
import assert from 'node:assert/strict';
|
|
import { spawnSync } from 'node:child_process';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
const compose = fileURLToPath(new URL('../compose.yaml', import.meta.url));
|
|
const dockerArgs = process.env.WF_DOCKER_CONTEXT ? ['--context', process.env.WF_DOCKER_CONTEXT] : [];
|
|
function docker(...args) {
|
|
const result = spawnSync('docker', [...dockerArgs, 'compose', '-f', compose, ...args], {
|
|
encoding: 'utf8',
|
|
timeout: 30000,
|
|
});
|
|
if (result.status !== 0) throw new Error(result.stderr || result.error?.message || `docker exited ${result.status}`);
|
|
return result.stdout;
|
|
}
|
|
async function get(url) {
|
|
const response = await fetch(url, { signal: AbortSignal.timeout(10000) });
|
|
assert.equal(response.status, 200, `${url}: expected 200, got ${response.status}`);
|
|
return response;
|
|
}
|
|
const checks = [
|
|
[
|
|
'postgres',
|
|
async () =>
|
|
assert.match(
|
|
docker(
|
|
'exec',
|
|
'-T',
|
|
'postgres',
|
|
'psql',
|
|
'-U',
|
|
'wishforge',
|
|
'-d',
|
|
'wishforge',
|
|
'-Atc',
|
|
'SELECT current_database()',
|
|
),
|
|
/^wishforge\s*$/,
|
|
),
|
|
],
|
|
[
|
|
'temporal gRPC',
|
|
async () =>
|
|
assert.match(
|
|
docker('exec', '-T', 'temporal', 'temporal', 'operator', 'cluster', 'health', '--address', '127.0.0.1:7233'),
|
|
/SERVING/,
|
|
),
|
|
],
|
|
[
|
|
'temporal UI',
|
|
async () => {
|
|
await get('http://127.0.0.1:8233');
|
|
},
|
|
],
|
|
[
|
|
'OIDC discovery',
|
|
async () => {
|
|
const metadata = await (
|
|
await get('http://127.0.0.1:4100/realms/wishforge/.well-known/openid-configuration')
|
|
).json();
|
|
assert.equal(metadata.issuer, 'http://127.0.0.1:4100/realms/wishforge');
|
|
assert.ok(metadata.code_challenge_methods_supported.includes('S256'));
|
|
assert.equal(metadata.authorization_response_iss_parameter_supported, true);
|
|
},
|
|
],
|
|
[
|
|
'S3 health',
|
|
async () => {
|
|
await get('http://127.0.0.1:49000/minio/health/ready');
|
|
},
|
|
],
|
|
[
|
|
'registry v2',
|
|
async () => {
|
|
await get('http://127.0.0.1:45000/v2/');
|
|
},
|
|
],
|
|
];
|
|
let failed = 0;
|
|
for (const [name, check] of checks) {
|
|
try {
|
|
await check();
|
|
console.log(`PASS ${name}`);
|
|
} catch (error) {
|
|
failed++;
|
|
console.error(`FAIL ${name}: ${error.message}`);
|
|
}
|
|
}
|
|
console.log(
|
|
`${checks.length - failed}/${checks.length} infrastructure checks passed. These checks do not verify production isolation or desktop-client OAuth.`,
|
|
);
|
|
process.exitCode = failed ? 1 : 0;
|