Skip to content

Expose deployable regions per app (#225)#226

Merged
v0l merged 1 commit into
masterfrom
feat/app-deployable-regions
Jul 24, 2026
Merged

Expose deployable regions per app (#225)#226
v0l merged 1 commit into
masterfrom
feat/app-deployable-regions

Conversation

@v0l

@v0l v0l commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Fixes #225.

The web app is building the app deploy form (compose config: → inputs + a region picker), but the customer API had no way to discover which regions can actually host a given app — app clusters are admin-configured per region and don't follow the VM regions, so the picker had no valid source and would risk a 400 at order time.

Change

  • GET /api/v1/apps/{id}/regions[{ id, name, available }] for every region that has an enabled app cluster. available is true when a cluster in that region currently has enough free capacity for this app's footprint, so the picker can show full regions disabled instead of failing on POST. The returned ids are exactly the region_id values accepted by POST /api/v1/app-deployments. 404 if the app doesn't exist / isn't offered.
  • AppClusterCapacityService::regions_availability(need) computes the (region_id, available) set — the read-side counterpart to the existing select_in_region used at order time (same capacity accounting, no overcommit).

Follows the same "surface the id the client needs" pattern as #210 / #216.

Tests / docs

  • e2e ordering test now asserts the seeded region is returned with available: true.
  • API_DOCUMENTATION.md + API_CHANGELOG.md updated.

The deploy form needs to know which regions can host a given app, but the
customer API exposed no region/cluster info and app clusters are admin-
configured per region (VM regions don't apply). Add:

- GET /api/v1/apps/{id}/regions -> [{ id, name, available }] for every region
  with an enabled app cluster, where 'available' is whether a cluster there
  currently fits the app's footprint. Lets the picker show full regions
  disabled instead of failing at order time; ids are valid region_id for
  POST /api/v1/app-deployments.
- AppClusterCapacityService::regions_availability(need) computing that set.

e2e ordering test asserts the seeded region is returned with available=true.
Docs + changelog updated.
@v0l
v0l merged commit b33fa0c into master Jul 24, 2026
7 of 8 checks passed
@v0l
v0l deleted the feat/app-deployable-regions branch July 24, 2026 18:06
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.

Customer app deployment: expose deployable regions for an app

1 participant