[serve] Add multi-app support to serve deploy - #33013
Conversation
Signed-off-by: Cindy Zhang <cindyzyx9@gmail.com>
Signed-off-by: Cindy Zhang <cindyzyx9@gmail.com>
Signed-off-by: Cindy Zhang <cindyzyx9@gmail.com>
|
Hi Cindy, let's add some failure case in the unit tests:
|
Signed-off-by: Cindy Zhang <cindyzyx9@gmail.com>
@edoakes Added! I added a test at the python API level instead of adding it as a cli test.
@sihanwang41 I added a unit test for one app that succeeds and one that fails (also a python API test instead of cli test). For the other two, I believe those should be Pydantic validation errors after this PR is merged. |
For the REST/CLI perspective, let's add those tests and assert validation errors always happening ? :) (make sure we show the error message clearly to the caller ) |
Sounds good, I'll add those after #32787 is merged. |
Signed-off-by: Cindy Zhang <cindyzyx9@gmail.com>
Signed-off-by: Cindy Zhang <cindyzyx9@gmail.com>
|
@sihanwang41 Added tests for conflicting app name and conflicting route prefix. |
|
@edoakes ready for merge? |
Updated `serve deploy` to accept both - The original `ServeApplicationSchema` for deploying a single application - The new `ServeDeploySchema` for deploying multiple applications Details: - `ServeApplicationSchema` and `ServeDeploySchema` have different required fields, so there is no ambiguity - one config cannot be successfully parsed as both. - If a config fails to parse as either of them, the validation error from trying to parse as `ServeApplicationSchema` will be surfaced. - `ServeDeploySchema` will go through `/api/serve/applications` and `ServeApplicationSchema` will go through `/api/serve/deployments` Signed-off-by: Jack He <jackhe2345@gmail.com>
Updated `serve deploy` to accept both - The original `ServeApplicationSchema` for deploying a single application - The new `ServeDeploySchema` for deploying multiple applications Details: - `ServeApplicationSchema` and `ServeDeploySchema` have different required fields, so there is no ambiguity - one config cannot be successfully parsed as both. - If a config fails to parse as either of them, the validation error from trying to parse as `ServeApplicationSchema` will be surfaced. - `ServeDeploySchema` will go through `/api/serve/applications` and `ServeApplicationSchema` will go through `/api/serve/deployments` Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Updated `serve deploy` to accept both - The original `ServeApplicationSchema` for deploying a single application - The new `ServeDeploySchema` for deploying multiple applications Details: - `ServeApplicationSchema` and `ServeDeploySchema` have different required fields, so there is no ambiguity - one config cannot be successfully parsed as both. - If a config fails to parse as either of them, the validation error from trying to parse as `ServeApplicationSchema` will be surfaced. - `ServeDeploySchema` will go through `/api/serve/applications` and `ServeApplicationSchema` will go through `/api/serve/deployments`
Updated `serve deploy` to accept both - The original `ServeApplicationSchema` for deploying a single application - The new `ServeDeploySchema` for deploying multiple applications Details: - `ServeApplicationSchema` and `ServeDeploySchema` have different required fields, so there is no ambiguity - one config cannot be successfully parsed as both. - If a config fails to parse as either of them, the validation error from trying to parse as `ServeApplicationSchema` will be surfaced. - `ServeDeploySchema` will go through `/api/serve/applications` and `ServeApplicationSchema` will go through `/api/serve/deployments` Signed-off-by: elliottower <elliot@elliottower.com>
Updated `serve deploy` to accept both - The original `ServeApplicationSchema` for deploying a single application - The new `ServeDeploySchema` for deploying multiple applications Details: - `ServeApplicationSchema` and `ServeDeploySchema` have different required fields, so there is no ambiguity - one config cannot be successfully parsed as both. - If a config fails to parse as either of them, the validation error from trying to parse as `ServeApplicationSchema` will be surfaced. - `ServeDeploySchema` will go through `/api/serve/applications` and `ServeApplicationSchema` will go through `/api/serve/deployments` Signed-off-by: Jack He <jackhe2345@gmail.com>
Why are these changes needed?
Updated
serve deployto accept bothServeApplicationSchemafor deploying a single applicationServeDeploySchemafor deploying multiple applicationsDetails:
ServeApplicationSchemaandServeDeploySchemahave different required fields, so there is no ambiguity - one config cannot be successfully parsed as both.ServeApplicationSchemawill be surfaced.ServeDeploySchemawill go through/api/serve/applicationsandServeApplicationSchemawill go through/api/serve/deploymentsRelated issue number
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.