timesketch icon indicating copy to clipboard operation
timesketch copied to clipboard

initial attempt to fix some delete workflows

Open jaegeral opened this issue 5 months ago • 3 comments

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.

jaegeral avatar Nov 12 '25 13:11 jaegeral

/gemini summary

jaegeral avatar Dec 02 '25 10:12 jaegeral

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_sketch to validate the hard deletion of sketches that have been soft-deleted.
  • end_to_end_tests/timeline_deletion_test.py
    • New file created to house end-to-end tests for timeline deletion.
    • Implemented test_delete_failed_timeline to verify that search indexes for failed timelines are archived after deletion.
  • timesketch/api/v1/resources/timeline.py
    • Modified the delete method to include 'fail' status in the condition for closing a search index, alongside 'archived' status, during timeline deletion.
Activity
  • jaegeral requested a Gemini summary.

gemini-code-assist[bot] avatar Dec 02 '25 10:12 gemini-code-assist[bot]

/gemini review

jaegeral avatar Dec 02 '25 17:12 jaegeral