Repository navigation
test: follow observation cursors past empty pages - #2099
Merged
hassiebp merged 2 commits intoNov 5, 2026
Merged
Conversation
The e2e helper get_observations stopped on an empty page, which the observations v2 API can now return while meta.cursor is set. Two e2e tests also asserted no cursor for unbounded no-match queries, which depends on how fast the server scans back to 2020-01-01; bound them to the last day so the server covers the range in one scan window.
This was referenced Nov 5, 2026
DavidTraina
marked this pull request as ready for review
November 5, 2026 07:03
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Updates test code that relied on the old observations v2 pagination rules (see langfuse/langfuse#19043).
get_observationshelper (tests/support/utils.py)meta.cursoris set.Two e2e tests (
test_get_observations_for_unknown_trace_is_empty,test_get_observations_empty)cursor is Nonefor a no-match query with no time bound. That only holds if the server scans back to 2020-01-01 within its 45 s budget, so it depends on how much data the server holds.from_start_timeone day back. That fits inside the server's first 7-day scan window, so a completed request reliably returns no cursor.CI passes today because its database is small. These changes keep the tests correct on servers with more history. Test-only change.
Related PRs
Independent follow-ups to langfuse/langfuse#19043, mergeable in any order: #2097 (batch evaluation stops on empty pages), #2096 (batch evaluation fetch timeout), #2098 (docs), #2101 (pagination helper).
Type of change
Verification
List the main commands you ran:
I did not run the e2e tests locally; they need a Langfuse server.
Checklist
code_review.md..env.templateif needed.

Confidence Score: 5/5
This test-only change appears safe to merge.Summary
Updates observation tests for pages that can be empty while still carrying a cursor.
No actionable issues found. Tests were not run during this review.
Reviews (1) · Last reviewed commit: "test: follow observation cursors past em..." · Reviewed by Greptile