@caelo-cms/provisioning 0.12.17 → 0.12.19
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/agent-db.js +2340 -301
- package/dist/infra-contract.d.ts +1 -1
- package/dist/infra-contract.d.ts.map +1 -1
- package/dist/infra-contract.js +10 -1
- package/dist/infra-contract.js.map +1 -1
- package/dist/reporting-job-catalog.d.ts +25 -2
- package/dist/reporting-job-catalog.d.ts.map +1 -1
- package/dist/reporting-job-catalog.js +19 -0
- package/dist/reporting-job-catalog.js.map +1 -1
- package/dist/reporting-job-setup.d.ts.map +1 -1
- package/dist/reporting-job-setup.js +41 -35
- package/dist/reporting-job-setup.js.map +1 -1
- package/dist/stack-contract.d.ts +13 -10
- package/dist/stack-contract.d.ts.map +1 -1
- package/dist/stack-contract.js +12 -9
- package/dist/stack-contract.js.map +1 -1
- package/dist/upgrade/admin-image-jobs.d.ts.map +1 -1
- package/dist/upgrade/admin-image-jobs.js +10 -6
- package/dist/upgrade/admin-image-jobs.js.map +1 -1
- package/dist/wizards/gcp-cost.d.ts.map +1 -1
- package/dist/wizards/gcp-cost.js +10 -2
- package/dist/wizards/gcp-cost.js.map +1 -1
- package/package.json +2 -2
- package/src/admin-memory.test.ts +34 -28
- package/src/infra-contract.test.ts +4 -3
- package/src/infra-contract.ts +10 -1
- package/src/reporting-job-catalog.test.ts +12 -3
- package/src/reporting-job-catalog.ts +51 -2
- package/src/reporting-job-setup.test.ts +27 -0
- package/src/reporting-job-setup.ts +40 -34
- package/src/stack-contract.test.ts +8 -0
- package/src/stack-contract.ts +13 -10
- package/src/stack-converge.test.ts +1 -1
- package/src/upgrade/admin-image-jobs.ts +14 -6
- package/src/wizards/gcp-cost.ts +11 -2
|
@@ -502,4 +502,31 @@ describe("the plugin batch job (#1646)", () => {
|
|
|
502
502
|
expect(flag(deploy, "set-env-vars")).toBe("CAELO_PROVIDER=gcp");
|
|
503
503
|
expect(flag(deploy, "max-retries")).toBe("0");
|
|
504
504
|
});
|
|
505
|
+
|
|
506
|
+
it("#1776 — deploys its M and L machines as jobs of their own: same account, env and the admin's start-only rights", async () => {
|
|
507
|
+
const { run, calls } = fakeGcloud();
|
|
508
|
+
const r = await ensurePluginBatchJob(TARGET, { run, sleep: async () => {} });
|
|
509
|
+
expect(r.ok).toBe(true);
|
|
510
|
+
const deploys = calls.filter((c) => c.slice(0, 3).join(" ") === "run jobs deploy");
|
|
511
|
+
expect(deploys.map((d) => [d[3], flag(d, "cpu"), flag(d, "memory")])).toEqual([
|
|
512
|
+
["caelo-production-plugin-batch", "1", "2Gi"],
|
|
513
|
+
["caelo-production-plugin-batch-m", "2", "4Gi"],
|
|
514
|
+
["caelo-production-plugin-batch-l", "4", "16Gi"],
|
|
515
|
+
]);
|
|
516
|
+
for (const d of deploys) {
|
|
517
|
+
expect(flag(d, "service-account")).toBe(BATCH_SA);
|
|
518
|
+
expect(flag(d, "set-env-vars")).toBe("CAELO_PROVIDER=gcp");
|
|
519
|
+
}
|
|
520
|
+
const admin = grants(calls).filter((g) => g.member === ADMIN_SA);
|
|
521
|
+
expect(admin.map((g) => `${g.where} ${g.role}`)).toEqual(
|
|
522
|
+
[
|
|
523
|
+
"caelo-production-plugin-batch",
|
|
524
|
+
"caelo-production-plugin-batch-m",
|
|
525
|
+
"caelo-production-plugin-batch-l",
|
|
526
|
+
].flatMap((job) => [
|
|
527
|
+
`run jobs add-iam-policy-binding ${job} roles/run.jobsExecutorWithOverrides`,
|
|
528
|
+
`run jobs add-iam-policy-binding ${job} roles/run.viewer`,
|
|
529
|
+
]),
|
|
530
|
+
);
|
|
531
|
+
});
|
|
505
532
|
});
|
|
@@ -267,46 +267,52 @@ export async function ensureReportingJob(
|
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
// 7. The job: the admin image, its own
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
`--region=${region}`,
|
|
278
|
-
project,
|
|
279
|
-
`--service-account=${sa}`,
|
|
280
|
-
"--command=bun",
|
|
281
|
-
`--args=--bun,${REPORTING_JOB_SCRIPT}`,
|
|
282
|
-
`--set-env-vars=${spec.env.join(",")}`,
|
|
283
|
-
// The backstop restarts a dead attempt with a fresh token; a Cloud Run
|
|
284
|
-
// retry would replay the old one.
|
|
285
|
-
"--max-retries=0",
|
|
286
|
-
`--task-timeout=${spec.taskTimeoutSeconds}s`,
|
|
287
|
-
`--cpu=${spec.cpu}`,
|
|
288
|
-
`--memory=${spec.memory}`,
|
|
289
|
-
"--quiet",
|
|
290
|
-
]);
|
|
291
|
-
if (!deploy.ok) return fail(`deploy job ${spec.jobName}`, deploy);
|
|
292
|
-
done.push(`job ${spec.jobName} (${target.adminImageRef.split("@")[1]?.slice(0, 19)}...)`);
|
|
293
|
-
|
|
294
|
-
// 8. The admin may run it with each attempt's order and read its executions.
|
|
295
|
-
for (const role of ["roles/run.jobsExecutorWithOverrides", "roles/run.viewer"]) {
|
|
296
|
-
const r = await retry([
|
|
270
|
+
// 7. The job, and its larger machines (#1776): the admin image, its own
|
|
271
|
+
// SA, no secrets, no VPC.
|
|
272
|
+
for (const machine of [
|
|
273
|
+
{ jobName: spec.jobName, cpu: spec.cpu, memory: spec.memory },
|
|
274
|
+
...spec.machines,
|
|
275
|
+
]) {
|
|
276
|
+
const deploy = await run([
|
|
297
277
|
"run",
|
|
298
278
|
"jobs",
|
|
299
|
-
"
|
|
300
|
-
|
|
279
|
+
"deploy",
|
|
280
|
+
machine.jobName,
|
|
281
|
+
`--image=${target.adminImageRef}`,
|
|
301
282
|
`--region=${region}`,
|
|
302
283
|
project,
|
|
303
|
-
`--
|
|
304
|
-
|
|
284
|
+
`--service-account=${sa}`,
|
|
285
|
+
"--command=bun",
|
|
286
|
+
`--args=--bun,${REPORTING_JOB_SCRIPT}`,
|
|
287
|
+
`--set-env-vars=${spec.env.join(",")}`,
|
|
288
|
+
// The backstop restarts a dead attempt with a fresh token; a Cloud Run
|
|
289
|
+
// retry would replay the old one.
|
|
290
|
+
"--max-retries=0",
|
|
291
|
+
`--task-timeout=${spec.taskTimeoutSeconds}s`,
|
|
292
|
+
`--cpu=${machine.cpu}`,
|
|
293
|
+
`--memory=${machine.memory}`,
|
|
305
294
|
"--quiet",
|
|
306
|
-
"--format=none",
|
|
307
295
|
]);
|
|
308
|
-
if (!
|
|
309
|
-
done.push(`
|
|
296
|
+
if (!deploy.ok) return fail(`deploy job ${machine.jobName}`, deploy);
|
|
297
|
+
done.push(`job ${machine.jobName} (${target.adminImageRef.split("@")[1]?.slice(0, 19)}...)`);
|
|
298
|
+
|
|
299
|
+
// 8. The admin may run it with each attempt's order and read its executions.
|
|
300
|
+
for (const role of ["roles/run.jobsExecutorWithOverrides", "roles/run.viewer"]) {
|
|
301
|
+
const r = await retry([
|
|
302
|
+
"run",
|
|
303
|
+
"jobs",
|
|
304
|
+
"add-iam-policy-binding",
|
|
305
|
+
machine.jobName,
|
|
306
|
+
`--region=${region}`,
|
|
307
|
+
project,
|
|
308
|
+
`--member=${runSaMember}`,
|
|
309
|
+
`--role=${role}`,
|
|
310
|
+
"--quiet",
|
|
311
|
+
"--format=none",
|
|
312
|
+
]);
|
|
313
|
+
if (!r.ok) return fail(`grant the admin ${role} on ${machine.jobName}`, r);
|
|
314
|
+
done.push(`admin: ${role} on ${machine.jobName}`);
|
|
315
|
+
}
|
|
310
316
|
}
|
|
311
317
|
return { ok: true, done, serviceAccount: sa };
|
|
312
318
|
}
|
|
@@ -129,6 +129,10 @@ describe("adminEnvContract", () => {
|
|
|
129
129
|
CAELO_COLLECTION_INDEX_SERVICE_ACCOUNT: "caelo-production-index@acme.iam.gserviceaccount.com",
|
|
130
130
|
CAELO_PLUGIN_BATCH_JOB:
|
|
131
131
|
"projects/acme/locations/europe-west1/jobs/caelo-production-plugin-batch",
|
|
132
|
+
CAELO_PLUGIN_BATCH_JOB_M:
|
|
133
|
+
"projects/acme/locations/europe-west1/jobs/caelo-production-plugin-batch-m",
|
|
134
|
+
CAELO_PLUGIN_BATCH_JOB_L:
|
|
135
|
+
"projects/acme/locations/europe-west1/jobs/caelo-production-plugin-batch-l",
|
|
132
136
|
CAELO_PLUGIN_BATCH_SERVICE_ACCOUNT:
|
|
133
137
|
"caelo-production-plugin-batch@acme.iam.gserviceaccount.com",
|
|
134
138
|
CAELO_COLLECTIONS_STAGING_STORE: "gs://acme-caelo-production-coll-staging",
|
|
@@ -202,6 +206,10 @@ describe("adminEnvContract", () => {
|
|
|
202
206
|
CAELO_COLLECTION_INDEX_SERVICE_ACCOUNT: "caelo-production-index@acme.iam.gserviceaccount.com",
|
|
203
207
|
CAELO_PLUGIN_BATCH_JOB:
|
|
204
208
|
"projects/acme/locations/europe-west1/jobs/caelo-production-plugin-batch",
|
|
209
|
+
CAELO_PLUGIN_BATCH_JOB_M:
|
|
210
|
+
"projects/acme/locations/europe-west1/jobs/caelo-production-plugin-batch-m",
|
|
211
|
+
CAELO_PLUGIN_BATCH_JOB_L:
|
|
212
|
+
"projects/acme/locations/europe-west1/jobs/caelo-production-plugin-batch-l",
|
|
205
213
|
CAELO_PLUGIN_BATCH_SERVICE_ACCOUNT:
|
|
206
214
|
"caelo-production-plugin-batch@acme.iam.gserviceaccount.com",
|
|
207
215
|
CAELO_COLLECTIONS_STAGING_STORE: "gs://acme-caelo-production-coll-staging",
|
package/src/stack-contract.ts
CHANGED
|
@@ -2216,16 +2216,19 @@ export const ADMIN_MEMORY_DEFAULT = "2Gi";
|
|
|
2216
2216
|
* suggest and read answer from collection index files the gateway keeps
|
|
2217
2217
|
* parsed in memory (`CAELO_COLLECTIONS_CACHE_MB`,
|
|
2218
2218
|
* COLLECTIONS_CACHE_MB_DEFAULT), and a search by meaning embeds the query
|
|
2219
|
-
* with a model the gateway loads itself
|
|
2220
|
-
*
|
|
2221
|
-
*
|
|
2222
|
-
*
|
|
2223
|
-
*
|
|
2224
|
-
*
|
|
2225
|
-
*
|
|
2226
|
-
* (
|
|
2227
|
-
|
|
2228
|
-
|
|
2219
|
+
* with a model the gateway loads itself (@caelo-cms/shared
|
|
2220
|
+
* gateway-memory.ts). On 2026-11-26 (#1745) a searchVIU gateway with 1 GiB
|
|
2221
|
+
* was lost in the middle of its first semantic search, and #1747 raised it
|
|
2222
|
+
* to 2 GiB; #1777 removed the causes (the model's load is a third of what
|
|
2223
|
+
* it was, the cache bound counts parsed bytes), so 1 GiB holds the model's
|
|
2224
|
+
* peak and a full cache with a quarter to spare. `upgrade` raises a Google
|
|
2225
|
+
* Cloud gateway below it and never lowers a larger value
|
|
2226
|
+
* (stack-converge.ts planServiceMemory): an install #1747 raised to 2 GiB
|
|
2227
|
+
* keeps it. The Azure stack sizes its gateway app from it, and the AWS
|
|
2228
|
+
* stack defines no gateway task yet (#749). Request-billed, so it costs
|
|
2229
|
+
* memory only while a request runs.
|
|
2230
|
+
*/
|
|
2231
|
+
export const GATEWAY_MEMORY_DEFAULT = "1Gi";
|
|
2229
2232
|
|
|
2230
2233
|
/** The memory upgrade raises each Cloud Run service to (null: the stacks' alone). */
|
|
2231
2234
|
export const SERVICE_MEMORY_FLOOR: Readonly<Record<CloudRunSlug, string | null>> = {
|
|
@@ -348,7 +348,7 @@ describe("planContractEnv", () => {
|
|
|
348
348
|
// and gate key onto an install that predates it.
|
|
349
349
|
expect(plan.services.admin.flags).toEqual([
|
|
350
350
|
// #1329 — and the staging database's pool onto one that predates it.
|
|
351
|
-
"--update-env-vars=PUBLIC_STAGING_ADMIN_DATABASE_URL=postgresql://admin_role@db1.p-label.europe-west1.sql-psa.goog:5432/cms_public_staging?sslmode=verify-full&sslrootcert=/etc/caelo/db-ca/cloudsql-global.pem,CAELO_SITE_URL=https://acme.com,MEDIA_ROOT_DIR=/app/apps/admin/data/media,CAELO_MCP_IAP_SERVICE_ACCOUNT=caelo-mcp@acme.iam.gserviceaccount.com,CAELO_OPERATOR_ACCESS_JOB=projects/acme/locations/europe-west1/jobs/caelo-production-operator-access-sync,CAELO_UPGRADER_JOB=projects/acme/locations/europe-west1/jobs/caelo-production-upgrader,CAELO_CONVERGE_JOB=projects/acme/locations/europe-west1/jobs/caelo-production-converge,CAELO_AUDIT_JOB=projects/acme/locations/europe-west1/jobs/caelo-production-audit,CAELO_AUDIT_RESULTS_BUCKET=acme-caelo-production-audit-results,CAELO_CAPTURE_JOB=projects/acme/locations/europe-west1/jobs/caelo-production-capture,CAELO_CAPTURE_BUCKET=acme-caelo-production-capture,CAELO_MEDIA_BUCKET=acme-caelo-production-media,CAELO_AUDIT_RUNNER_JOB=projects/acme/locations/europe-west1/jobs/caelo-production-audit-run,CAELO_AUDIT_RUNNER_SERVICE_ACCOUNT=caelo-production-audit-run@acme.iam.gserviceaccount.com,CAELO_IMPORT_CRAWL_JOB=projects/acme/locations/europe-west1/jobs/caelo-production-import,CAELO_IMPORT_CRAWL_SERVICE_ACCOUNT=caelo-production-import@acme.iam.gserviceaccount.com,CAELO_BUILD_CARRIER_JOB=projects/acme/locations/europe-west1/jobs/caelo-production-build,CAELO_BUILD_CARRIER_SERVICE_ACCOUNT=caelo-production-build@acme.iam.gserviceaccount.com,CAELO_COLLECTION_INDEX_JOB=projects/acme/locations/europe-west1/jobs/caelo-production-index,CAELO_COLLECTION_INDEX_SERVICE_ACCOUNT=caelo-production-index@acme.iam.gserviceaccount.com,CAELO_PLUGIN_BATCH_JOB=projects/acme/locations/europe-west1/jobs/caelo-production-plugin-batch,CAELO_PLUGIN_BATCH_SERVICE_ACCOUNT=caelo-production-plugin-batch@acme.iam.gserviceaccount.com,CAELO_COLLECTIONS_STAGING_STORE=gs://acme-caelo-production-coll-staging,CAELO_COLLECTIONS_LIVE_STORE=gs://acme-caelo-production-coll-live,CAELO_SCHEDULER_SERVICE_ACCOUNT=caelo-production-scheduler@acme.iam.gserviceaccount.com,CAELO_OPERATOR_OAUTH_CLIENT_STORE=projects/acme/secrets/caelo-production-operator-oauth-client,CAELO_VISITOR_AI_KEY_STORE=projects/acme/secrets/caelo-production-visitor-ai-key,CAELO_VISITOR_AI_STAGING_KEY_STORE=projects/acme/secrets/caelo-production-visitor-ai-staging-key,CAELO_STAGING_BUCKET=acme-caelo-production-staging,CAELO_FIREBASE_STAGING_SITE=caelo-production-stg-6eace1,CAELO_GATEWAY_SERVICE=caelo-production-data-gateway,CAELO_STAGING_HOST=staging.acme.com",
|
|
351
|
+
"--update-env-vars=PUBLIC_STAGING_ADMIN_DATABASE_URL=postgresql://admin_role@db1.p-label.europe-west1.sql-psa.goog:5432/cms_public_staging?sslmode=verify-full&sslrootcert=/etc/caelo/db-ca/cloudsql-global.pem,CAELO_SITE_URL=https://acme.com,MEDIA_ROOT_DIR=/app/apps/admin/data/media,CAELO_MCP_IAP_SERVICE_ACCOUNT=caelo-mcp@acme.iam.gserviceaccount.com,CAELO_OPERATOR_ACCESS_JOB=projects/acme/locations/europe-west1/jobs/caelo-production-operator-access-sync,CAELO_UPGRADER_JOB=projects/acme/locations/europe-west1/jobs/caelo-production-upgrader,CAELO_CONVERGE_JOB=projects/acme/locations/europe-west1/jobs/caelo-production-converge,CAELO_AUDIT_JOB=projects/acme/locations/europe-west1/jobs/caelo-production-audit,CAELO_AUDIT_RESULTS_BUCKET=acme-caelo-production-audit-results,CAELO_CAPTURE_JOB=projects/acme/locations/europe-west1/jobs/caelo-production-capture,CAELO_CAPTURE_BUCKET=acme-caelo-production-capture,CAELO_MEDIA_BUCKET=acme-caelo-production-media,CAELO_AUDIT_RUNNER_JOB=projects/acme/locations/europe-west1/jobs/caelo-production-audit-run,CAELO_AUDIT_RUNNER_SERVICE_ACCOUNT=caelo-production-audit-run@acme.iam.gserviceaccount.com,CAELO_IMPORT_CRAWL_JOB=projects/acme/locations/europe-west1/jobs/caelo-production-import,CAELO_IMPORT_CRAWL_SERVICE_ACCOUNT=caelo-production-import@acme.iam.gserviceaccount.com,CAELO_BUILD_CARRIER_JOB=projects/acme/locations/europe-west1/jobs/caelo-production-build,CAELO_BUILD_CARRIER_SERVICE_ACCOUNT=caelo-production-build@acme.iam.gserviceaccount.com,CAELO_COLLECTION_INDEX_JOB=projects/acme/locations/europe-west1/jobs/caelo-production-index,CAELO_COLLECTION_INDEX_SERVICE_ACCOUNT=caelo-production-index@acme.iam.gserviceaccount.com,CAELO_PLUGIN_BATCH_JOB=projects/acme/locations/europe-west1/jobs/caelo-production-plugin-batch,CAELO_PLUGIN_BATCH_JOB_M=projects/acme/locations/europe-west1/jobs/caelo-production-plugin-batch-m,CAELO_PLUGIN_BATCH_JOB_L=projects/acme/locations/europe-west1/jobs/caelo-production-plugin-batch-l,CAELO_PLUGIN_BATCH_SERVICE_ACCOUNT=caelo-production-plugin-batch@acme.iam.gserviceaccount.com,CAELO_COLLECTIONS_STAGING_STORE=gs://acme-caelo-production-coll-staging,CAELO_COLLECTIONS_LIVE_STORE=gs://acme-caelo-production-coll-live,CAELO_SCHEDULER_SERVICE_ACCOUNT=caelo-production-scheduler@acme.iam.gserviceaccount.com,CAELO_OPERATOR_OAUTH_CLIENT_STORE=projects/acme/secrets/caelo-production-operator-oauth-client,CAELO_VISITOR_AI_KEY_STORE=projects/acme/secrets/caelo-production-visitor-ai-key,CAELO_VISITOR_AI_STAGING_KEY_STORE=projects/acme/secrets/caelo-production-visitor-ai-staging-key,CAELO_STAGING_BUCKET=acme-caelo-production-staging,CAELO_FIREBASE_STAGING_SITE=caelo-production-stg-6eace1,CAELO_GATEWAY_SERVICE=caelo-production-data-gateway,CAELO_STAGING_HOST=staging.acme.com",
|
|
352
352
|
"--update-secrets=PUBLIC_STAGING_ADMIN_DATABASE_PASSWORD=caelo-production-postgres-password:latest,CAELO_STAGING_GATE_SECRET=caelo-production-staging-gate-secret:latest",
|
|
353
353
|
]);
|
|
354
354
|
// #1328 — the Firebase rewrite follows the data gateway (above), which
|
|
@@ -18,7 +18,11 @@
|
|
|
18
18
|
|
|
19
19
|
import type { GcloudRunner } from "../gcloud-retry.js";
|
|
20
20
|
import { auditJobName, captureJobName } from "../gcp-names.js";
|
|
21
|
-
import {
|
|
21
|
+
import {
|
|
22
|
+
REPORTING_JOB_CATALOG,
|
|
23
|
+
reportingJobName,
|
|
24
|
+
reportingJobSizeName,
|
|
25
|
+
} from "../reporting-job-catalog.js";
|
|
22
26
|
|
|
23
27
|
/** One job that follows the admin's image. */
|
|
24
28
|
export interface AdminImageJob {
|
|
@@ -46,11 +50,15 @@ export function adminImageJobs(env: string): readonly AdminImageJob[] {
|
|
|
46
50
|
},
|
|
47
51
|
// Every reporting job (#1359, #1360, #1574, epic #1644), in catalog
|
|
48
52
|
// order: the quality-audit runner first, after the audit job above.
|
|
49
|
-
...REPORTING_JOB_CATALOG.
|
|
50
|
-
name: reportingJobName(e, env),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
...REPORTING_JOB_CATALOG.flatMap((e) => [
|
|
54
|
+
{ name: reportingJobName(e, env), label: e.label, lagging: e.lagging },
|
|
55
|
+
// #1776 — its larger machines run the same image.
|
|
56
|
+
...(e.sizes ?? []).map((s) => ({
|
|
57
|
+
name: reportingJobSizeName(e, s, env),
|
|
58
|
+
label: `${e.label} (${s.size})`,
|
|
59
|
+
lagging: e.lagging,
|
|
60
|
+
})),
|
|
61
|
+
]),
|
|
54
62
|
];
|
|
55
63
|
}
|
|
56
64
|
|
package/src/wizards/gcp-cost.ts
CHANGED
|
@@ -205,7 +205,7 @@ export function estimateGcpCost(inputs: CostEstimateInputs): {
|
|
|
205
205
|
name: "Quality checks (Cloud Run audit job)",
|
|
206
206
|
monthlyUsd: 2,
|
|
207
207
|
notes:
|
|
208
|
-
"Lighthouse runs of 2 vCPU in containers of their own (up to 5 pages x 3 runs, ~90 s each; a page whose runs disagree gets 2 more), as many at once as the project's Cloud Run CPU quota
|
|
208
|
+
"Lighthouse runs of 2 vCPU in containers of their own (up to 5 pages x 3 runs, ~90 s each; a page whose runs disagree gets 2 more), as many at once as the project's Cloud Run CPU quota leaves beside the other jobs (all 15 from 40 vCPU; a new project's 20 vCPU run 5 at a time, the same cost in more time): ~$0.05 per audited Stage, at most ~$0.08, partly in the free tier; results bucket ~$0",
|
|
209
209
|
},
|
|
210
210
|
{
|
|
211
211
|
// #1359 — the whole audit of a Stage runs in its own job, not on the
|
|
@@ -241,7 +241,16 @@ export function estimateGcpCost(inputs: CostEstimateInputs): {
|
|
|
241
241
|
name: "Search indexes (Cloud Run collection index job)",
|
|
242
242
|
monthlyUsd: 0,
|
|
243
243
|
notes:
|
|
244
|
-
"one container per Stage whose plugin collections changed (2 vCPU / 4 GiB): a delta of 1,000 pages ~30 s (~$0.002)
|
|
244
|
+
"one container per Stage whose plugin collections changed (2 vCPU / 4 GiB), more tasks of it while CPU is free: a delta of 1,000 pages ~30 s (~$0.002); a first index with semantic search embeds ~800,000 passages for 50,000 pages, ~2-4 task-hours whatever the width (~$0.40-0.80 once); nothing without such a plugin; mostly in the free tier",
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
// #1646, #1776 — a plugin's batch operation runs in its own job, on
|
|
248
|
+
// the machine its batch declares (S, M or L); nothing runs without a
|
|
249
|
+
// plugin that declares one.
|
|
250
|
+
name: "Plugin batch runs (Cloud Run plugin batch jobs)",
|
|
251
|
+
monthlyUsd: 0,
|
|
252
|
+
notes:
|
|
253
|
+
"one container per run of a plugin's batch, on the machine it declares: S (1 vCPU / 2 GiB) ~$0.0013, M (2 vCPU / 4 GiB) ~$0.0026, L (4 vCPU / 16 GiB) ~$0.006 per minute; a batch in pieces runs on more tasks for less time, the same cost; nothing without such a plugin; mostly in the free tier",
|
|
245
254
|
},
|
|
246
255
|
{
|
|
247
256
|
name: "Screenshots (Cloud Run capture job)",
|