[serve] Improve single-app and multi-app differentiation#33490
Conversation
Signed-off-by: Cindy Zhang <cindyzyx9@gmail.com>
Signed-off-by: Cindy Zhang <cindyzyx9@gmail.com>
serve config| if "name" in config.dict(exclude_unset=True): | ||
| return Response( |
There was a problem hiding this comment.
please add a logger.warning message as well for both of these
Signed-off-by: Cindy Zhang <cindyzyx9@gmail.com>
|
Please see updated description + code. If we are OK with adding a field |
Signed-off-by: Cindy Zhang <cindyzyx9@gmail.com>
Signed-off-by: Cindy Zhang <cindyzyx9@gmail.com>
Signed-off-by: Cindy Zhang <cindyzyx9@gmail.com>
Signed-off-by: Cindy Zhang <cindyzyx9@gmail.com>
sihanwang41
left a comment
There was a problem hiding this comment.
please add test cases for name set in ServeApplicationSchema. Make sure the exception can be raised in serve_agent and deploy_apps.
Added! @edoakes ping for review/merge |
…#33490) - Disallow empty string application names in `ServeDeploySchema` - Disallow specifying an app name if user is directly deploying a single-app config `ServeApplicationSchema` - Otherwise, `GET /api/serve/deployments/status` and `GET /api/serve/deployments/config` would not get the correct status and config. We could try to fix it, but there's no reason to allow users to specify the name of their application, so it's better to disallow it. - Add a field `deploy_mode` in `ServeInstanceDetails` so that we can automatically detect what config(s) to show and ***REMOVE `--multi-app` flag in `serve config`*** - Remove trailing space for `serve config` and `serve status` Signed-off-by: elliottower <elliot@elliottower.com>
…#33490) - Disallow empty string application names in `ServeDeploySchema` - Disallow specifying an app name if user is directly deploying a single-app config `ServeApplicationSchema` - Otherwise, `GET /api/serve/deployments/status` and `GET /api/serve/deployments/config` would not get the correct status and config. We could try to fix it, but there's no reason to allow users to specify the name of their application, so it's better to disallow it. - Add a field `deploy_mode` in `ServeInstanceDetails` so that we can automatically detect what config(s) to show and ***REMOVE `--multi-app` flag in `serve config`*** - Remove trailing space for `serve config` and `serve status` Signed-off-by: Jack He <jackhe2345@gmail.com>
Why are these changes needed?
ServeDeploySchemaServeApplicationSchemaGET /api/serve/deployments/statusandGET /api/serve/deployments/configwould not get the correct status and config. We could try to fix it, but there's no reason to allow users to specify the name of their application, so it's better to disallow it.deploy_modeinServeInstanceDetailsso that we can automatically detect what config(s) to show and REMOVE--multi-appflag inserve configserve configandserve statusRelated issue number
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/under thecorresponding
.rstfile.