fix: remove name field from Cloud Run create body (v2 API requires empty)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-19 15:59:12 -08:00
parent c68152d999
commit 97df21883b

View File

@@ -65,8 +65,8 @@ export async function provisionTheiaWorkspace(
const token = await getAccessToken(); const token = await getAccessToken();
const serviceName = `theia-${slug}`.slice(0, 49); // Cloud Run max 49 chars const serviceName = `theia-${slug}`.slice(0, 49); // Cloud Run max 49 chars
// Cloud Run v2: name must be empty in the body — it's passed via ?serviceId= in the URL
const serviceBody = { const serviceBody = {
name: `${CLOUD_RUN_API}/${serviceName}`,
template: { template: {
scaling: { scaling: {
minInstanceCount: 0, // scale to zero when idle minInstanceCount: 0, // scale to zero when idle