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

feat(sdk): make offset and count parameters optional and None by default #45

Closed
wants to merge 1 commit into from

Conversation

catcombo
Copy link
Contributor

This makes offset and count parameters optional and None by default. It will affect existing code that does not set count value and relies on the default value, which has been changed from -1 to None. Now, in case of a very large sample, YouTrack API will return 1000 entries by default. But if you want to fetch all entries, set count=-1 or paginate results until you get an empty page. I didn't find any confirmation in the docs that -1 is a valid value, so it's better to use pagination.

@catcombo catcombo requested review from zyv and IamAbbey March 15, 2024 10:55
@catcombo catcombo force-pushed the feature/make-pagination-optional branch from 772abfb to 77978a3 Compare March 15, 2024 10:58
@catcombo catcombo force-pushed the feature/make-pagination-optional branch from 77978a3 to 14c45a0 Compare March 15, 2024 10:59
Copy link
Contributor

@zyv zyv left a comment

Choose a reason for hiding this comment

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

I agree with your conclusion, but I would not make this change unless we actually implement following the pagination.

I have looked at the code, and I can't see any code pertaining to that in our SDK. If you now make this change, then the behaviour will silently change of all consumers, and instead of getting full responses, they will start suddenly getting 1000 results, unless they change their code. This will break a lot of stuff, including our reporting.

@catcombo
Copy link
Contributor Author

Ok, then lets close this PR.

@catcombo catcombo closed this Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants