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

list_jobs limit argument needs clarification or more suitable default value #169

Open
imrehg opened this issue Jun 2, 2020 · 1 comment

Comments

@imrehg
Copy link
Member

imrehg commented Jun 2, 2020

In JobClient, the list_jobs function has a limit argument, which sets the number of jobs returned in a single request. The default value is is None in the library, which means "use the default limit from the backend service". That default value is (I believe) 10.

https://github.com/facultyai/faculty/blob/master/faculty/clients/job.py#L314

Had a request to use that upstream default value in the library to make the effect of different values clearer. Otherwise interpreting the behaviour of None is difficult (for example will there be paging in that case or all records are returned?)

@acroz
Copy link
Member

acroz commented Jun 2, 2020

In general, the Python clients in this library rely on defaults set on the backend rather than providing their own defaults.

We could either:

  • Review all default arguments and encode specific values as the default arguments in client methods.
  • Update docstrings as appropriate to incidcate when default values exist on the backend.

I'd rather not promise a particular backend-set value as this introduces unnecessary coupling.

What do other similar client libraries do?

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

No branches or pull requests

2 participants