Skip to content

fix(redis): Return all items from Redis dataset get_data with desc=True and limit=None#1939

Open
vdusek wants to merge 1 commit into
masterfrom
fix/redis-dataset-get-data-desc-unlimited
Open

fix(redis): Return all items from Redis dataset get_data with desc=True and limit=None#1939
vdusek wants to merge 1 commit into
masterfrom
fix/redis-dataset-get-data-desc-unlimited

Conversation

@vdusek
Copy link
Copy Markdown
Collaborator

@vdusek vdusek commented Jun 3, 2026

Description

RedisDatasetClient.get_data called with desc=True, offset=0, limit=None fell through to the generic descending match arm and built the Redis JSON path $[:-0]. Slice semantics treat -0 as 0, so the path evaluated to an empty array and a non-empty dataset silently returned zero items, while the symmetric ascending call correctly returned everything.

This adds an explicit case (True, 0, None) arm producing $[:] (all items, reversed afterwards by the existing desc handling), plus a regression test.

…and `limit=None`

The match statement fell through to the generic descending arm and built
the JSON path `$[:-0]`, which slice semantics evaluate to an empty array,
so a non-empty dataset silently returned zero items.
@vdusek vdusek added t-tooling Issues with this label are in the ownership of the tooling team. adhoc Ad-hoc unplanned task added during the sprint. labels Jun 3, 2026
@vdusek vdusek self-assigned this Jun 3, 2026
@github-actions github-actions Bot added this to the 142nd sprint - Tooling team milestone Jun 3, 2026
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label Jun 3, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.94%. Comparing base (dc1ed61) to head (c32d563).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1939      +/-   ##
==========================================
+ Coverage   92.85%   92.94%   +0.08%     
==========================================
  Files         167      167              
  Lines       11714    11716       +2     
==========================================
+ Hits        10877    10889      +12     
+ Misses        837      827      -10     
Flag Coverage Δ
unit 92.94% <100.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek vdusek changed the title fix: Return all items from Redis dataset get_data with desc=True and limit=None fix(redis): Return all items from Redis dataset get_data with desc=True and limit=None Jun 3, 2026
@vdusek vdusek requested a review from Mantisus June 3, 2026 17:58
@vdusek vdusek marked this pull request as ready for review June 3, 2026 17:58
Copy link
Copy Markdown
Collaborator

@Mantisus Mantisus left a comment

Choose a reason for hiding this comment

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

One suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants