Public: anyone can read this; the crew can change it.

Main is green again after #16394: its making sleep is named, cookie sites counted, and New forge reads plans once #16400

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

fix/main-red-making → main 0 commits

  • Merged. fix/main-red-making was merged into main as 06f72be.

Review

Sign in to review this change.
4 files changed +9 −8
src/web/pages/new-forge.ts +6 −5
@@ -49,7 +49,7 @@ import { page, redirect } from "../layout.ts";
4949 import { placeChoiceView } from "../pinned.ts";
5050 import { orderCookie } from "./pricing.ts";
5151 import { placeChoice } from "../../spawn/making.ts";
52 import { FREE, getPlan, getPlans } from "../../settings/plans.ts";
52 import { FREE, getPlans, type Plan } from "../../settings/plans.ts";
5353 import { linkToSend, madeBody, madeJs } from "../forge_made.ts";
5454 import { pickList } from "../pick.ts";
5555 import { btn, field as formField, selectField } from "../ui.ts";
@@ -253,6 +253,8 @@ function formView(
253253 : null}
254254 </section>
255255 </div>`;
256 // One read of the plans serves the Plan field and where the chosen one runs.
257 const plans = getPlans(ctx.app.db);
256258 const anon = user === undefined;
257259 const includedUsd = limitValue(ctx.app.db, "spawn.included_credit_usd");
258260 const askUsd = limitValue(ctx.app.db, "billing.ask_cents") / 100;
@@ -440,8 +442,8 @@ function formView(
440442 </p>
441443 </details>
442444 ${codeField(values.code, errors["code"])}
443 ${planField(ctx, user, values.plan, errors["plan"])}
444 ${placeChoiceView(placeChoice(ctx.app, getPlan(ctx.app.db, values.plan || values.giftPlan), user?.isAdmin === true), values.place, errors["place"])}
445 ${planField(plans, user, values.plan, errors["plan"])}
446 ${placeChoiceView(placeChoice(ctx.app, plans.find((p) => p.key === (values.plan || values.giftPlan)), user?.isAdmin === true), values.place, errors["place"])}
445447 ${anon
446448 ? null
447449 : html`<details class="field"${values.saveAs !== "" || errors["recipe"] ? html` open` : null}>
@@ -836,8 +838,7 @@ export async function newForgeSubmit(ctx: Ctx): Promise<Response> {
836838 }
837839
838840 /** An admin's plan for the new forge: a paid one runs where paid forges run. Only with paid plans. */
839 function planField(ctx: Ctx, user: User | undefined, chosen: string, error: string | undefined): Html | null {
840 const plans = getPlans(ctx.app.db);
841 function planField(plans: readonly Plan[], user: User | undefined, chosen: string, error: string | undefined): Html | null {
841842 if (user?.isAdmin !== true || plans.every((p) => p.key === FREE)) return null;
842843 return selectField({
843844 label: "Plan",
test/job-slices.test.ts +1 −1
@@ -273,7 +273,7 @@ const UNTIMED: Record<string, string> = {
273273 desk: "expires notes past their time: one indexed delete on the desk table every 30 s (actions/desk.ts); the fixture has no notes",
274274 ledger: "walks the cost ledger's hash chain at boot and once a day (#12273): file reads proportional to the ledger, off the request path; the fixture has no ledger",
275275 "full-disk-probe": "one 64 KiB write every 2 s, only while the disk is full; the full-disk test drives probeFull directly",
276 "order.making": "one ask after a paid order's cloud machine every few seconds, at most 60, only while an order is making in this process: a row read and one call to the cloud (actions/order.ts, followMaking); the fixture has no order; order-cloud.test.ts turns the watch off (tries 0) and asks the order itself",
276 "order.making": "one ask after a paid order's cloud machine every few seconds, at most 60, only while an order is making in this process: a row read and one call to the cloud (spawn/making.ts, followMaking); the fixture has no order; order-cloud.test.ts turns the watch off (tries 0) and asks the order itself",
277277 "reach-asks": "a one-shot timer in actions/ask_host.ts, armed only while a hosted forge has an ask under an hour old: one signed call to its host over the network and a few rows; the fixture has no host",
278278 "run-ending": "a one-shot timer in runs/ending.ts, armed only while a cancel waits on a worker here: at its deadline it announces the run once (a row read and one outbox write); run-cancel-stopping.test.ts drives whenEnded directly",
279279 lane: "a closure in startChecks; starting the checks service starts cell checks — follow-up",
test/timers-named.test.ts +1 −1
@@ -114,11 +114,11 @@ const ALLOWED: readonly Allowed[] = [
114114 ["src/core/v1_proof.ts", "done"],
115115 ["src/maintenance/checks.ts", "done"],
116116 ["src/chaos/faults.ts", "r"],
117 ["src/actions/order.ts", "r"],
118117 ["src/perf/sample.ts", "r"],
119118 ["src/cluster/jobs.ts", "r"],
120119 ["src/release/serving.ts", "r"],
121120 ["src/snapshot/service.ts", "r"],
121 ["src/spawn/making.ts", "r"],
122122 ["src/apps/holding.ts", "resolve"],
123123 ["src/checks/service.ts", "resolve"],
124124 ["src/checks/install.ts", "() => { signal.removeEventListener("],

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs