Skip to content

enhance: add controller handlers to delete unauthorized MCPServers and MCPServerInstances #3276

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

Merged

Conversation

g-linville
Copy link
Member

No description provided.

Comment on lines +307 to +310
user, err := h.gatewayClient.UserByID(req.Ctx, server.Spec.UserID)
if err != nil {
return fmt.Errorf("failed to get user %s: %w", server.Spec.UserID, err)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the server get cleaned up by another controller if the user no longer exists? If not, should we clean it up here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. I need to update the UserDelete controller route to delete the servers that belong to the user. I'll take care of that shortly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fixed now

Comment on lines +367 to +370
user, err := h.gatewayClient.UserByID(req.Ctx, instance.Spec.UserID)
if err != nil {
return fmt.Errorf("failed to get user %s: %w", instance.Spec.UserID, err)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the instances will get deleted when the servers get deleted because they have a DeleteRef to the server

@g-linville g-linville requested a review from njhale July 1, 2025 23:54
@g-linville g-linville merged commit 5ec2cdc into obot-platform:main Jul 2, 2025
3 checks passed
@g-linville g-linville deleted the delete-unauthorized-servers branch July 2, 2025 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants