Skip to content

Fix: config.after_timestamp behavior in InMemorySessionService.get_session() and add a test #438

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

allengour
Copy link

Fixes #437

  • Slice events[i+1:] instead of events[i] to avoid returning the incorrect index
  • Change elif config.after_timestamp to independent if so both config filters can be applied
  • Add unit test covering cases:
    pytest tests/unittests/sessions/test_session_service.py -k test_get_session_with_config
    image

Updated behavior:
image

@allengour
Copy link
Author

Note, for the test, I did not include SessionServiceType.DATABASE in the service_type parameter because there appears to be a separate issue with sqlalchemy in the source code:
image

@allengour allengour force-pushed the fix/issue-437-after_timestamp-behavior branch from 33f99a1 to ea381f4 Compare April 29, 2025 00:12
@allengour allengour force-pushed the fix/issue-437-after_timestamp-behavior branch from ea381f4 to a2129f8 Compare May 1, 2025 10:52
@DeanChensj
Copy link
Collaborator

Hi @allengour , could you update your branch so that we can merge? Thanks!

@allengour allengour force-pushed the fix/issue-437-after_timestamp-behavior branch from a2129f8 to ec2fcaf Compare May 2, 2025 23:09
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.

2 minor bugs in config.after_timestamp behavior of InMemorySessionService.get_session()
2 participants