airbyte icon indicating copy to clipboard operation
airbyte copied to clipboard

source-jira: pagination failure, Users stream only returns 50 records

Open alafanechere opened this issue 2 years ago • 4 comments

Environment

  • Source Connector and version: source-jira 0.2.20

Current Behavior

The Users stream only returns 50 records. This is probably related to next_page_token implementation as the default number of returned values on this endpoint is 50.

Expected Behavior

The Users stream should return all available users

Logs

Related forum discussion

alafanechere avatar Jul 01 '22 10:07 alafanechere

Were you able to reproduce the issue with integration account?

marcosmarxm avatar Jul 05 '22 16:07 marcosmarxm

@marcosmarxm, I am sorry, but what is integration account ?

Hon-badger avatar Jul 12 '22 09:07 Hon-badger

That's something internal @marcosmarxm I can check and get back

harshithmullapudi avatar Jul 13 '22 07:07 harshithmullapudi

Hi @harshithmullapudi, are there any updates ?

Hon-badger avatar Jul 28 '22 10:07 Hon-badger

Hey yeah I was able to reproduce this with our integration account

harshithmullapudi avatar Aug 01 '22 04:08 harshithmullapudi

Hi all. @harshithmullapudi May I know if there is any progress?

Kresantis avatar Aug 25 '22 07:08 Kresantis

Hey guys, I've provided a temporary solution to the problem by adding a maxResults field in the jira source interface.

https://github.com/antonioneto-hotmart/airbyte/tree/source-jira-custom

Commit https://github.com/airbytehq/airbyte/commit/2211070dbcb835efadd35abb844c4417c09794ae

antonioneto-hotmart avatar Aug 25 '22 10:08 antonioneto-hotmart

Hey @antonioneto-hotmart, do you have time to help us with a PR as a fix?

harshithmullapudi avatar Aug 29 '22 06:08 harshithmullapudi

Hey Airbyte Team, just wanted to comment that the 50 record limitation also exists on Sprints [where it appears that the sprints connector returns a maximum of 50 records per board it iterates through]. It appears that it would be possible to paginate through API calls by adding startAt=[last starting place+ 50] until the body returns results with an "isLast"=true, but I'm personally unsure how this would be implemented in airbyte. Would be a great feature addition, as it's pretty easy to hit the 50 sprint limit.

ZBryantOM1 avatar Sep 13 '22 15:09 ZBryantOM1

A slight adjustment to my previous comment; After reviewing the source code in streams.py for the jira connector, it seems that fixing pagination for Users and Streams would require different approaches.

While neither class blocks contain references to the next_page_token variable, The Users API doesn't include the paging metadata in the response, and instead might need to be handled differently, such as the temporary solution described above. However, the Sprints API does return pagination metadata, so adding logic that references next_page_token in that class block may solve that pagination issue. Let me know if you'd prefer to make that a separate issue.

ZBryantOM1 avatar Sep 14 '22 13:09 ZBryantOM1