Flat GPU catalog with search, and a root /node-pools endpoint with filters
Context
The node-pool registration form on the front branch refactor-node-pool-gpu-declaration uses GET /gpu-models with two selects: first a card model, then one of its partitions. The branch maintainer asked for a simpler UI with a single searchable select. The Runner's hierarchical catalog (a model containing its partitions) does not fit that UI.
What we want (Runner)
- A flat GPU catalog. The catalog becomes one row per (brand, model, partition), and the whole card is the partition
full. Each row has a stablegpu_config_id, e.g.nvidia-a100-80gb-mig-1g.10gbornvidia-t4-full. The id is derived from the(gpu_model, gpu_mode)that node pools already store, so no migration is needed. GET /gpu-models?search=…returns this flat list. The search is a token text search over brand, model and partition: every whitespace-separated token must match, case-insensitively. For example,a100 1greturns the 1g slices of both A100 cards.- A root
/node-poolsresource, outside/sites/{id}:GET /node-poolstakes these filters:gpu_config_ids(list)site_ids(list)cpu_min/cpu_max, in coresmemory_min/memory_max, in bytes
POST /node-poolstakessite_idin the body and an optionalgpu_config_id, from which the Runner fillsgpu_modelandgpu_mode.GET,PUTandPOST …/archiveon/node-pools/{id}.- The response includes
site_idandgpu_config_id. - The nested
/sites/{id}/node-pools*routes stay but are marked deprecated (ryaxctl and front master use them).
/gpu-models has not been released yet, so changing its shape does not break a released API.
Out of scope
- Adapting the front. The front branch owner switches to one select over
/gpu-modelsand sendsgpu_config_idonPOST /node-pools. - Regenerating the API spec.