Repository navigation
Conversation
Signed-off-by: Vaishnavi Panchavati <[email protected]>
Signed-off-by: Vaishnavi Panchavati <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request ensures that deleting a declarative application via serve.delete() also removes it from the controller's saved config checkpoint, preventing it from being redeployed upon a controller restart. Documentation and unit tests have been added to support this behavior. A critical review comment points out a bug where pre-filtering application names by their current APIType can prevent the cleanup of the saved config checkpoint if a declarative app was previously overwritten by an imperative one; it is recommended to pass all names directly to the checkpoint removal method instead.
Signed-off-by: Vaishnavi Panchavati <[email protected]>
|
I reviewed this PR. The core approach is sound — the config checkpoint is only written by 1. 2. 3. No error isolation around the KV-store pruning (~2079). 4. 5. Missing edge-case test: deleting the last remaining app. The new tests cover deleting one of two declarative apps. Deleting the only app leaves a zero-application checkpoint, which on controller restart goes through 6. Docs wording ( 🤖 Generated with Claude Code |
Signed-off-by: Vaishnavi Panchavati <[email protected]>
|
Thanks for the review.
This is intentional here. Catching and continuing would bring back the issue this PR is trying to solve. The fail happens before anything changes so this is safe. The user can just retry
Yes, this is intended. With KubeRay, the spec is the source of truth, so removing an app means editing the spec. KubeRay doesn't read Addressed the rest:
|
Description
serve.delete()on an app deployed from a declarative config (serve deployor the REST API) deletes the app, but leaves it in the config the controller saves. When the controller restarts, it re-applies that saved config and the deleted app comes back.This PR removes a deleted declarative app from the saved config as well.
serve deploybrings it back.serve.run) aren't affected.Related issues
Fixes #68660
Additional information
An alternate method to fix this was passing the config without the deleted app to
apply_config, which would treat the delete as a new deploy of every other app. Some issues behind why this approach was not prefferred was:scaling could change direction, and every app'slast_deployed_time_s` would reset.Editing the saved config in place avoids this.