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

fix: next_page_token when runs exhaust #84

Open
JaeAeich opened this issue Nov 17, 2023 · 2 comments
Open

fix: next_page_token when runs exhaust #84

JaeAeich opened this issue Nov 17, 2023 · 2 comments

Comments

@JaeAeich
Copy link
Contributor

Describe the bug
The next_page_token should return empty when the number of runs have exhausted. while fetching runs, I set the pageSize to 10, number of runs available were 7, I still got next_page_token which led me to another fetch call which returned empty list of runs.

To Reproduce
Steps to reproduce the behavior:
keep fetching runs till they exhaust.

Additional context
I encountered it while working on WES component where the Web Component was paginating to an empty list of runs. I have tried local dev branch.

@uniqueg
Copy link
Member

uniqueg commented Nov 20, 2023

I suppose this is the same issue as this one: elixir-cloud-aai/proTES#165

For anyone implementing this, it might actually be good to externalize the pagination logic and put it as a utility in FOCA, i.e., here, then import it in both proTES and proWES.

At some point, we could also think about creating a dedicated foca-utils package for these commonly (re)used utils.

@uniqueg
Copy link
Member

uniqueg commented Nov 20, 2023

@alohamora: Do you wanna look into that, perhaps? We may need this in our Service Registry API implementation as well. However, you would need to check whether those specs imply the same or a different pagination logic. If the latter, we might need to write logic for both.

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

2 participants