Skip to content

Conversation

@shahargl
Copy link
Member

@shahargl shahargl commented Aug 5, 2025

close #5180

@shahargl shahargl changed the title fix: time fix: time on filter Aug 5, 2025
@vercel
Copy link

vercel bot commented Aug 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
keep ⬜️ Ignored (Inspect) Visit Preview Aug 5, 2025 0:33am

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. Bug Something isn't working labels Aug 5, 2025
@shahargl shahargl requested a review from Copilot August 5, 2025 12:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a time filtering bug in the search engine by changing the field used for time-based filtering from lastReceived to timestamp. The issue was that time_delta filtering in Keep Provider version 2 was using the wrong field, causing incorrect results when filtering alerts by time.

  • Updated the search engine to use timestamp field instead of lastReceived for time-based filtering
  • Added comprehensive test cases to verify the fix and prevent regression
  • Version bump to reflect the bug fix

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
keep/searchengine/searchengine.py Fixed the time filtering logic to use timestamp field instead of lastReceived
tests/test_search_alerts.py Updated existing test expectations to reflect the corrected field usage
tests/test_keep_provider_time_delta.py Added new comprehensive test cases to reproduce and verify the fix for the time filtering bug
pyproject.toml Version bump from 0.46.4 to 0.46.5

talboren
talboren previously approved these changes Aug 5, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 5, 2025
@cursor
Copy link

cursor bot commented Aug 5, 2025

Bugbot found 1 bug

To see it, have a team admin activate your membership in the Cursor dashboard.

@shahargl shahargl merged commit 9cc9de0 into main Aug 5, 2025
19 of 20 checks passed
@shahargl shahargl deleted the bugfix/time branch August 5, 2025 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: time_delta in Keep Provider seems to not filter alerts

2 participants