Fix for not retrieving all items when response has multiple pages of items by renoyjohnm · Pull Request #318 · tableau/tabcmd

@renoyjohnm

This pull request includes significant changes to the get_items_by_name function in tabcmd/commands/server.py to support pagination and improve item retrieval. Additionally, comprehensive unit tests have been added to ensure the function's correctness under various scenarios.

@renoyjohnm

@github-actions

@renoyjohnm

@jacalata

Some sites have thousands of items. What's the performance going to be like in that case?

@renoyjohnm

Some sites have thousands of items. What's the performance going to be like in that case?

This issue is specifically is about fetching all items filtered to the provided item name & doesn't fetch all items of a content type from the site. Yes, there could be multiple pages of items with the same name (like in the case of customer issue) & could be low of occurrence given the filter query but I believe we should be fetching all the results from the multiple pages of items despite the performance hit instead of just relying on the first page of items which could lead to unintended consequences. Please let me know of your thoughts on it, Thanks

@renoyjohnm

@jacalata

The point of the bug is that we want to return more than the first page, yes. But what is the performance like? Does it appear to hang?

@renoyjohnm

The point of the bug is that we want to return more than the first page, yes. But what is the performance like? Does it appear to hang?

Not much in the limited testing I performed but it could, depending on the network latency for the requests, another quick option be to bump the default value of TSC_PAGE_SIZE to 500 to reduce the number of API calls for fetching all the pages of items, thoughts?

@jacalata

that does sound like a great quick fix. We could do that and then take a bit more time on this one.

@renoyjohnm

… of items"

This reverts commit e029e22.

@renoyjohnm

jacalata

@jacalata jacalata deleted the rjohn/fix_not_retrieving_all_pages_pagination branch

January 3, 2025 04:31