question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Jira] bulk_issue endless recursion

See original GitHub issue

I got this, then user pass a few invalid keys, and none of them are in Jira. Example JQL values:

key in (“TEST-f4123”, “TEST-14g334g”, “fdf34f”)

Function in jira.py:

def bulk_issue(self, issue_list, fields='*all'):
        """
        :param fields:
        :param list issue_list:
        :return:
        """
        missing_issues = list()
        jql = 'key in ({})'.format(', '.join(['"{}"'.format(key) for key in issue_list]))
        query_result = self.jql(jql, fields=fields)
        if 'errorMessages' in query_result.keys():
            for message in query_result['errorMessages']:
                for key in issue_list:
                    if key in message:
                        missing_issues.append(key)
                        issue_list.remove(key)
            query_result, missing_issues = self.bulk_issue(issue_list, fields)
        return query_result, missing_issues

So it goes to issue_list.remove(key), removes invalid keys one by one and enters endless recursion cycle on line 516 with following error:

Error in JQL Query: Expecting either a value, list or function but got \')\'. You must surround \')\' in quotation marks to use it as a value. (line 1, character 9)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
gonchikcommented, Nov 23, 2019

Hi! It’s so specific situation. I have added an additional checker based on official regex expression matcher

Read more comments on GitHub >

github_iconTop Results From Across the Web

Infinite loop - stackoverflow exception jira scriptrunner
The recursion is happening because the code you are running is run inside a transitition and because it triggers the same transition, it...
Read more >
[#LOG4J2-3230] Certain strings can cause infinite recursion
If a string substitution is attempted for any reason on the following string, it will trigger an infinite recursion, and the application ...
Read more >
Gerrit version 2.13.14 is now available - CSDN博客
If core.trustfolderstat was set to false, an infinite loop could occur ... (dot dot backslash) in a response to a recursive GET command....
Read more >
InternalError: too much recursion - JavaScript - MDN Web Docs
The JavaScript exception "too much recursion" or "Maximum call stack size ... (to avoid an infinite loop, or rather, infinite recursion in this...
Read more >
活動 - redmineorg-copy(2019/12/20) - unofficial-redmine.org
匿名ユーザー; 22:03 Vote #16356 (New): A recursive watcher option/mode ... goes into an infinite loop (apparently - longest time I checke.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found