turbot / steampipe-plugin-jira

Use SQL to instantly query Jira. Open source CLI. No DB required.
https://hub.steampipe.io/plugins/turbot/jira
Apache License 2.0
22 stars 14 forks source link

Update `jira_issue` table to fetch 500 results per page #133

Closed ParthaI closed 2 months ago

ParthaI commented 3 months ago

Example query results

Results ``` > select * from jira_issue +---------------------------------------------+-------+--------------+------------------------------------------------------------+-------------+------------+---------------+-----------------+----------+------------+-------------------> | login_id | id | key | self | project_key | project_id | status | status_category | epic_key | sprint_ids | sprint_names > +---------------------------------------------+-------+--------------+------------------------------------------------------------+-------------+------------+---------------+-----------------+----------+------------+-------------------> | 712020:3cf24750-73fe-4040-bdbe-07f73135aec2 | 10101 | TUTORIAL-1 | https://turbot-turbot.atlassian.net/rest/api/2/issue/10101 | TUTORIAL | 10003 | To Do | To Do | | | > | | | | | | | | | | | > | | | | | | | | | | | > | | | | | | | | | | | > | | | | | | | | | | | > | | | | | | | | | | | > | | | | | | | | | | | > | 712020:3cf24750-73fe-4040-bdbe-07f73135aec2 | 10008 | SSP-7 | https://turbot-turbot.atlassian.net/rest/api/2/issue/10008 | SSP | 10002 | To Do | To Do | | | > | | | | | | | | | | | > | | | | | | | | | | | > ```
misraved commented 2 months ago

@ParthaI could you please verify if the pagination issue exists in other jira_* tables?

ParthaI commented 2 months ago

Hi @misraved,

If I understand correctly, the issue doesn’t seem to be with pagination itself, as it appears to be working fine. The challenge is that it's taking longer to retrieve details with a smaller amount of data per page.

I reviewed the API documentation, but it doesn't specify the maximum value supported for the maxResults parameter for any of the API.

To address this, we need to determine the optimal maxResults value for each table through testing. Unfortunately, our environment doesn’t have a large enough dataset to fully test this.

In this PR, I’ve updated the maxResults value based on what appears to be supported.

Please let me know if you have any further questions or need additional adjustments.

Thank you!

misraved commented 2 months ago

@ParthaI thank you for the detailed response 👍!!

Could we ensure the maxResults is set correctly across all the other tables?

ParthaI commented 2 months ago

@misraved, I ran the query against the tables using select * from <TABLE NAME>, and everything seems to be working fine. I didn't encounter any issues related to the maxResults value.