[nexus] Apply limits to affinity group memberships#7858
Conversation
|
Oh this is good. We were debating whether to bother with pagination in the console listing of instances in a group and groups for an instance, and now we definitely won't. cc @charliepark |
There was a problem hiding this comment.
Everything looks good. The only questions I have are
- Is there a better error code than 400? Probably not. For #5914 I used
InvalidValuebut it's still a 400, plus it works differently — it's checking the length of an array that is actually present in the JSON. - It might be worth sticking the max in the doc string for the add endpoints. Kind of annoying to hard code it in two places but we will survive.
omicron/common/src/api/external/mod.rs
Lines 1781 to 1786 in 0c92213
The other error I was considering was "InsufficientCapacity", which is 507? But that feels a little odd too; it's a limit to either the group/instance, which feels more object-specific than "server-specific".
How about I add it to the |
Fixes #7627