Skip to content
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

[ISSUE] limit parameter not working as expected when running list_runs #756

Open
rt-phb opened this issue Sep 10, 2024 · 0 comments
Open

Comments

@rt-phb
Copy link

rt-phb commented Sep 10, 2024

Description
I want to get the latest x runs of a job, for this is specify the limit parameter ("The number of runs to return"). Problem is that in the list_runs method a while loop sends not only one single request with the correct limit but instead it sends requests as long as there are runs found for a job. As a result instead of the expected x runs i get a ton of runs (probably all) which drastically slows down the code.

Reproduction
client.jobs.list_runs(job_id=<job_id>, limit=2). # for a job with more than 2 runs

--> returns not 2 runs but many more (probably all)

Expected behavior
list_runs returns as many runs as specified via limit parameter

Is it a regression?
This i don't know, tried 0.32.0 and 0.32.1

Other Information

  • OS: macOS
  • Version: 0.32.0 and 0.32.1

Additional context

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

No branches or pull requests

1 participant