-
Notifications
You must be signed in to change notification settings - Fork 635
initial attempt to fix some delete workflows #3587
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
base: master
Are you sure you want to change the base?
Conversation
|
/gemini summary |
Summary of ChangesThis 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
Changelog
Activity
|
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces important fixes for timeline deletion workflows, particularly for timelines in a 'fail' state. The core logic change in timesketch/api/v1/resources/timeline.py correctly allows an index to be archived even if sibling timelines have a 'fail' or 'deleted' status. The addition of the end_to_end_tests/timeline_deletion_test.py file with comprehensive tests for these scenarios is a great enhancement and significantly improves confidence in the fix. My review includes suggestions to improve the new test code for better maintainability and adherence to the project's style guide, such as removing redundant code, organizing imports, and eliminating hardcoded values.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
jkppr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, small comment below
|
|
||
| if timeline_.id != timeline_id: | ||
| # There are more than a single timeline using this index_name, | ||
| # we can't close it (unless this timeline is archived). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we update the comment accordingly to reflect the tates that will prevent index closure?
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.