initial attempt to fix some delete workflows
This pull request enhances the system's deletion workflows by adding new end-to-end tests and refining existing logic. It specifically addresses the proper handling of soft-deleted sketches during hard deletion and ensures that search indexes for failed timelines are correctly archived upon deletion.
/gemini summary
Summary of Changes
This pull request enhances the system's deletion workflows by adding new end-to-end tests and refining existing logic. It specifically addresses the proper handling of soft-deleted sketches during hard deletion and ensures that search indexes for failed timelines are correctly archived upon deletion. These changes aim to improve the robustness and reliability of data cleanup operations.
Highlights
- New Test for Hard Deleting Soft-Deleted Sketches: A new end-to-end test has been added to verify the functionality of hard-deleting a sketch that was previously soft-deleted. This ensures proper cleanup and state transitions for sketches.
- New Test for Deleting Failed Timelines: An end-to-end test was introduced to confirm that when a timeline with a 'fail' status is deleted, its associated search index is correctly archived.
- Improved Timeline Deletion Logic: The timeline deletion logic has been updated to correctly handle timelines that are in a 'fail' status, ensuring their search indexes are considered for closure alongside 'archived' timelines.
Changelog
-
end_to_end_tests/client_test.py
- Added
test_hard_delete_soft_deleted_sketchto validate the hard deletion of sketches that have been soft-deleted.
- Added
-
end_to_end_tests/timeline_deletion_test.py
- New file created to house end-to-end tests for timeline deletion.
- Implemented
test_delete_failed_timelineto verify that search indexes for failed timelines are archived after deletion.
-
timesketch/api/v1/resources/timeline.py
- Modified the
deletemethod to include 'fail' status in the condition for closing a search index, alongside 'archived' status, during timeline deletion.
- Modified the
Activity
- jaegeral requested a Gemini summary.
/gemini review