Skip to content

Show where a Version's workers run per region - #3995

Draft
rossnelson wants to merge 1 commit into
rossnelson/multi-region-compute-modelfrom
rossnelson/multi-region-region-display
Draft

rossnelson wants to merge 1 commit into
rossnelson/multi-region-compute-modelfrom
rossnelson/multi-region-region-display

Conversation

@rossnelson

Copy link
Copy Markdown
Collaborator

Stacked on #3993. Base is rossnelson/multi-region-compute-model, so the diff here is this slice alone. Merge #3993 first.

Second slice of multi-region Serverless Workers. Still dark unless a consumer passes the Namespace's regions — fewer than two and the Version detail renders exactly what it does today.

Description & motivation 💭

For a Namespace held in more than one region, the Version detail now lists each region, which one is active, and what serves it:

Case Shown as
The region has its own scaling groups The providers of those groups
Only a catch-all covers it The provider, marked Default compute
Nothing covers it No compute configured, in danger colour

That last row is the point of the display. It is the case where a failover to that region finds no workers, and nothing in the UI says so today.

The catch-all case is deliberately distinguished rather than shown as if the region were configured. The difference is what tells someone whether a failover there was planned for or merely survivable.

A pre-existing bug this surfaces

Every provider decoder reads Object.values(computeConfig.scalingGroups)[0] — only the first group. A config with more than one has always shown just one set of details, which is already reachable today via groups split by task queue type, and becomes far more visible once there is a group per region.

Rather than rewrite them, each decoder now has a ...ForGroup form taking the group it should read, and the existing config-level function delegates to it with the first group. Callers that have not said which group they mean get exactly what they got before. 266 existing tests confirm it.

Design Considerations 🎨

  • The single-region path is untouched. The region list is additive; everything below it renders as before. The prototype in (design prototype) Add multi-region for Serverless Workers UI #3951 rewrote this component at +437/−404, which is the change most likely to regress single-region users.
  • Roles and coverage carry data attributes (data-region-role, data-region-match) and the tests assert those rather than the rendered words, so rewording a label does not fail them.
  • Region ids display without their cloud prefix — aws-us-east-1 shows as us-east-1 — since the provider is constant across a Namespace's regions today.

Testing 🧪

How was this tested 👻

  • Unit tests added
  • Strict type check clean

8 new component tests via the isolated Vite SSR harness: the gate in three forms (no regions, one region, and a group naming a region while the Namespace has one), role following the active flag rather than list order, prefix stripping, per-region providers, the uncovered warning, and the catch-all wording.

296 tests pass across deployments, services, utilities and the deployment page. count-strict-errors.ts reports 0.

What comes next

  1. Region badges on the deployments list
  2. The forms: compute per region
  3. The preview panel and failover stories

Checklists

Merge Checklist

Second slice of multi-region Serverless Workers, on top of the model in
the previous commit. Still dark unless a consumer passes the Namespace's
regions: fewer than two and the Version detail renders exactly what it
did before.

For a Namespace held in more than one region, the detail now lists each
region, which one is active, and what serves it — the provider of its own
scaling groups, the default group where it has none of its own, or a
warning where nothing serves it at all. That last case is the point of
the display: it is the one where a failover finds no workers.

A region covered by a catch-all is named as such rather than shown as if
it were configured for that region. The difference is what tells someone
whether the failover was planned for or merely survivable.

The provider decoders each read `scalingGroups[0]`, so a config with more
than one group has only ever shown the first — already true for groups
split by task queue type, and about to be more visible per region. Each
now has a ForGroup form taking the group it should read, and the existing
config-level function delegates to it with the first group, so nothing
changes for callers that have not said which group they mean.

Roles and coverage are marked with data attributes and asserted on those
rather than on the rendered words, so rewording a label does not fail the
tests.
@rossnelson
rossnelson requested a review from a team as a code owner October 7, 2026 20:59
@vercel

vercel Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
holocene Ready Ready Preview Oct 7, 2026 9:00pm UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — 4163795d Deployed Oct 7, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant