One instance-type catalogue: allow-list managed from live AWS

Task 5631 · Done · Epic · created · updated

Move all product related configuration from Settings to Products section in the Operator. Also specifically: Requested by the operator in advisor chat (Task 5618). **Why:** today there are two unrelated lists. Settings › Nodes › Cloud › Instance types is a comma-separated allow-list (`CLOUD_NODE_INSTANCE_TYPES`). The hosting products under Settings › Billing › Hosting prices are typed separately. They drifted: products sold `m6i.2xlarge`/`m6i.4xlarge` while the allow-list held `m8i.*`. A tenant was charged $620 for a Dedicated host that `cloud_node_launch.require_allowed_instance_type` then refused, and the refund also failed. **Operator's ask, verbatim:** "Create a task to merge these two concepts. User should be able to manage the list of supported instances - create UI with support of family, lookup from actual aws, showing params (cpu, ram, other) and price on-demand and current spot. user adds which we want to allow. on the hosting products section - when adding products only allow selecting from available, prefill the name from instance type, also allow easy navigation, by family, etc. show exclamation mark if the product has an instance type that is no longer allowed." Itemized requirements: 1. **Allowed instance types become a managed list, not a text knob.** It is one operator-owned set, the single source both the cloud-node launch path and the hosting products read. It replaces `CLOUD_NODE_INSTANCE_TYPES` and carries the current values over in a migration. 2. **Browse live AWS data to add types.** Look up what the region offers through the operator's own cloud connection (EC2 `DescribeInstanceTypes`, on-demand price, current spot price). Show family, vCPU, RAM, architecture, network and other key specs, on-demand $/h and current spot $/h. The operator ticks which types to allow. 3. **Navigate by family.** Group or filter by family (t3, m6i, m8i, c7g…), by architecture, and by vCPU/RAM range, with search. Usable on a large list. 4. **Hosting products pick only from allowed types.** Adding a Dedicated size offers only allowed types, with the same family navigation. The product name is prefilled from the instance type (e.g. "m6i.2xlarge · 8 vCPU · 32 GB") and stays editable. 5. **Flag stale products.** A product whose instance type is no longer allowed shows a warning icon with a one-line reason. It must never be orderable: the catalog marks it unavailable, so no tenant is charged for a size that cannot launch. 6. **Refuse before charging.** The order path rejects a disallowed type at order time, before payment, so this mismatch can never charge again. Out of scope: Shared tiers and storage sizes (unchanged), refunding the failed order, GCP/Azure. Done means: - The allow-list lives in one place, and the cloud-node launch and hosting catalog both read it (API test: a type removed from it disappears from the tenant catalog and is refused by launch). - The operator can list a region's types from AWS with specs and on-demand + spot prices, filter by family, and allow or disallow types in the console (component + API test with a stubbed EC2/pricing client). - Adding a hosting product offers only allowed types and prefills the name (component test). - A product on a disallowed type shows the warning icon, and a tenant cannot order it (component + API test). - Ordering a disallowed type fails before any payment (API test). - A UI change: screenshots of both screens at desktop and 480px in the report.

Subtasks

  • [business_analysis] One instance-type catalogue: allow-list managed from live AWS Done
    Settled 11 asks into R1–R9 (26 ACs with oracles): new operator Products area, DB allow-list replacing CLOUD_NODE_INSTANCE_TYPES, live AWS browse with specs and on-demand/spot prices, allowed-only hosting picker, stale flag, refusal before any charge. See PRD.
  • [architecture] One instance-type catalogue: allow-list managed from live AWS Done
    A DB allow-list sits behind the existing allowed_instance_types() seam, with AWS browse via paginated EC2/Pricing/spot and a TTL cache. Refusal happens in start() before payment, and the Products page reuses the Settings renderers. 7 children (C1–C7). Dev UI checks are deferred: node h2 has no dev reach.
  • [plan] One instance-type catalogue: allow-list managed from live AWS Done
    Split by Architect seam into 7 coders, 4 phases: allow-list core + IAM → browse API, order guards, Products area → Instance types UI → hosting picker/stale. C5 moved to phase 2 per critic; dev checks deferred with local/live-AWS backstops.
  • Instance-type allow-list table core Done
    Core had merged in #4941, but it forked develop into two 0419 Alembic heads and the dev deploy failed. #4954 renumbers the allow-list migration to 0420 on top of 0419. Quick gate, CI gate and the develop Jaah Deploy are all green. Full tier left to CI (no local Postgres).
  • Grant pricing and spot IAM reads Done
    PR #4940 merged and Jaah Deploy is green. Both identities are granted live and simulate as allowed. Applied outside terraform: hosting state holds unpushed peering, and node-launcher is main-only. Main's deploy needs the master promotion.
  • AWS instance-type browse and allow Done
    Built GET /api/instance-types/browse (live EC2 specs, on-demand and spot prices, cached per part) and POST allow (all or nothing, snapshots specs, audited). PR #4958 merged, CI and Jaah Deploy green.
  • Operator Products area with moved sections Done
    Operator Products area (/products, 4 tabs) shipped; product sections moved out of Settings with redirects and search. Quick and CI gates green; Jaah Deploy succeeded. PR #4959 merged. AC1.4 dev check unverified (dev unreachable); follow-ups in report.
  • Instance types tab with browser Done
    Instance types tab + shared InstanceTypeBrowser shipped. Also fixed a C2 parser bug where live AWS showed 0 types. PR #4966 merged, CI and Jaah Deploy green. Dev browser check unverified: dev unreachable. UI follow-ups in report (task creation refused).
  • Hosting product picker and stale flag Done
    Add instance type picks only allowed, unused types, with the name prefilled; stale products are flagged and counted. PR #4971 merged; full gate, CI and Jaah Deploy green. Shots taken on the local stack (dev unreachable). Task creation refused (403): UI follow-ups are in the report.
  • [finish] One instance-type catalogue: allow-list managed from live AWS Done
    All 7 coders done, 8 PRs merged, and applied to dev; the code matches the ask. Gaps filed: 5712 (server text still says Settings > Billing) and 5713 (UI polish, incl. a stale product showing "Offered"). Dev browser check unverified: dev unreachable.
  • Point server messages at Products, not Settings › Billing Done
    Server sentences/docstrings now name Products › Plans/Hosting terms/Hosting products/Jaah AI; hosting link → /products?tab=hosting-terms; launch tests use allow_instance_types. Full gate green, PR #4984 merged, Jaah Deploy dev succeeded.
  • Products area UX polish: stale status Done
    All 10 Products polish items fixed and verified (tests + 1440/480 screenshots); PR #4988 merged, CI green, Jaah Deploy succeeded on dev. Full gate: 2 flaky smoke tests passed on re-run. Deferred: 4 picker nits + a deploy job missing a timeout (task filing 403).

Artifacts

Activity

  • Created
  • Updated
  • Runner started
  • Ready
  • Ready
  • Ready
  • Runner started
  • Runner ended (done)
  • Runner started
  • Runner ended (done)
  • Runner started
  • Draft
  • Draft
  • Draft
  • Draft
  • Draft
  • Draft
  • Draft
  • Ready
  • Ready
  • Ready
  • Ready
  • Ready
  • Ready
  • Ready
  • Runner ended (done)
  • Runner started
  • Runner started
  • Awaiting response
  • Awaiting response
  • Runner resumed
  • Runner ended (done)
  • Ready
  • Runner started
  • Runner ended (done)
  • Runner started
  • Runner started
  • Runner ended (done)
  • Runner ended (done)
  • Runner started
  • Runner ended (done)
  • Runner started
  • Runner ended (done)
  • Runner started
  • Ready
  • Ready
  • Runner ended (done)
  • Runner started
  • Runner started
  • Runner ended (done)
  • Runner ended (done)
  • Runner ended (done)