Skip to content

[V2] List run accept filter#7192

Open
machichima wants to merge 3 commits intoflyteorg:v2from
machichima:list-run-filter
Open

[V2] List run accept filter#7192
machichima wants to merge 3 commits intoflyteorg:v2from
machichima:list-run-filter

Conversation

@machichima
Copy link
Copy Markdown
Member

@machichima machichima commented Apr 10, 2026

Tracking issue

Why are the changes needed?

ListRuns API currently does not accept filters, we should support it to list runs for tasks / triggers / ...

What changes were proposed in this pull request?

  1. Remove repo impl ListRuns and only use ListActions, as run is just action with no parent
  2. Enable filtering and sorting in ListActions
  3. Add more filtering functions in runs/repository/impl/filters.go to be used in ListRuns

How was this patch tested?

  • Run sandbox locally and ensure task / trigger page can only see their runs

Total Runs:

image

Runs for "every_minute" trigger:

image

Runs for "every_minute" task:

image

Labels

Please add one or more of the following labels to categorize your PR:

  • added: For new features.
  • changed: For changes in existing functionality.
  • deprecated: For soon-to-be-removed features.
  • removed: For features being removed.
  • fixed: For any bug fixed.
  • security: In case of vulnerabilities

This is important to improve the readability of release notes.

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

Signed-off-by: machichima <nary12321@gmail.com>
Signed-off-by: machichima <nary12321@gmail.com>
…put as args

Signed-off-by: machichima <nary12321@gmail.com>
@machichima machichima marked this pull request as ready for review April 10, 2026 08:57
}
batch, err := s.repo.ActionRepo().ListActions(ctx, interfaces.ListResourceInput{
Filter: impl.NewRunActionsFilter(runID),
Limit: 10000,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is it intentional? it was 100

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

don't we need pagination

if err != nil {
return nil, connect.NewError(connect.CodeInvalidArgument, err)
}
listInput.Filter = impl.NewRunActionsFilter(req.Msg.RunId)
Copy link
Copy Markdown
Member

@pingsutw pingsutw Apr 10, 2026

Choose a reason for hiding this comment

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

It may override the original filter in listInput. should we merge it instead?

@github-actions github-actions bot mentioned this pull request Apr 10, 2026
3 tasks
@pingsutw pingsutw self-assigned this Apr 10, 2026
@pingsutw pingsutw added this to the V2 GA milestone Apr 10, 2026
@pingsutw pingsutw assigned machichima and unassigned pingsutw Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants