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

FlowRuns endpoint does not return Pagination XML #1456

Open
jorwoods opened this issue Sep 4, 2024 · 2 comments
Open

FlowRuns endpoint does not return Pagination XML #1456

jorwoods opened this issue Sep 4, 2024 · 2 comments

Comments

@jorwoods
Copy link
Contributor

jorwoods commented Sep 4, 2024

Describe the bug
A call to Get Flow Runs does not return pagination XML.

Versions
Details of your environment, including:

  • Tableau Server version (or note if using Tableau Online): 2022.3.1
  • Python version: 3.12.4
  • TSC library version: 0.32

To Reproduce
Steps to reproduce the behavior. Please include a code snippet where possible.

import tableauserverclient as TSC
server = TSC.Server("https://url", True)
# auth
flow = server.flows.filter(name="some_flow")[0]
runs = server.flows.filter(flow_id=flow.id, page_size=10)[:]

Results

File "\.venv\Lib\site-packages\tableauserverclient\server\query.py", line 70, in __getitem__
    page_range = range((page - 1) * size, page * size)
                        ~~~~~^~~
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'

NOTE: Be careful not to post user names, passwords, auth tokens or any other private or sensitive information.

Dug into it more and server side, the "GET /api/api-version/sites/site-id/flows/runs" does not return a pagination element in the XML. I think being able to iterate over run history would be useful. Unclear if FlowRuns lacking pagination is intentional. If so, I can update TSC to reflect that.

@jacalata
Copy link
Contributor

I've pointed this out to the team that owns the API, but if they fix it it won't be available immediately so updating tsc is worth doing anyway.

@jorwoods
Copy link
Contributor Author

#1460 tweaks the QuerySet class in such a way that it should continue to function even if the server doesn't return pagination information. Adding it in server side would still be ideal to improve clarity and return information about what is truly available server-side.

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

No branches or pull requests

2 participants