Skip to content

Connect new ALBs to workloads, and stop pools pointing at one workload - #1629

Merged
mattdjenkinson merged 3 commits into
mainfrom
feat/alb-workload-origins
Oct 5, 2026
Merged

mattdjenkinson merged 3 commits into
mainfrom
feat/alb-workload-origins

Conversation

@mattdjenkinson

Copy link
Copy Markdown
Contributor

Problem

  • An ALB with several backends still showed a "View workload" chip. It linked to whichever workload published the ALB, which is only one backend in the pool.
  • The "No backend available" headline came from the same label. Deleting that one workload would have reported the whole pool as down, even with other backends still serving.
  • You could only point a new ALB at a public origin, even in projects with compute.

Solution

Pools on the overview

  • The health strip no longer speaks for a single workload when there's more than one backend. It shows the "N backends" chip that URL pools already use. Hovering it lists every backend with its share of traffic, or "No traffic" / "Deleted".
  • Each workload row on the Backends card links to that workload's page.
  • Workloads that were deleted while the pool still references them get a "Workload deleted" chip, and their link is dropped.
  • The headline now judges a pool by its rows:
    • "1 of 3 backends unavailable", with a "Manage backends" chip, when some workloads are gone.
    • "No backend available" only when nothing that receives traffic is left.
    • Backends with weight 0 don't count.
  • Single-backend ALBs behave as before.

Backend list tooltip on the 3 backends chip

Workload origins when creating an ALB

  • In projects entitled to compute, Add an Application Load Balancer offers the same Public internet / Datum compute choice as Add backend. Projects without compute see the dialog as before.
  • Compute availability comes from useComputePluginSlug, the same check the sidebar uses for Compute > Workloads.
  • The new ALB's first backend is the workload's NetworkService and the chosen port.
  • The ALB isn't given the compute workload-name label. That label means the workload's deploys manage the ALB, and that deleting the workload deletes it.
  • The origin cards and workload/port selects moved to form/origin-type-fields.tsx, shared by both dialogs.
  • Add backend now hides "Datum compute" in projects without compute. When you edit a backend that already points at a workload, the choice stays visible so you can still repoint it.

Create ALB dialog with Datum compute selected

Dependency

  • @datum-cloud/datum-ui goes from 3.4.0 to 3.4.1. The patch only lightens badge borders.

Test plan

  • bun run typecheck, eslint, prettier
  • bun test app: 1398 pass. New tests cover the per-row deleted-workload state, the create payload for a workload origin, and schema validation for each origin type.
  • Checked locally: create dialog with Datum compute, and the backend tooltip on a 3-backend pool (screenshots above)
  • Create an ALB from a workload and confirm it serves traffic
  • Delete one workload in a pool and check the headline and row chip

With several backends, the health strip's "View workload" chip linked to whichever workload published the ALB. Pools now list their backends in the chip's tooltip, link each workload row on the Backends card, and flag workloads that were deleted while the pool still references them.
The create dialog offers the same Public internet / Datum compute choice as Add backend, in projects entitled to compute. Add backend now hides the compute option in projects without it.
@mattdjenkinson mattdjenkinson added the enhancement New feature or request label Oct 5, 2026
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

🧪 Test Summary

Job Status
Bun Unit Tests ✅ success
E2E Regression (0) ✅ success
E2E Regression (1) ✅ success
E2E Regression (2) ✅ success
E2E Regression (3) ✅ success
E2E Smoke ✅ success
Unit Tests ✅ success

View workflow run

Need another run? Use Re-run failed jobs: one shard costs a few minutes, the whole workflow about 26.

@mattdjenkinson
mattdjenkinson merged commit d733c4c into main Oct 5, 2026
19 checks passed
@mattdjenkinson
mattdjenkinson deleted the feat/alb-workload-origins branch October 5, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants