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

When updating issues, only first 50 Jira issues are considered #8

Closed
justaugustus opened this issue Dec 22, 2022 · 0 comments · Fixed by #51
Closed

When updating issues, only first 50 Jira issues are considered #8

justaugustus opened this issue Dec 22, 2022 · 0 comments · Fixed by #51
Assignees
Labels
bug Something isn't working
Milestone

Comments

@justaugustus
Copy link
Contributor

From: coreos/issue-sync#30
Potential fix: coreos/issue-sync#34

When comparing Jira and GH issues during an update, the code queries issues from GH and then tries to find the matching issues from Jira. But, if there are many GH issues then this branch is executed: https://github.com/coreos/issue-sync/blob/master/lib/clients/jira.go#L130.

It seems like we could filter the issues ourselves, but the query only returns the 50 first issues. If the GH id doesn't match, then a new issue is created although a matching Jira ticket could be found beyond the first hits.

My workaround for this was to move the Jira query https://github.com/coreos/issue-sync/blob/master/lib/issues.go#L40 inside the following GH issue loop, so we can query Jira one GH id at a time. I didn't see any major performance hit and the script stopped creating duplicate issues to Jira.

@justaugustus justaugustus added the bug Something isn't working label Dec 22, 2022
@justaugustus justaugustus mentioned this issue Dec 22, 2022
8 tasks
@justaugustus justaugustus modified the milestones: v.next, v0.1.0 Dec 22, 2022
This was referenced Dec 27, 2022
@justaugustus justaugustus self-assigned this Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant