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 paging with load balancer going to endless loop #263

Merged
merged 1 commit into from
Mar 15, 2020
Merged

Fix paging with load balancer going to endless loop #263

merged 1 commit into from
Mar 15, 2020

Conversation

evilnerd
Copy link
Contributor

PR Description

When used with a load balanced Jira, the SearchPages method would end
up in an endless loop. This was caused by a bug where Jira would not
handle the MaxResults=50 that is sent by defaul properly, thus retur-
ning no issues. The SearchPages method didn't check for empty results
and ended up in an endless loop.

Fixed this by

  1. Pre-escaping '&maxResults' to '&MaxResults'.
  2. Adding a check in SearchPages to see if the issues array is empty
    before going into the endless 'for'.

Also fixed the appropriate tests.

Fixes issue #260.

Checklist

@evilnerd evilnerd mentioned this pull request Mar 14, 2020
7 tasks
@ghostsquad
Copy link
Contributor

@evilnerd your commit message is ALMOST perfect. Here's the only thing you need to change:

old:

Fix paging with load balancer

new:

fix: paging with load balancer

The commands to do this are simple though.

git commit --amend

git push --force

The first command will let you edit your commit message, which will change the commit sha, and require you to force push up to Github.

https://help.github.com/en/github/committing-changes-to-your-project/changing-a-commit-message

When used with a load balanced Jira, the SearchPages method would end
up in an endless loop. This was caused by a bug where Jira would not
handle the MaxResults=50 that is sent by defaul properly, thus retur-
ning no issues. The SearchPages method didn't check for empty results
and ended up in an endless loop.

Fixed this by
1. Pre-escaping '&maxResults' to '&MaxResults'.
2. Adding a check in SearchPages to see if the issues array is empty
   before going into the endless 'for'.

Also fixed the appropriate tests.

Fixes issue #260.
@evilnerd
Copy link
Contributor Author

Made the change. Thanks again for your help!

@ghostsquad ghostsquad merged commit 19d3fc0 into andygrunwald:master Mar 15, 2020
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

Successfully merging this pull request may close these issues.

2 participants