-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[serve] Prevent mixing single/multi-app config deployment #33340
Conversation
Signed-off-by: Cindy Zhang <[email protected]>
Signed-off-by: Cindy Zhang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! I left a couple comments.
# fields to support single-app mode, but in multi-app mode the host and port | ||
# fields at the top-level deploy config is used instead. Eventually, after | ||
# migration, we should remove these fields from ServeApplicationSchema. | ||
host, port = config.host, config.port |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we raise an error here if the user specifies an app-level host
or port
? This log is nice, but it doesn't get propagated back to the client.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, if we want to prevent users from deploying it at all, perhaps we should just add a validator to check this in ServeDeploySchema
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that would be more general. If it doesn't impede any other behavior, then I'd prefer that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed! I've added it here
Signed-off-by: Cindy Zhang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
Signed-off-by: Cindy Zhang <[email protected]>
Signed-off-by: Cindy Zhang <[email protected]>
@sihanwang41 @edoakes PTAL! This PR blocks users from switching between config formats like we discussed. |
Signed-off-by: Cindy Zhang <[email protected]>
f"Port {app_config_dict['port']} is set in the config for " | ||
f"application `{app_config.name}`. This will be ignored, as " | ||
f"the port {port} from the top level deploy config is used." | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the warnings here, as in a separate PR I will add validation in the schema itself.
…t#33340) To simplify execution and not have to worry about covering all possible conflicts, we want to prevent users from deploying a single-app config (`ServeApplicationSchema`) first then switch to deploying a multi-app config (`ServeDeploySchema`), or vice versa. Eventually we want to deprecate deploying using `ServeApplicationSchema`, so this also encourages users to migrate. If users mix single-app and multi-app: - we will raise an error in `controller.deploy_apps` - the REST api will also return a `400 Response` with the error message Signed-off-by: Jack He <[email protected]>
…t#33340) To simplify execution and not have to worry about covering all possible conflicts, we want to prevent users from deploying a single-app config (`ServeApplicationSchema`) first then switch to deploying a multi-app config (`ServeDeploySchema`), or vice versa. Eventually we want to deprecate deploying using `ServeApplicationSchema`, so this also encourages users to migrate. If users mix single-app and multi-app: - we will raise an error in `controller.deploy_apps` - the REST api will also return a `400 Response` with the error message Signed-off-by: Edward Oakes <[email protected]>
…t#33340) To simplify execution and not have to worry about covering all possible conflicts, we want to prevent users from deploying a single-app config (`ServeApplicationSchema`) first then switch to deploying a multi-app config (`ServeDeploySchema`), or vice versa. Eventually we want to deprecate deploying using `ServeApplicationSchema`, so this also encourages users to migrate. If users mix single-app and multi-app: - we will raise an error in `controller.deploy_apps` - the REST api will also return a `400 Response` with the error message Signed-off-by: chaowang <[email protected]>
…t#33340) To simplify execution and not have to worry about covering all possible conflicts, we want to prevent users from deploying a single-app config (`ServeApplicationSchema`) first then switch to deploying a multi-app config (`ServeDeploySchema`), or vice versa. Eventually we want to deprecate deploying using `ServeApplicationSchema`, so this also encourages users to migrate. If users mix single-app and multi-app: - we will raise an error in `controller.deploy_apps` - the REST api will also return a `400 Response` with the error message Signed-off-by: elliottower <[email protected]>
…t#33340) To simplify execution and not have to worry about covering all possible conflicts, we want to prevent users from deploying a single-app config (`ServeApplicationSchema`) first then switch to deploying a multi-app config (`ServeDeploySchema`), or vice versa. Eventually we want to deprecate deploying using `ServeApplicationSchema`, so this also encourages users to migrate. If users mix single-app and multi-app: - we will raise an error in `controller.deploy_apps` - the REST api will also return a `400 Response` with the error message Signed-off-by: Jack He <[email protected]>
Why are these changes needed?
To simplify execution and not have to worry about covering all possible conflicts, we want to prevent users from deploying a single-app config (
ServeApplicationSchema
) first then switch to deploying a multi-app config (ServeDeploySchema
), or vice versa.Eventually we want to deprecate deploying using
ServeApplicationSchema
, so this also encourages users to migrate.If users mix single-app and multi-app:
controller.deploy_apps
400 Response
with the error messageRelated issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.