Skip to content
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

Clean up bugs around user deletion #1769

Merged
merged 3 commits into from
Jan 7, 2025
Merged

Clean up bugs around user deletion #1769

merged 3 commits into from
Jan 7, 2025

Conversation

NolanTrem
Copy link
Collaborator

@NolanTrem NolanTrem commented Jan 7, 2025

Important

Enhance user deletion process by improving data cleanup and error handling across tests, database handlers, and service layers.

  • Behavior:
    • Update RetrievalIntegrationSuperUser.test.ts to include tests for listing and deleting conversations, ensuring all conversations are deleted.
    • Modify delete_user() in auth_service.py to handle errors when deleting graphs and to delete user's default collection and vector data.
  • Error Handling:
    • Add error handling in delete() in graphs.py to raise HTTPException on failure.
    • Log warnings in delete_user() in auth_service.py and delete_collection() in management_service.py when graph deletion fails.
  • Functionality:
    • Change delete_collection() in collections_router.py to use collection_id parameter explicitly.
    • Update remove_user_from_collection() in management_service.py to return directly without intermediate variable.

This description was created by Ellipsis for 77ebe82. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 77ebe82 in 40 seconds

More details
  • Looked at 129 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 drafted comments based on config settings.
1. js/sdk/__tests__/RetrievalIntegrationSuperUser.test.ts:126
  • Draft comment:
    The test for deleting a specific document has been replaced with a test for listing and deleting all conversations. Ensure this change aligns with the intended test coverage.
  • Reason this comment was not posted:
    Comment did not seem useful.
2. py/core/database/graphs.py:15
  • Draft comment:
    The import of UndefinedTableError was removed. Ensure that this exception is not used elsewhere in the codebase.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The import of UndefinedTableError was removed, but there is no indication that it was used elsewhere in the file. This change seems safe.
3. py/core/database/graphs.py:2290
  • Draft comment:
    Error handling has been added to the delete method to catch exceptions during graph deletion. This is a good practice for robustness.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The change in the delete method of PostgresGraphsHandler adds error handling for the deletion process. This is a good practice to ensure that any issues during deletion are logged and handled gracefully.
4. py/core/main/services/management_service.py:590
  • Draft comment:
    Error handling has been added to the delete_collection method to catch exceptions during graph deletion. This is a good practice for robustness.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The change in the delete_collection method of ManagementService adds error handling for the deletion of graphs. This is a good practice to ensure that any issues during deletion are logged and handled gracefully.

Workflow ID: wflow_XpYCnawEGbQEEwfP


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@NolanTrem NolanTrem merged commit cb89d2a into main Jan 7, 2025
14 of 15 checks passed
@NolanTrem NolanTrem deleted the Nolan/DeletedUserBugs branch January 7, 2025 21:46
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.

1 participant