Skip to content

Conversation

@Sovietaced
Copy link
Member

@Sovietaced Sovietaced commented Oct 14, 2025

Tracking issue

Closes #6676

Why are the changes needed?

Limit & offset pagination only works when the iteration order of the values from the database is deterministic. Without this change in some circumstances it is possible for some nodes to be omitted from the result which is very frustrating/confusing for users.

What changes were proposed in this pull request?

Adds a configurable sort_by option and defaults to ordering nodes by their created_at timestamp in ASC order.

How was this patch tested?

Tested locally in our environment.

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

Summary by Bito

This pull request introduces a new configurable `sort_by` option for the `iterate_node_executions` and `iterate_task_executions` functions, enhancing pagination reliability by sorting results deterministically by `created_at`. This modification improves user experience by ensuring clearer and more consistent data retrieval.

@flyte-bot
Copy link
Contributor

Bito Automatic Review Skipped - Draft PR

Bito didn't auto-review because this pull request is in draft status.
No action is needed if you didn't intend for the agent to review it. Otherwise, to manually trigger a review, type /review in a comment and save.
You can change draft PR review settings here, or contact your Bito workspace admin at [email protected].

@codecov
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.48%. Comparing base (3c6b61d) to head (00653f7).
⚠️ Report is 51 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (3c6b61d) and HEAD (00653f7). Click for more details.

HEAD has 40 uploads less than BASE
Flag BASE (3c6b61d) HEAD (00653f7)
41 1
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #3340       +/-   ##
===========================================
- Coverage   83.35%   46.48%   -36.88%     
===========================================
  Files         347      216      -131     
  Lines       28791    22609     -6182     
  Branches     2960     2969        +9     
===========================================
- Hits        23999    10509    -13490     
- Misses       3956    11581     +7625     
+ Partials      836      519      -317     

☔ 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.

Signed-off-by: Jason Parraga <[email protected]>
@pingsutw pingsutw merged commit a693622 into flyteorg:master Oct 16, 2025
117 checks passed
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.

3 participants